> ## 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.

# Confirm Upload

> Confirm a direct file upload and start transcription

> [!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 `confirmUpload` mutation confirms that a file has been successfully uploaded to the pre-signed URL and triggers the transcription process. This is the second step in the direct upload flow.

**Upload Flow:**

1. Call [createUploadUrl](https://docs.fireflies.ai/graphql-api/mutation/create-upload-url) to get a pre-signed upload URL (and, with `upload_method: POST`, its form fields)
2. Upload your file to `upload_url` with the returned `upload_method`: for `POST`, a multipart form with every `upload_fields` entry as a form field, then the file last, as the field named `file`; for `PUT`, the file as the request body (see [Uploading the File](https://docs.fireflies.ai/graphql-api/mutation/create-upload-url#uploading-the-file))
3. Call `confirmUpload` to confirm the upload and start transcription

## Arguments

**input** `ConfirmUploadInput` *required*

**meeting\_id** `String` *required*

The meeting ID returned from the `createUploadUrl` mutation. This identifies which upload session to confirm.

## Response

**success** `Boolean`

Indicates whether the confirmation was successful and transcription has been queued.

**meeting\_id** `String`

The meeting ID for the confirmed upload.

**message** `String`

A message describing the result of the confirmation.

**url** `String`

Link to the meeting in Fireflies. It opens right away; the transcript appears there once processing finishes (usually a few minutes).

## Usage Example

```graphql theme={null}
mutation confirmUpload($input: ConfirmUploadInput!) {
  confirmUpload(input: $input) {
    success
    meeting_id
    message
    url
  }
}
```

```bash curl theme={null}
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "mutation($input: ConfirmUploadInput!) { confirmUpload(input: $input) { success meeting_id message url } }",
    "variables": {
      "input": {
        "meeting_id": "abc123def456"
      }
    }
  }' \
  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 = {
  meeting_id: 'abc123def456'
};

const data = {
  query: `
    mutation($input: ConfirmUploadInput!) {
      confirmUpload(input: $input) {
        success
        meeting_id
        message
        url
      }
    }
  `,
  variables: { input }
};

axios
  .post(url, data, { headers })
  .then(result => {
    console.log(result.data);
  })
  .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 = {
    "meeting_id": "abc123def456"
}

data = {
    'query': '''
        mutation($input: ConfirmUploadInput!) {
            confirmUpload(input: $input) {
                success
                meeting_id
                message
                url
            }
        }
    ''',
    'variables': {'input': input_data}
}

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

if response.status_code == 200:
    print(response.json())
else:
    print(response.text)
```

```json Response theme={null}
{
  "data": {
    "confirmUpload": {
      "success": true,
      "meeting_id": "abc123def456",
      "message": "Audio upload confirmed. Transcription processing has started.",
      "url": "https://app.fireflies.ai/view/abc123def456"
    }
  }
}
```

## Complete Upload Flow Example

Here's a complete example showing the entire upload flow:

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

const API_URL = 'https://api.fireflies.ai/graphql';
const API_KEY = 'your_api_key';

async function uploadAudioFile(filePath, title) {
  const fileSize = fs.statSync(filePath).size;
  
  // Step 1: Get the signed upload URL and its form fields (upload_method POST)
  const createUrlResponse = await axios.post(API_URL, {
    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: fileSize,
        title: title,
        upload_method: 'POST'
      }
    }
  }, {
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${API_KEY}`
    }
  });
  
  const { upload_url, upload_fields, meeting_id } = createUrlResponse.data.data.createUploadUrl;
  console.log('Got upload URL for meeting:', meeting_id);
  
  // Step 2: POST the file to the signed URL as a multipart form:
  // every upload_fields entry first, the file last as "file", streamed from disk
  const form = new FormData();
  for (const { name, value } of upload_fields) {
    form.append(name, value);
  }
  form.append('file', fs.createReadStream(filePath), {
    filename: path.basename(filePath),
    contentType: 'audio/mpeg',
    knownLength: fileSize,
  });
  const uploadStatus = await new Promise((resolve, reject) => {
    form.submit(upload_url, (err, res) => {
      if (err) return reject(err);
      res.resume();
      resolve(res.statusCode);
    });
  });
  if (uploadStatus >= 300) {
    throw new Error(`Upload failed: ${uploadStatus}`);
  }
  console.log('File uploaded successfully');
  
  // Step 3: Confirm the upload
  const confirmResponse = await axios.post(API_URL, {
    query: `
      mutation($input: ConfirmUploadInput!) {
        confirmUpload(input: $input) {
          success
          meeting_id
          message
          url
        }
      }
    `,
    variables: {
      input: {
        meeting_id: meeting_id
      }
    }
  }, {
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${API_KEY}`
    }
  });
  
  const { url } = confirmResponse.data.data.confirmUpload;
  console.log('Upload confirmed. The transcript will appear at:', url);
  return meeting_id;
}

// Usage
uploadAudioFile('./meeting-recording.mp3', 'Team Standup')
  .then(meetingId => console.log('Transcription started for:', meetingId))
  .catch(err => console.error('Upload failed:', err));
```

## Error Codes

> [accordion] object\_not\_found (UploadSession)
>
> The upload session was not found or has expired. Upload sessions expire after 1 hour. You need to call `createUploadUrl` again to get a new upload URL.

> [accordion] object\_not\_found (Audio/Video)
>
> The file was not found in storage. Make sure you have successfully uploaded the file to the signed URL before calling this mutation.

> [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] invalid\_arguments (file too large)
>
> The uploaded file is over the [size limit](https://docs.fireflies.ai/graphql-api/mutation/create-upload-url#file-size-limits) for its type. With `upload_method: POST`, storage already refuses such a file, so this applies to a `PUT` upload. Upload a smaller file to the same `upload_url` (with the same form fields, for a `POST`) before it expires, which replaces the stored file, then call `confirmUpload` again; or call `createUploadUrl` for a new upload URL.

> [accordion] invalid\_arguments (already confirmed)
>
> This upload was already confirmed, by an earlier call or one running right now. The file is transcribed once; open the meeting link in the message instead of uploading the file again.

> [accordion] service\_unavailable
>
> Fireflies could not tell whether processing started (for example, the request timed out). The message says so and links the meeting: check it before uploading again, since it may still be transcribed. The same upload cannot be confirmed again for up to an hour; if the meeting gets no transcript, upload the file again with a new `createUploadUrl`.

## Important Notes

* Upload sessions expire after **1 hour**. If you don't confirm within this time, you'll need to start over with a new `createUploadUrl` call.
* Make sure the file upload to the signed URL completes successfully before calling `confirmUpload`.
* The `meeting_id` must match the one returned from `createUploadUrl`.
* Only the user who created the upload session can confirm it.
* Confirm each upload once. Until the upload session expires (1 hour after `createUploadUrl`), a second call is refused with `invalid_arguments` and the meeting link, so the file is never transcribed twice.

## Audit Trail

A successful call records a [`MEETING_UPLOAD_CONFIRMED`](https://docs.fireflies.ai/graphql-api/query/audit-events) audit event for the meeting.

## Additional Resources

> [card] [Create Upload URL](https://docs.fireflies.ai/graphql-api/mutation/create-upload-url)
>
> Generate a pre-signed upload form or URL

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

> [card] [Transcript](https://docs.fireflies.ai/graphql-api/query/transcript.md)
>
> Query the transcript after processing

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


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