Overview
The Ordinal API supports two ways to upload media:- URL upload — submit a publicly accessible URL and Ordinal downloads the file for you.
- Local file upload — request signed credentials, then upload the file directly to the returned
uploadUrl.
ready, then use the returned assetId when creating posts.
Choosing a flow
Supported file types
File size limits
Images cannot exceed 36 megapixels total resolution.
Upload statuses
URL upload
Use this flow when the file is already hosted somewhere Ordinal can reach over the public internet.1
Submit the file URL
POST to
/uploads with the publicly accessible URL of the file.2
Receive an upload job ID
The API returns an upload job ID with
pending status.3
Poll for status
Poll
GET /uploads/{id} until the status changes to ready.4
Use the asset ID
Once ready, use the returned
assetId in the assetIds array when creating posts.Create a URL upload
Response
Local file upload
Use this flow when the file is on disk, in private storage, or otherwise not reachable from the public internet. Ordinal returns signed credentials that let your client upload the bytes directly to the returneduploadUrl.
1
Prepare the upload
POST to
/uploads/prepare with the file’s filename, mimetype, and size in bytes.2
Upload the file
POST the file to the returned
uploadUrl as multipart/form-data with three form fields: params (the JSON string from the prepare response), signature (the signature from the prepare response), and file (the local file bytes). Copy params and signature verbatim — do not modify them. Ordinal is notified automatically when processing finishes.3
Poll for status
Poll
GET /uploads/{id} until the status changes to ready.4
Use the asset ID
Once ready, use the returned
assetId in the assetIds array when creating posts.Prepare the upload
Response
params value is a signed JSON string. It includes auth (with key and expires), template_id, and fields (uploadJobId, workspaceId, storagePath). The credentials are short‑lived — upload the file before expiresAt.
Upload the file
POST the file touploadUrl as multipart/form-data with three form fields. Use the params and signature values from the prepare response exactly as returned — do not parse, reformat, or regenerate them.
uploadUrl, params, and signature with the values returned by /uploads/prepare.
Here’s the same step in Node.js:
processing and then ready.
Checking upload status
Poll the upload endpoint to check when processing is complete:Ready response
When the upload is ready, the response includes theassetId and file metadata:
Failed response
If the upload fails, the response includes an error message:Using assets in posts
Include theassetId in the assetIds array when creating a post:
Platform attachment limits
Important notes
Uploads expire within 24 hours if not used in a post. Once an upload expires, create a new upload job.
For videos, the
duration field in the ready response contains the video length in seconds. For images, this field is null.