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

# Create Upload URL

> Generate a pre-signed upload form or URL for direct audio/video file uploads

> [!NOTE]
>
> Direct upload is available on every paid plan (Pro or higher). An admin can disable file uploads for your organization, and the mutation then returns [`feature_disabled`](https://docs.fireflies.ai/miscellaneous/error-codes#feature_disabled).

## Overview

The `createUploadUrl` mutation generates a pre-signed URL that allows you to upload audio or video files directly to Fireflies.ai storage. This is useful when you want to upload files from your own infrastructure without exposing them via a public URL.

Choose how you will upload the file with `upload_method`:

* **`POST` (recommended):** a pre-signed form, a URL and the form fields signed for it. It only accepts a file within the [size limit](#file-size-limits) for its type; storage refuses a larger file.
* **`PUT` (the default when `upload_method` is omitted):** a pre-signed URL that takes the file as the request body. Storage accepts a file of any size; [confirmUpload](https://docs.fireflies.ai/graphql-api/mutation/confirm-upload) then refuses one over the size limit.

This mutation is part of a two-step upload flow:

1. Call `createUploadUrl` to get a pre-signed upload URL (and, for `POST`, its form fields)
2. Upload your file to `upload_url` with the returned `upload_method`. See [Uploading the File](#uploading-the-file)
3. Call [confirmUpload](https://docs.fireflies.ai/graphql-api/mutation/confirm-upload) to confirm the upload and start transcription

## Arguments

**input** `CreateUploadUrlInput` *required*

**content\_type** `String` *required*

The MIME type of the file being uploaded. Must be one of the supported audio or video formats. See [Supported Content Types](#supported-content-types) below.

**file\_size** `Int` *required*

The size of the file in bytes. Used for validation against plan limits. Maximum 2GB for video files (paid users) or 400MB for audio files.

**title** `String`

Title or name of the meeting. This will be used to identify the transcribed file. Maximum 256 characters.

**custom\_language** `String`

Specify a custom language code for your meeting, e.g. `es` for Spanish or `de` for German. For a complete list of language codes, please view [Language Codes](https://docs.fireflies.ai/miscellaneous/language-codes.md). Maximum 5 characters.

**meeting\_date** `String`

The date and time the meeting actually took place, as a calendar-date RFC 3339 string: `YYYY-MM-DD` alone (taken as UTC midnight), or `YYYY-MM-DDTHH:MM:SS` with optional fractional seconds followed by `Z` or a `±HH:MM` offset (required when a time is present — e.g. `2026-03-14T15:00:00+05:30`, normalized to UTC). Use it when importing historical recordings so the meeting is dated with the actual meeting start time instead of the upload time. Must be strictly after `1970-01-01T00:00:00Z` and not in the future. Defaults to the upload time when omitted.

**attendees** `[Attendee]`

An array of [Attendee](https://docs.fireflies.ai/schema/input/attendee.md) objects. This is relevant if you have active integrations like Salesforce, Hubspot etc. Fireflies uses the attendees value to push meeting notes to your active CRM integrations. Maximum 100 attendees. Note: an attendee is dropped when its email contains the uploader's email as a substring (case-sensitive) — e.g. for an uploader `ed@acme.com`, the attendee `fred@acme.com` is dropped.

**upload\_method** `UploadMethod`

How you will upload the file: `POST` or `PUT`. Defaults to `PUT`. We recommend `POST`: the signed form only accepts a file within the [size limit](#file-size-limits) for its type, and storage refuses a larger file. A `PUT` URL accepts a file of any size, and `confirmUpload` then refuses one over the limit. See [UploadMethod](https://docs.fireflies.ai/schema/upload-url-response#uploadmethod) and [Uploading the File](#uploading-the-file).

## Response

**upload\_url** `String`

The URL to upload your file to, with `upload_method`. See [Uploading the File](#uploading-the-file).

**upload\_method** `UploadMethod`

The HTTP method of the upload: the `upload_method` you requested, or `PUT` when you did not request one. For `POST`, send a multipart form with every `upload_fields` entry, then the file last, as the field named `file`. For `PUT`, send the file as the request body, with a `Content-Type` header equal to the `content_type` you requested.

**upload\_fields** `[UploadFormField!]!`

For `POST`, the form fields the upload was signed with, as `name` and `value` pairs. Send each one unchanged as a form field, in any order, before the file. The names depend on the storage provider (for example `key`, `Content-Type`, `policy` and `x-goog-*` fields, or `Policy` and `X-Amz-*` fields), so read them from the response instead of hard-coding them. See [UploadFormField](https://docs.fireflies.ai/schema/upload-url-response#uploadformfield). Empty for `PUT`.

**meeting\_id** `String`

The unique identifier for the meeting. Use this ID when calling `confirmUpload`.

**expires\_at** `String`

ISO 8601 timestamp indicating when the upload URL expires. URLs are valid for 1 hour.

## Usage Example

```graphql theme={null}
mutation createUploadUrl($input: CreateUploadUrlInput!) {
  createUploadUrl(input: $input) {
    upload_url
    upload_method
    upload_fields {
      name
      value
    }
    meeting_id
    expires_at
  }
}
```

```bash curl theme={null}
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "mutation($input: CreateUploadUrlInput!) { createUploadUrl(input: $input) { upload_url upload_method upload_fields { name value } meeting_id expires_at } }",
    "variables": {
      "input": {
        "content_type": "audio/mpeg",
        "file_size": 10485760,
        "title": "Team Meeting Recording",
        "upload_method": "POST"
      }
    }
  }' \
  https://api.fireflies.ai/graphql
```

```javascript javascript theme={null}
const axios = require('axios');

const url = 'https://api.fireflies.ai/graphql';
const headers = {
  'Content-Type': 'application/json',
  Authorization: 'Bearer your_api_key'
};

const input = {
  content_type: 'audio/mpeg',
  file_size: 10485760,
  title: 'Team Meeting Recording',
  upload_method: 'POST'
};

const data = {
  query: `
    mutation($input: CreateUploadUrlInput!) {
      createUploadUrl(input: $input) {
        upload_url
        upload_method
        upload_fields {
          name
          value
        }
        meeting_id
        expires_at
      }
    }
  `,
  variables: { input }
};

axios
  .post(url, data, { headers })
  .then(result => {
    console.log(result.data);
    
    // Step 2: Upload the file to the signed URL
    const { upload_url, upload_fields, meeting_id } = result.data.data.createUploadUrl;
    // POST a multipart form to upload_url: every upload_fields entry, then the file last as "file"
    // (see "Uploading the File" below)
  })
  .catch(e => {
    console.log(JSON.stringify(e));
  });
```

```python python theme={null}
import requests

url = 'https://api.fireflies.ai/graphql'

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_key'
}

input_data = {
    "content_type": "audio/mpeg",
    "file_size": 10485760,
    "title": "Team Meeting Recording",
    "upload_method": "POST"
}

data = {
    'query': '''
        mutation($input: CreateUploadUrlInput!) {
            createUploadUrl(input: $input) {
                upload_url
                upload_method
                upload_fields {
                    name
                    value
                }
                meeting_id
                expires_at
            }
        }
    ''',
    'variables': {'input': input_data}
}

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
    result = response.json()
    print(result)
    
    # Step 2: Upload the file to the signed URL
    upload_url = result['data']['createUploadUrl']['upload_url']
    upload_fields = result['data']['createUploadUrl']['upload_fields']
    meeting_id = result['data']['createUploadUrl']['meeting_id']
    # POST a multipart form to upload_url: every upload_fields entry, then the file last as "file"
    # (see "Uploading the File" below)
else:
    print(response.text)
```

```json Response theme={null}
{
  "data": {
    "createUploadUrl": {
      "upload_url": "https://storage.googleapis.com/fireflies-bucket",
      "upload_method": "POST",
      "upload_fields": [
        { "name": "key", "value": "abc123def456/audio.mp3" },
        { "name": "Content-Type", "value": "audio/mpeg" },
        { "name": "policy", "value": "eyJjb25kaXRpb25zIjpb..." },
        { "name": "x-goog-algorithm", "value": "GOOG4-RSA-SHA256" },
        { "name": "x-goog-credential", "value": "uploader@project.iam.gserviceaccount.com/20240115/auto/storage/goog4_request" },
        { "name": "x-goog-date", "value": "20240115T110000Z" },
        { "name": "x-goog-signature", "value": "5f2c..." }
      ],
      "meeting_id": "abc123def456",
      "expires_at": "2024-01-15T12:00:00.000Z"
    }
  }
}
```

## Uploading the File

Upload the file to `upload_url` with the `upload_method` of the response. You can upload again with the same `upload_url` (and, for `POST`, the same fields) until `expires_at`; a new upload replaces the previous file.

### POST (recommended)

With `upload_method: POST`, upload the file to `upload_url` with an HTTP multipart form POST (`multipart/form-data`):

1. Send every entry of `upload_fields` as a form field, with its `name` and `value` unchanged. Their order does not matter.
2. Send the file **last**, as the field named `file`. The storage ignores any field after the file.

Do not add a `Content-Type` header of your own to the request; your HTTP client sets it with the form boundary. The storage answers a successful upload with a `2xx` status, usually `204 No Content`. It refuses a file larger than the [size limit](#file-size-limits) for its type, an upload after `expires_at`, and a form whose fields were changed, with a `4xx` error.

With `curl` and `jq` in bash, where `response.json` holds the `createUploadUrl` response:

```bash theme={null}
upload_url=$(jq -r '.data.createUploadUrl.upload_url' response.json)
fields=()
while IFS= read -r -d '' field; do
  fields+=(--form-string "$field")
done < <(jq -j '.data.createUploadUrl.upload_fields[] | "\(.name)=\(.value)\u0000"' response.json)

curl -sS -f -X POST "${fields[@]}" -F 'file=@your-audio-file.mp3' "$upload_url"
```

`--form-string` sends each value as plain text: with `-F`, curl would read a value starting with `@` or `<` as a file name.

```javascript theme={null}
const fs = require('fs');
const FormData = require('form-data'); // npm install form-data

// Resolves once storage has the file: call confirmUpload after it
function uploadFile(upload_url, upload_fields) {
  const form = new FormData();
  for (const { name, value } of upload_fields) {
    form.append(name, value);
  }
  // The file must be the last field; it streams from disk instead of loading into memory
  form.append('file', fs.createReadStream('your-audio-file.mp3'), {
    filename: 'your-audio-file.mp3',
    contentType: 'audio/mpeg',
    knownLength: fs.statSync('your-audio-file.mp3').size,
  });

  return new Promise((resolve, reject) => {
    form.submit(upload_url, (err, res) => {
      if (err) return reject(err);
      res.resume();
      if (res.statusCode >= 300) return reject(new Error(`Upload failed: ${res.statusCode}`));
      resolve();
    });
  });
}

uploadFile(upload_url, upload_fields)
  .then(() => console.log('Uploaded. Now call confirmUpload.'))
  .catch((err) => console.error(err));
```

```python theme={null}
import requests
from requests_toolbelt import MultipartEncoder  # pip install requests-toolbelt

with open('your-audio-file.mp3', 'rb') as f:
    # A list keeps the order: every signed field, then the file last.
    # The encoder streams the file instead of loading it into memory.
    encoder = MultipartEncoder(
        fields=[(field['name'], field['value']) for field in upload_fields]
        + [('file', ('your-audio-file.mp3', f, 'audio/mpeg'))]
    )
    response = requests.post(
        upload_url, data=encoder, headers={'Content-Type': encoder.content_type}
    )

response.raise_for_status()
```

### PUT

Without `upload_method`, or with `upload_method: PUT`, `upload_fields` is empty. Upload the file to `upload_url` with an HTTP PUT request: the file as the request body, with a `Content-Type` header equal to the `content_type` you requested. Storage does not limit the size of a PUT upload; [confirmUpload](https://docs.fireflies.ai/graphql-api/mutation/confirm-upload) refuses a file over the [size limit](#file-size-limits) for its type.

```bash theme={null}
curl -sS -f -X PUT \
  -H "Content-Type: audio/mpeg" \
  --upload-file your-audio-file.mp3 \
  "$upload_url"
```

```javascript theme={null}
const fs = require('fs');
const axios = require('axios');

const fileBuffer = fs.readFileSync('your-audio-file.mp3');

await axios.put(upload_url, fileBuffer, {
  headers: {
    'Content-Type': 'audio/mpeg'
  }
});
```

```python theme={null}
import requests

with open('your-audio-file.mp3', 'rb') as f:
    response = requests.put(
        upload_url,
        data=f,
        headers={'Content-Type': 'audio/mpeg'},
    )

response.raise_for_status()
```

After the upload completes successfully, call [confirmUpload](https://docs.fireflies.ai/graphql-api/mutation/confirm-upload) to start transcription.

## Supported Content Types

### Audio Formats

| MIME Type | Extension |
| - | - |
| `audio/mpeg` | .mp3 |
| `audio/mp3` | .mp3 |
| `audio/wav` | .wav |
| `audio/x-wav` | .wav |
| `audio/vnd.wave` | .wav |
| `audio/x-m4a` | .m4a |
| `audio/mp4` | .m4a |
| `audio/ogg` | .ogg |
| `audio/webm` | .webm |
| `audio/aac` | .aac |
| `audio/x-aac` | .aac |
| `audio/aac-adts` | .aac |
| `audio/amr` | .amr |
| `audio/opus` | .opus |
| `audio/3gpp` | .3gp |

### Video Formats

| MIME Type | Extension |
| - | - |
| `video/mp4` | .mp4 |
| `video/webm` | .webm |
| `video/quicktime` | .mov |
| `video/x-m4v` | .m4v |
| `video/mpeg` | .mpeg |
| `video/x-msvideo` | .avi |
| `video/ogg` | .ogv |
| `video/3gpp` | .3gp |

## File Size Limits

| File Type | User Plan | Maximum Size |
| - | - | - |
| Audio | All plans | 400 MB |
| Video | Free | 200 MB |
| Video | Paid | 2 GB |

## Daily Limit

Each upload URL creates a meeting, so each user can create at most **50 upload URLs per day** (UTC), whether or not the files are later confirmed. Upload URLs created before the limit was reached can still be used and confirmed.

## Error Codes

> [accordion] paid\_required
>
> This mutation requires a paid plan (Pro or higher). Free plan users cannot use direct file uploads.

> [accordion] invalid\_arguments
>
> The content type is not supported, or the file size exceeds the allowed limit for your plan.

> [accordion] feature\_disabled
>
> Your organization admin has disabled file uploads for transcription. Contact your admin to re-enable uploads. See [feature\_disabled](https://docs.fireflies.ai/miscellaneous/error-codes.md#feature_disabled).

> [accordion] too\_many\_requests
>
> You have created 50 upload URLs today (UTC). `extensions.metadata.retryAfter` is the next UTC midnight, in milliseconds since the epoch. See [too\_many\_requests](https://docs.fireflies.ai/miscellaneous/error-codes.md#too_many_requests).

## Audit Trail

A successful call records a [`MEETING_UPLOAD_CREATED`](https://docs.fireflies.ai/graphql-api/query/audit-events) audit event carrying the `contentType` and `fileSize` in its metadata.

## Additional Resources

> [card] [Confirm Upload](https://docs.fireflies.ai/graphql-api/mutation/confirm-upload)
>
> Confirm the upload and start transcription

> [card] [Upload Audio (URL)](https://docs.fireflies.ai/graphql-api/mutation/upload-audio.md)
>
> Alternative: Upload audio via public URL

> [card] [Webhooks](https://docs.fireflies.ai/graphql-api/webhooks-v2.md)
>
> Receive notifications when transcription completes

> [card] [Language Codes](https://docs.fireflies.ai/miscellaneous/language-codes.md)
>
> Supported language codes for transcription


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.