Webhooks
Register webhook endpoints, test them and inspect their deliveries.
/v1/webhooksAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Response Body
application/json
curl -X GET "https://example.com/v1/webhooks"[ { "id": "string", "name": null, "webhookUrl": "string", "products": [ "string" ], "events": [ "string" ], "includeFutureEvents": true, "scope": "string", "domainIds": [ "string" ], "isActive": true, "createdAt": "2019-08-24T14:15:22Z", "lastTriggeredAt": null, "lastSuccessAt": null, "lastFailureAt": null, "successCount": 0, "failureCount": 0, "consecutiveFailures": 0, "secretKeyPrefix": null, "pausedAt": null, "pausedReason": null, "pauseThreshold": 0, "approvedTlsPort": null, "type": null }]/v1/webhooksAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/webhooks" \ -H "Content-Type: application/json" \ -d '{ "webhookUrl": "string" }'{ "webhook": { "id": "string", "name": null, "webhookUrl": "string", "products": [ "string" ], "events": [ "string" ], "includeFutureEvents": true, "scope": "string", "domainIds": [ "string" ], "isActive": true, "createdAt": "2019-08-24T14:15:22Z", "lastTriggeredAt": null, "lastSuccessAt": null, "lastFailureAt": null, "successCount": 0, "failureCount": 0, "consecutiveFailures": 0, "secretKeyPrefix": null, "pausedAt": null, "pausedReason": null, "pauseThreshold": 0, "approvedTlsPort": null, "type": null }, "secret": "string"}/v1/webhooks/{id}Authorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/v1/webhooks/string"{ "recentLogs": [ { "publicId": "string", "eventType": "string", "messageId": null, "statusCode": 0, "responseTimeMs": 0, "success": true, "errorMessage": null, "createdAt": "2019-08-24T14:15:22Z", "attemptNumber": 0 } ], "id": "string", "name": null, "webhookUrl": "string", "products": [ "string" ], "events": [ "string" ], "includeFutureEvents": true, "scope": "string", "domainIds": [ "string" ], "isActive": true, "createdAt": "2019-08-24T14:15:22Z", "lastTriggeredAt": null, "lastSuccessAt": null, "lastFailureAt": null, "successCount": 0, "failureCount": 0, "consecutiveFailures": 0, "secretKeyPrefix": null, "pausedAt": null, "pausedReason": null, "pauseThreshold": 0, "approvedTlsPort": null, "type": null}/v1/webhooks/{id}Authorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/v1/webhooks/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": null, "webhookUrl": "string", "products": [ "string" ], "events": [ "string" ], "includeFutureEvents": true, "scope": "string", "domainIds": [ "string" ], "isActive": true, "createdAt": "2019-08-24T14:15:22Z", "lastTriggeredAt": null, "lastSuccessAt": null, "lastFailureAt": null, "successCount": 0, "failureCount": 0, "consecutiveFailures": 0, "secretKeyPrefix": null, "pausedAt": null, "pausedReason": null, "pauseThreshold": 0, "approvedTlsPort": null, "type": null}/v1/webhooks/{id}Authorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Response Body
curl -X DELETE "https://example.com/v1/webhooks/string"/v1/webhooks/{id}/regenerate-secretAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/webhooks/string/regenerate-secret"{ "secretKey": "string"}/v1/webhooks/{id}/resumeAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/webhooks/string/resume"{ "id": "string", "name": null, "webhookUrl": "string", "products": [ "string" ], "events": [ "string" ], "includeFutureEvents": true, "scope": "string", "domainIds": [ "string" ], "isActive": true, "createdAt": "2019-08-24T14:15:22Z", "lastTriggeredAt": null, "lastSuccessAt": null, "lastFailureAt": null, "successCount": 0, "failureCount": 0, "consecutiveFailures": 0, "secretKeyPrefix": null, "pausedAt": null, "pausedReason": null, "pauseThreshold": 0, "approvedTlsPort": null, "type": null}/v1/webhooks/{id}/usageAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/webhooks/string/usage"{ "webhookId": "string", "webhookName": null, "affectedRoutes": [ { "id": "string", "name": "string", "pattern": "string", "domainName": "string", "actions": [ "string" ], "willBeDisabled": true } ], "routesCount": 0, "routesToDisable": 0}/v1/webhooks/{id}/testAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/webhooks/string/test"{ "success": true, "statusCode": 0, "statusText": null, "durationMs": 0, "responseBody": null, "errorMessage": null, "errorType": null, "headersSent": null, "wouldReceiveRealEvents": true, "liveEvents": [ "string" ], "dormantEvents": { "property1": "string", "property2": "string" }, "subscriptionWarning": null}/v1/webhooks/{id}/deliveriesAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Query Parameters
^-?(?:0|[1-9]\d*)$int3220date-timedate-timeResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/webhooks/string/deliveries"{ "items": [ { "publicId": "string", "eventType": "string", "messageId": null, "statusCode": 0, "responseTimeMs": 0, "success": true, "errorMessage": null, "createdAt": "2019-08-24T14:15:22Z", "attemptNumber": 0 } ], "nextCursor": null, "hasMore": true}/v1/webhooks/{id}/deliveries/{deliveryId}/retryAuthorization
ApiKey Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/webhooks/string/deliveries/string/retry"{ "message": "string"}