Upload List File
Upload files, images, cover images, or avatar image associated with a specific list
POST/v1/user/list/{id}/files- Param
- Body
- Response
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| id | number | ✅ | ID of the list |
Example
/v1/user/list/123/files
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| avatar | Object | ❌ | Avatar image |
| avatar.file_name | string | ✅ | Name of the avatar image |
| avatar.file_buffer | Object | ✅ | Buffer of the avatar image |
| avatar.file_buffer.data | number[] | ✅ | Data of the avatar image |
| avatar.file_buffer.type | string | ✅ | Type of the avatar image |
| cover_images | Object[] | ❌ | Cover images |
| cover_images.file_name | string | ✅ | Name of the cover image |
| cover_images.file_buffer | Object | ✅ | Buffer of the cover image |
| cover_images.file_buffer.data | number[] | ✅ | Data of the cover image |
| cover_images.file_buffer.type | string | ✅ | Type of the cover image |
| images | Object[] | ❌ | Images |
| images.file_name | string | ✅ | Name of the image |
| images.file_buffer | Object | ✅ | Buffer of the image |
| images.file_buffer.data | number[] | ✅ | Data of the image |
| images.file_buffer.type | string | ✅ | Type of the image |
Example
{
"cover_images": [
{
"file_name": "cover_image.jpg",
"file_buffer": {
"data": [
1,
2,
3,
4,
5,
6
],
"type": "image/jpeg"
}
}
]
}
Properties
| Name | Type | Description |
|---|---|---|
| list_id | number | ID of the list |
Example
{
"response": {
"list_id": 123
}
}
CURL Example
curl -X POST "https://api-integrations.snackprompt.com/v1/user/list/{id}/files" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"cover_images":[{"file_name":"cover_image.jpg","file_buffer":{"data":[1,2,3,4,5,6],"type":"image/jpeg"}}]}'