Skip to main content
POST
/
uploads
/
prepare
Prepare a local file upload
curl --request POST \
  --url https://app.tryordinal.com/api/v1/uploads/prepare \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "product-photo.jpg",
  "mimetype": "image/jpeg",
  "size": 245678
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "awaiting_upload",
  "uploadUrl": "https://upload.example.com",
  "params": "{\"auth\":{...},\"template_id\":\"...\"}",
  "signature": "sha384:...",
  "expiresAt": "2026-02-04T11:30:00.000Z",
  "createdAt": "2026-02-04T10:30:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.tryordinal.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key authentication. Generate an API key from your workspace settings.

Body

application/json
filename
string
required

Original filename, including extension.

Minimum string length: 1
mimetype
string
required

MIME type of the file (e.g., image/jpeg, video/mp4).

Minimum string length: 1
size
integer
required

File size in bytes.

Response

Signed credentials for uploading the file

Response when a local file upload is prepared. Use uploadUrl, params, and signature to POST the file. See File uploads for the full multipart upload example.

id
string<uuid>
required

Upload job ID. Use this to poll GET /uploads/{id}.

status
enum<string>
required

Initial status while Ordinal waits for the file POST.

Available options:
awaiting_upload
uploadUrl
string<uri>
required

URL to POST the file to as multipart form data.

params
string
required

Signed upload params. Include verbatim as the params form field.

signature
string
required

Signature for the params. Include verbatim as the signature form field.

expiresAt
string<date-time>
required

Time after which the signed credentials are no longer valid.

createdAt
string<date-time>
required