This API is not generally available. Access requires whitelisting. Please contact Fireflies support to request access.
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:
Call createUploadUrl to get a pre-signed upload URL
Upload your file directly to the URL using an HTTP PUT request
Call confirmUpload to confirm the upload and start transcription
Arguments
input
ConfirmUploadInput
required
The meeting ID returned from the createUploadUrl mutation. This identifies which upload session to confirm.
Response
Indicates whether the confirmation was successful and transcription has been queued.
The meeting ID for the confirmed upload.
A message describing the result of the confirmation.
Usage Example
mutation confirmUpload ( $input : ConfirmUploadInput ! ) {
confirmUpload ( input : $input ) {
success
meeting_id
message
}
}
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 } }",
"variables": {
"input": {
"meeting_id": "abc123def456"
}
}
}' \
https://api.fireflies.ai/graphql
{
"data" : {
"confirmUpload" : {
"success" : true ,
"meeting_id" : "abc123def456" ,
"message" : "Audio upload confirmed. Transcription has been queued."
}
}
}
Complete Upload Flow Example
Here’s a complete example showing the entire upload flow:
const axios = require ( 'axios' );
const fs = require ( 'fs' );
const API_URL = 'https://api.fireflies.ai/graphql' ;
const API_KEY = 'your_api_key' ;
async function uploadAudioFile ( filePath , title ) {
const fileBuffer = fs . readFileSync ( filePath );
const fileSize = fileBuffer . length ;
// Step 1: Get the signed upload URL
const createUrlResponse = await axios . post ( API_URL , {
query: `
mutation($input: CreateUploadUrlInput!) {
createUploadUrl(input: $input) {
upload_url
meeting_id
expires_at
}
}
` ,
variables: {
input: {
content_type: 'audio/mpeg' ,
file_size: fileSize ,
title: title
}
}
}, {
headers: {
'Content-Type' : 'application/json' ,
'Authorization' : `Bearer ${ API_KEY } `
}
});
const { upload_url , meeting_id } = createUrlResponse . data . data . createUploadUrl ;
console . log ( 'Got upload URL for meeting:' , meeting_id );
// Step 2: Upload the file to the signed URL
await axios . put ( upload_url , fileBuffer , {
headers: {
'Content-Type' : 'audio/mpeg'
}
});
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
}
}
` ,
variables: {
input: {
meeting_id: meeting_id
}
}
}, {
headers: {
'Content-Type' : 'application/json' ,
'Authorization' : `Bearer ${ API_KEY } `
}
});
console . log ( 'Upload confirmed:' , confirmResponse . data . data . confirmUpload );
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
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.
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.
The user account has been cancelled. Please contact support if you encounter this error.
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.
Additional Resources