curl --request POST \
--url https://api.lettermint.co/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"route_id": "<string>",
"name": "<string>",
"url": "<string>",
"events": [
"message.created"
],
"enabled": true
}
'{
"data": {
"id": "<string>",
"route_id": "<string>",
"name": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"enabled": true,
"last_called_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"secret": "<string>"
},
"message": "Webhook created successfully. Please save the secret as it will not be shown again."
}Creates a webhook for a specific route and generates a secret for signature verification.
curl --request POST \
--url https://api.lettermint.co/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"route_id": "<string>",
"name": "<string>",
"url": "<string>",
"events": [
"message.created"
],
"enabled": true
}
'{
"data": {
"id": "<string>",
"route_id": "<string>",
"name": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"enabled": true,
"last_called_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"secret": "<string>"
},
"message": "Webhook created successfully. Please save the secret as it will not be shown again."
}Team API token. Find this in your team settings.
StoreWebhookData
2555001message.created, message.sent, message.delivered, message.hard_bounced, message.soft_bounced, message.spam_complaint, message.failed, message.suppressed, message.unsubscribed, message.opened, message.clicked, message.inbound, message.policy_rejected, webhook.test