Mailmus

Webhooks

GET
/projects/{projectId}/webhooks

Path Parameters

projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/webhooks"
[  {    "id": "string",    "url": "string",    "events": [      "string"    ],    "active": true,    "appId": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }]
POST
/projects/{projectId}/webhooks

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/projects/string/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "https://yourapp.com/webhooks/mailmus",    "events": [      "email.sent",      "send.delivered"    ]  }'
{  "id": "string",  "url": "string",  "events": [    "string"  ],  "active": true,  "appId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "secret": "whsec_..."}
PATCH
/projects/{projectId}/webhooks/{id}

Path Parameters

id*string
projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/projects/string/webhooks/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "url": "string",  "events": [    "string"  ],  "active": true,  "appId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
DELETE
/projects/{projectId}/webhooks/{id}

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X DELETE "https://example.com/projects/string/webhooks/string"
{  "id": "string",  "url": "string",  "events": [    "string"  ],  "active": true,  "appId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
POST
/projects/{projectId}/webhooks/{id}/rotate-secret

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X POST "https://example.com/projects/string/webhooks/string/rotate-secret"
{  "id": "string",  "url": "string",  "events": [    "string"  ],  "active": true,  "appId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "secret": "whsec_..."}
GET
/projects/{projectId}/webhooks/{id}/deliveries

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/webhooks/string/deliveries"
[  {    "id": "string",    "subscriptionId": "string",    "event": "email.delivered",    "payload": {},    "status": "PENDING",    "attempts": 0,    "responseStatus": 0,    "errorMessage": "string",    "createdAt": "2019-08-24T14:15:22Z",    "deliveredAt": "2019-08-24T14:15:22Z"  }]
POST
/projects/{projectId}/webhooks/{id}/deliveries/{deliveryId}/replay

Path Parameters

id*string
deliveryId*string
projectId*string

Response Body

curl -X POST "https://example.com/projects/string/webhooks/string/deliveries/string/replay"
Empty
POST
/projects/{projectId}/webhooks/{id}/test

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X POST "https://example.com/projects/string/webhooks/string/test"
{  "status": 0,  "ok": true,  "responseTime": 0}