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
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

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

id
required
string

Webhook name to create. Valid webhook names are accepted, clicked, 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 created",
  • "webhook": {}
}

Get webhooks by type

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

Get the list of urls for a webhook identified by its name. Can be either accepted, clicked, click, opened, open, unsubscribed, unsubscribe, bounce, deliver, delivered, drop, spam, state_change, permanent_fail, temporary_fail or 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 you want to get. Valid webhooks are accepted, clicked, unsubscribed, delivered, permanent_fail, temporary_fail, and 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
{
  • "message": "Webhook has been updated",
  • "webhook": {}
}

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": {}
}