Webhooks

Webhooks API manages domain's webhooks. You can create, access and delete webhooks programmatically.

Get all webhooks

get/v3/domains/{domain}/webhooks

Listing urls of every webhooks under the domain.

SecuritybasicAuth
Request
path Parameters
domain
required
string

The name of the domain you want to get webhook from

Responses
200

A 200 response

Response Schema: application/json
required
object
object
object
object
object
object
object
object
object
401

A 401 response

404

A 404 response

Request samples
Response samples
application/json
{}

Create a webhook

post/v3/domains/{domain}/webhooks

Create a list of one or more urls provided by the url query params. Targeted webhook name is defined through the id param.

SecuritybasicAuth
Request
path Parameters
domain
required
string

The name of the domain you want to get webhook from

Request Body schema: multipart/form-data
required
url
required
string

url(s) for webhooks to be sent to. Use multiple times to associate more than one url. Maximum of 3 urls for a given webhook type.

id
required
string

Webhook type to create. Valid types are accepted, clicked, opened, unsubscribed, delivered, permanent_fail, temporary_fail, complained

Responses
200

A 200 response

Response Schema: application/json
message
required
string
required
object
401

A 401 response

404

A 404 response

Request samples
Response samples
application/json
{
  • "message": "Webhook has been created",
  • "webhook": {}
}

Get webhooks by type

get/v3/domains/{domain_name}/webhooks/{webhook_name}

Get the list of url(s) for a webhook identified by its webhook_name.

SecuritybasicAuth
Request
path Parameters
domain_name
required
string

The domain you want to get webhook for

webhook_name
required
string

The webhook type you wish to retrieve. Valid types are accepted, clicked, opened, unsubscribed, delivered, permanent_fail, temporary_fail, complained

Responses
200

A 200 response

Response Schema: application/json
required
object
url
string
urls
Array of strings
401

A 401 response

404

A 404 response

Request samples
Response samples
application/json
{}

Update a webhook

put/v3/domains/{domain_name}/webhooks/{webhook_name}

Replace the list of urls by the given one with the url param. Here is the list of supported webhook: accepted, opened, clicked, unsubscribed, delivered, permanent_fail, temporary_fail and complained.

SecuritybasicAuth
Request
path Parameters
domain_name
required
string

The name of the domain you want to get webhook from

webhook_name
required
string

The name of the webhook to update.

Request Body schema: multipart/form-data
required
url
required
string

New url(s) to associate to webhook. Use multiple times to associate more than one url. Maximum of 3 urls for a given type.

Responses
200

A 200 response

Response Schema: application/json
message
required
string
required
object
401

A 401 response

404

A 404 response

Request samples
Response samples
application/json
{
  • "webhook": {},
  • "message": "Webhook has been updated"
}

Remove all webhooks by webhook type

delete/v3/domains/{domain_name}/webhooks/{webhook_name}

Empty the list of urls attached to a webhook name. It returns the list that have been removed.

SecuritybasicAuth
Request
path Parameters
domain_name
required
string

The name of the domain you want to delete the webhook from

webhook_name
required
string

The name of the webhook to delete. Supported webhook names are accepted, clicked, opened, unsubscribed, delivered, permanent_fail, temporary_fail, and complained.

Responses
200

A 200 response

Response Schema: application/json
message
required
string
required
object
401

A 401 response

404

A 404 response

Request samples
Response samples
application/json
{
  • "message": "Webhook has been deleted",
  • "webhook": {}
}