Events
| Action |
Event name |
| create an image (POST /images) |
images.created |
| delete an image (DELETE /images/:imageId) |
images.deleted |
Payload example created
{
"attemptId": "20ebdb3d-85e1-47a4-a81d-7b6c7dd1a481",
"created": 1634755434,
"data": {
"_id": "5f243d100617680712e78dd7",
"accountId": "52a377ec430c7d4e220001fc",
"url": "https://example.com/image.png",
"createdBy": "5f243d100617680712e78dd7",
"updatedBy": "5f243d100617680712e78dd7",
"createdAt": { "value": "2021-10-20T18:42:50.342Z", "offset": 0 },
"updatedAt": { "value": "2021-10-20T18:42:50.342Z", "offset": 0 }
},
"event": "images.created",
"id": "2e32d603-a379-46f9-9393-ba4d1859e2fe",
"livemode": true
}
Payload fields (images.created)
| Field |
Type |
Description |
| id |
string |
Webhook event id |
| attemptId |
string |
Delivery attempt id |
| created |
int |
Unix timestamp when the event was created |
| event |
string |
images.created |
| livemode |
boolean |
Whether the account is in live mode |
| data |
object |
The created image document |
| data._id |
string |
Image id (ObjectId) |
| data.accountId |
string |
Account id |
| data.url |
string |
The URL from the post |
| data.createdBy |
string |
User id that created the resource |
| data.updatedBy |
string |
User id that last updated the resource |
| data.createdAt |
object |
Creation date (value, offset) |
| data.updatedAt |
object |
Last update date (value, offset) |
Payload example deleted
{
"attemptId": "20ebdb3d-85e1-47a4-a81d-7b6c7dd1a481",
"created": 1634755434,
"data": {
"imageId": "5f243d100617680712e78dd7"
},
"event": "images.deleted",
"id": "2e32d603-a379-46f9-9393-ba4d1859e2fe",
"livemode": true
}
Payload fields (images.deleted)
| Field |
Type |
Description |
| id |
string |
Webhook event id |
| attemptId |
string |
Delivery attempt id |
| created |
int |
Unix timestamp when the event was created |
| event |
string |
images.deleted |
| livemode |
boolean |
Whether the account is in live mode |
| data |
object |
Deletion payload |
| data.imageId |
string |
The id of the image that was deleted (ObjectId) |