Skip to content

Images

Images hosted for use in your emails.

View as Markdown

List images

GET/projects/{project_id}/images

Newest first.

Parameters

NameInTypeNotes
project_idpathstringRequired
cursorquerystring | nullOptional
limitqueryintegerOptional, default 50
Request
curl "https://sendocado.com/api/v1/projects/$PROJECT_ID/images" \
  -H "Authorization: Bearer $SENDOCADO_API_KEY"
Response 200
{
  "images": [
    {
      "id": "6mp6afqfjzczbttof7jyu5jsjc616i76",
      "project_id": "ujzde8gxd6ncf10epf91dhodzdoc9is0",
      "url": "https://cdn.sendocado.com/images/2f6b0c1e-8d4a-4f3b-9e7a-5c1d2b3a4f60.png",
      "file_name": "dashboard.png",
      "content_type": "image/png",
      "size_bytes": 184320,
      "created_at": 1790086400000
    }
  ],
  "next_cursor": null
}

Errors

StatusTypeExample message
400invalid_datalimit: Too big: expected number to be <=200
401unauthorizedSend a valid API key as "Authorization: Bearer sc_…", or sign in.
404project_not_foundProject not found.
429rate_limitedToo many requests. Try again in 12 seconds.

Upload an image

POST/projects/{project_id}/images

A PNG, JPEG, GIF or WebP image of up to 5 MB, as a multipart file or as a JSON url Sendocado downloads. The type is read from the file itself. Use the returned url in your emails.

Limited to 60 requests every 60 minutes, on top of the API limit.

Parameters

NameInTypeNotes
project_idpathstringRequired

Body

Send JSON, or multipart/form-data with the image in file.

FieldTypeNotes
filefile | nullOptional
urlstring | nullOptional
file_namestring | nullOptional
Request
curl -X POST "https://sendocado.com/api/v1/projects/$PROJECT_ID/images" \
  -H "Authorization: Bearer $SENDOCADO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "file": null,
  "url": "https://acme.example/press/dashboard.png",
  "file_name": null
}'
Response 201
{
  "id": "6mp6afqfjzczbttof7jyu5jsjc616i76",
  "project_id": "ujzde8gxd6ncf10epf91dhodzdoc9is0",
  "url": "https://cdn.sendocado.com/images/2f6b0c1e-8d4a-4f3b-9e7a-5c1d2b3a4f60.png",
  "file_name": "dashboard.png",
  "content_type": "image/png",
  "size_bytes": 184320,
  "created_at": 1790086400000
}

Errors

StatusTypeExample message
400invalid_dataSend a JSON request body.
401unauthorizedSend a valid API key as "Authorization: Bearer sc_…", or sign in.
404project_not_foundProject not found.
429rate_limitedToo many requests. Try again in 12 seconds.

Delete an image

DELETE/images/{image_id}

Emails already sent keep the image’s url, and it stops loading in them.

Parameters

NameInTypeNotes
image_idpathstringRequired
Request
curl -X DELETE "https://sendocado.com/api/v1/images/$IMAGE_ID" \
  -H "Authorization: Bearer $SENDOCADO_API_KEY"

Answers 204 with no body.

Errors

StatusTypeExample message
401unauthorizedSend a valid API key as "Authorization: Bearer sc_…", or sign in.
404image_not_foundImage not found.
429rate_limitedToo many requests. Try again in 12 seconds.