Create a file
curl --request POST \
--url https://api.ando.so/v1/files \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 12345
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({filename: 'report.pdf', content_type: 'application/pdf', size_bytes: 12345})
};
fetch('https://api.ando.so/v1/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ando.so/v1/files"
payload = {
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 12345
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"object": "file",
"id": "file_01jzn7e61x3a7v9h2r7t2m3q4p",
"file_id": "file_01jzn7e61x3a7v9h2r7t2m3q4p",
"status": "waiting_for_upload",
"purpose": "message_attachment",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 12345,
"created_at": "2026-05-14T08:00:00.000Z",
"updated_at": "2026-05-14T08:00:00.000Z",
"upload": {
"kind": "single_part_presigned_put",
"method": "PUT",
"url": "https://storage.example/upload",
"headers": {
"Content-Length": "12345",
"Content-Type": "application/pdf",
"x-amz-meta-ando-file-id": "file_01jzn7e61x3a7v9h2r7t2m3q4p"
},
"expires_at": "2026-05-14T08:15:00.000Z"
}
},
"file_id": "file_01jzn7e61x3a7v9h2r7t2m3q4p"
}Create a file
Creates a file upload intent for a message attachment. The response returns temporary direct storage upload instructions; send the bytes to that URL, then complete the file before using its id in create-message file_ids. Replay the same request with the same Idempotency-Key and body to refresh an active upload URL.
POST
https://api.ando.so/v1
/
files
Create a file
curl --request POST \
--url https://api.ando.so/v1/files \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 12345
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({filename: 'report.pdf', content_type: 'application/pdf', size_bytes: 12345})
};
fetch('https://api.ando.so/v1/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ando.so/v1/files"
payload = {
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 12345
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"object": "file",
"id": "file_01jzn7e61x3a7v9h2r7t2m3q4p",
"file_id": "file_01jzn7e61x3a7v9h2r7t2m3q4p",
"status": "waiting_for_upload",
"purpose": "message_attachment",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 12345,
"created_at": "2026-05-14T08:00:00.000Z",
"updated_at": "2026-05-14T08:00:00.000Z",
"upload": {
"kind": "single_part_presigned_put",
"method": "PUT",
"url": "https://storage.example/upload",
"headers": {
"Content-Length": "12345",
"Content-Type": "application/pdf",
"x-amz-meta-ando-file-id": "file_01jzn7e61x3a7v9h2r7t2m3q4p"
},
"expires_at": "2026-05-14T08:15:00.000Z"
}
},
"file_id": "file_01jzn7e61x3a7v9h2r7t2m3q4p"
}Authorizations
AndoApiKeyBearerApiKey
Headers
Body
application/json
Create a public file upload intent. The response returns a storage upload URL; send the file bytes to that URL, then complete the upload before attaching the returned file id to a message.
Response
Existing file upload intent for a matching idempotency key.
Public file response envelope.