Send an upload's bytes
PUT/v1/agents/:agentId/uploads/:uploadId/content
The file of a pending upload, as the whole request body, sent once. No API key: the
upload's own token, in the X-Upload-Token header createUpload returned, is the
credential. It works for this upload only, for 15 minutes, and only for a body of exactly
the size_bytes the upload was created with. Send any Content-Type; the bytes decide the
type. The upload comes back ready, with the type its bytes are and their SHA-256. With no key
to count against, it allows the default 60 requests a minute from one IP address.
Request
Responses
- 200
- 403
- 409
- 413
- 422
- 429
- 500
The upload, ready.
Response Headers
Correlation id for this request — paste into support tickets.
upload_token_invalid: X-Upload-Token is missing, isn't this upload's, or is past its 15
minutes. Create a new upload.
Response Headers
Correlation id for this request — paste into support tickets.
upload_already_written: this upload's bytes were already sent; an upload is written once.
Create a new upload to send another file.
Response Headers
Correlation id for this request — paste into support tickets.
The request body is larger than 1 MB.
Response Headers
Correlation id for this request — paste into support tickets.
invalid_request_body when the body breaks its schema (send file, or file_name with
size_bytes, not both); upload_too_large for a size of 0 or over 20 MB;
upload_size_mismatch when the bytes sent aren't exactly size_bytes;
upload_type_not_allowed when the bytes aren't a JPEG, PNG or WebP image, an MP4 or MOV
video, or a PDF or DOCX document; upload_url_invalid when file.download_url can't
be downloaded.
Response Headers
Correlation id for this request — paste into support tickets.
Per-key rate limit hit. Default is 60/min/key; an endpoint with an
x-rate-limit-per-minute of its own counts in a budget of its own
(today the WhatsApp template endpoints, sendBroadcast, retryBroadcast, inviteMember,
resendInvitation, uploadAttachmentMedia, importAttachmentMedia, createUpload and
importSavedReplyMedia, which share one that allows 10/min/key,
sendConversationMessage, which allows 20/min/key; putUploadContent takes no key and
allows the default 60/min per IP address), and its 429
reports that limit in X-RateLimit-Limit. Retry-After tells you when to retry;
X-RateLimit-Reset is the Unix timestamp of the next window.
Per-success-response
X-RateLimit-*headers are a known gap; on 2xx responses these headers are NOT currently emitted. Customers should rely on 429 +Retry-Afterfor backoff signals.
Response Headers
Correlation id for this request — paste into support tickets.
Seconds to wait before retrying.
The per-minute request limit of the endpoint called. Every key has the same limits today.
Remaining requests in the current window. 0 on rejection.
Unix timestamp at which the current window resets.
Unexpected server-side failure. Retry with exponential backoff. If
the failure persists, send us the correlation_id.
Response Headers
Correlation id for this request — paste into support tickets.