Image API
Interfaces to manage images
Images are used for storing and managing image assets in campaigns. You can upload images, retrieve them, and update their metadata.
V1 API Only
Response Format
All image endpoints return a standardized response with success, data (or message), and request_id. Errors return:
{
"error": {
"type": "invalid_request_error",
"code": "missing_team_id",
"message": "TeamId is required",
"param": "TeamId",
"doc_url": "https://docs.supersend.io/docs/errors#missing_team_id"
},
"request_id": "req_a1b2c3d4e5f6789012345678"
}List Images
Get all images for a team with pagination.
curl -X GET 'https://api.supersend.io/v1/images?TeamId=team-uuid&limit=50&offset=0' \
-H "Authorization: Bearer YOUR_API_KEY"# Response (200 OK)
{
"success": true,
"data": [
{
"id": "image-uuid",
"preview": "https://example.com/preview.jpg",
"url": "https://example.com/image.jpg",
"config": {},
"deleted": false,
"TeamId": "team-uuid",
"CampaignId": "campaign-uuid",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-15T00:00:00Z"
}
],
"pagination": {
"total": 10,
"limit": 50,
"offset": 0,
"has_more": false
},
"request_id": "req_a1b2c3d4e5f6789012345678"
}
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
TeamId | string | Yes | Team ID |
CampaignId | string | No | Filter by campaign ID |
limit | number | No | Results per page |
offset | number | No | Pagination offset |
Note: Only returns non-deleted images (deleted: false). Results are ordered by createdAt descending.
Create Image
Create a new image record.
curl -X POST 'https://api.supersend.io/v1/image' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"preview": "https://example.com/preview.jpg",
"url": "https://example.com/image.jpg",
"config": {
"width": 800,
"height": 600
},
"TeamId": "team-uuid",
"CampaignId": "campaign-uuid"
}'# Response (201 Created)
{
"success": true,
"data": {
"image": {
"id": "image-uuid",
"preview": "https://example.com/preview.jpg",
"url": "https://example.com/image.jpg",
"config": {
"width": 800,
"height": 600
},
"deleted": false,
"TeamId": "team-uuid",
"CampaignId": "campaign-uuid",
"OrgId": "org-uuid",
"UserId": "user-uuid",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
}
},
"request_id": "req_a1b2c3d4e5f6789012345678"
}
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
preview | string | No | Preview image URL |
url | string | No | Full image URL |
config | object | No | Image configuration/metadata (JSON object) |
TeamId | string | No | Team ID |
CampaignId | string | No | Campaign ID |
Note:
OrgId and UserId are automatically set from the authenticated userpreview or url should be providedUpdate Image
Update an image's metadata.
curl -X PUT 'https://api.supersend.io/v1/image/image-uuid' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"preview": "https://example.com/new-preview.jpg",
"url": "https://example.com/new-image.jpg",
"config": {
"width": 1200,
"height": 900
},
"TeamId": "team-uuid"
}'# Response (200 OK)
{
"success": true,
"data": {
"image": {
"id": "image-uuid",
"preview": "https://example.com/new-preview.jpg",
"url": "https://example.com/new-image.jpg",
"config": {
"width": 1200,
"height": 900
},
...
}
},
"request_id": "req_a1b2c3d4e5f6789012345678"
}
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
preview | string | No | Preview image URL |
url | string | No | Full image URL |
config | object | No | Image configuration/metadata (JSON object) |
TeamId | string | Yes | Team ID (for authorization) |
Note:
OrgId is automatically updated from authenticated userUpload Files
Upload files (including images) to S3 storage.
curl -X POST 'https://api.supersend.io/v1/upload/file?TeamId=team-uuid&folder=images' \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "files=@image1.jpg" \
-F "files=@image2.png"# Response (200 OK)
{
"success": true,
"files": [
{
"originalName": "image1.jpg",
"url": "https://bucket.s3.amazonaws.com/images/team-uuid/filename.jpg",
"mimeType": "image/jpeg",
"size": 123456
},
{
"originalName": "image2.png",
"url": "https://bucket.s3.amazonaws.com/images/team-uuid/filename2.png",
"mimeType": "image/png",
"size": 234567
}
]
}
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
TeamId | string | Yes | Team ID |
folder | string | No | S3 folder path (default: general) |
Form Data:
files: One or more files (multipart/form-data)Note: