Skip to main content

Create Upload

This endpoint allows you to create a new upload in the system.

API Endpoint

POST /v2/{team_id}/project/{project_id}/upload

Request Parameters

ParameterTypeRequiredDescription
namestringNoThe name of the upload
filefileYesThe file to upload, adding multiple file fields will create an upload with one task for every upload
projectIdstringYesThe project ID to associate with
metaarrayNoAdditional metadata for the upload, array of name, value objects

Example Request

curl -X POST \
'https://api.send.ai/v2/team_123456/project/proj_123456/upload' \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "name=Important Document" \
-F 'meta=[{"name":"category", "value":"invoice"},{"name":"department", "value":"finance"}]'

Response

{
"id": "upl_abc123",
"name": "Important Document",
"projectId": "proj_123456",
"status": "processing",
"fileType": "pdf",
"fileSize": 1024567,
"createdAt": "2023-06-15T10:30:00Z",
"updatedAt": "2023-06-15T10:30:00Z"
}

Response Parameters

ParameterTypeDescription
idstringUnique identifier for the upload
namestringThe name of the upload
projectIdstringThe project ID associated with the upload
statusstringCurrent status of the upload
fileTypestringThe type of the uploaded file
fileSizenumberSize of the file in bytes
createdAtstringISO timestamp of when the upload was created
updatedAtstringISO timestamp of when the upload was last updated

Error Codes

Status CodeDescription
400Bad request, check your request parameters
401Unauthorized, check your API key
403Forbidden, you don't have access to this project
413Payload too large, file exceeds size limit
500Server error, please try again later

Next: Move →