Images
Images for your newsletters, hosted on the Smartletter CDN.
- GET /images — List images
- POST /images — Upload an image
get/images— List images
Keys: full_access
Query parameters
| limit | integer | 1–100, default 20. |
| after | uuid | Id of the last item of the previous page (older items). |
| before | uuid | Id 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.pngResponse 201
{
"object": "image",
"id": "5b1f2c90-0000-4000-8000-000000000002",
"url": "https://assets.smartletter.ai/ws/5b1f2c90.png",
"content_type": "image/png",
"size_bytes": 48213
}