---
title: "file.created"
description: "Delivered when file.created occurs. Signed per the Standard Webhooks specification: verify the webhook-signature header over the exact bytes of webhook-id, webhook-timestamp and the raw body, and reject a timestamp more than five minutes from your own clock."
image: "https://docs.quirelms.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.quirelms.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Quire API

`POST file.created`

_Webhook._

Delivered when file.created occurs. Signed per the Standard Webhooks specification: verify the webhook-signature header over the exact bytes of webhook-id, webhook-timestamp and the raw body, and reject a timestamp more than five minutes from your own clock.

## Request body

_Required._

- `file.created.id` (string, required) — Equal to the webhook-id header and to the outbox event identifier. Deduplicate on it.
- `file.created.type` (string, required)
- `file.created.version` (integer, required)
- `file.created.occurred_at` (string, required)
  - format `date-time`
- `file.created.tenant` (object, required)
  - `file.created.tenant.id` (string, required)
  - `file.created.tenant.slug` (string, required)
- `file.created.subscription_id` (string, required)
- `file.created.livemode` (boolean, required)
- `file.created.data` (object, required)
  - `file.created.data.area` (string, required)
    - one of `"submission"`, `"resource"`, `"avatar"`, `"cover"`, `"package_source"`, `"software"`
  - `file.created.data.byte_size` (integer, required)
    - min 0; max 9007199254740991
  - `file.created.data.content_type` (string, required)
  - `file.created.data.file_id` (string, required)
    - format `uuid`; pattern `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$`
  - `file.created.data.file_version_id` (string, required)
    - format `uuid`; pattern `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$`
  - `file.created.data.filename` (string, required)
  - `file.created.data.owner_context_id` (string, required)
    - format `uuid`; pattern `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$`
  - `file.created.data.owner_context_type` (string, required)
    - one of `"course"`, `"section"`, `"activity"`, `"user"`, `"tenant"`, `"contentbank"`
- `file.created.links` (map<string>, optional) — Where to read the current state of what the event is about.

## Example request

```json
{
  "id": "string",
  "type": "file.created",
  "version": 1,
  "occurred_at": "2019-08-24T14:15:22Z",
  "tenant": {
    "id": "string",
    "slug": "string"
  },
  "subscription_id": "string",
  "livemode": true,
  "data": {
    "area": "submission",
    "byte_size": 9007199254740991,
    "content_type": "string",
    "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",
    "file_version_id": "f33262e9-1805-4702-a6cb-fcfbe9036a02",
    "filename": "string",
    "owner_context_id": "6e698ab7-78cb-4421-ba26-0c181ca051a2",
    "owner_context_type": "course"
  },
  "links": {
    "property1": "http://example.com",
    "property2": "http://example.com"
  }
}
```

## Responses

### 2XX

Any 2xx acknowledges the delivery. A 410 disables the subscription. Anything else is retried with exponential backoff and full jitter over about 36 hours.


Source: https://docs.quirelms.com/api/webhooks/file.created/index.md
