SLSmartletter API

Images

Images for your newsletters, hosted on the Smartletter CDN.

get/images— List images

Keys: full_access

Query parameters

limitinteger1–100, default 20.
afteruuidId of the last item of the previous page (older items).
beforeuuidId of the first item of the previous page (newer items).
curl -X GET https://api.smartletter.ai/images \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY"

Response 200

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "image",
      "id": "5b1f2c90-0000-4000-8000-000000000002",
      "url": "https://assets.smartletter.ai/…/x.png"
    }
  ]
}

post/images— Upload an image

PNG, JPEG, GIF or WebP, 4 MB max. Send the file as the raw body (Content-Type: image/png…) or as multipart field file. The type is read from the bytes.

Keys: full_access

curl -X POST https://api.smartletter.ai/images \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY" \
  -H "Content-Type: image/png" \
  --data-binary @image.png

Response 201

{
  "object": "image",
  "id": "5b1f2c90-0000-4000-8000-000000000002",
  "url": "https://assets.smartletter.ai/ws/5b1f2c90.png",
  "content_type": "image/png",
  "size_bytes": 48213
}