Webhook

The resources below helps you track email delivery and engagement events and forward the information to a webhook URL of your choice. You can use this data to create additional workflows - react to spam reports, identify bounced email addresses, sync unsubscribed contacts, etc.

post

Add a new callback URL

post

/eventcallbackurl

Add a new callback URL used as a webhook to track different email actions. Whenever an action (e.g. email open) occurs, the information about it will be sent to this callback URL. You can then set up different automation workflows triggered by the tracked actions.

Note: The URL provided cannot be a root URL.

Full API path

https://api.mailjet.com/v3/REST/eventcallbackurl

Body parameters

EventType

string

The type of event that is being tracked.

Possible values:

  • open
  • click
  • bounce
  • spam
  • blocked
  • unsub
  • sent

Default value: open

IsBackup

boolean

Indicates whether this is a backup URL or not. The backup URL will be used in case the primary one is suspended.

Status

string

Defines whether the callback URL is active or not.

Possible values:

  • dead
  • alive

Url

string, required

The URL used for this object.

Note: The URL provided cannot be a root URL.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

EventType

string

The type of event that is being tracked.

Possible values:

  • open
  • click
  • bounce
  • spam
  • blocked
  • unsub
  • sent

Default value: open

IsBackup

boolean

Indicates whether this is a backup URL or not. The backup URL will be used in case the primary one is suspended.

Status

string

Defines whether the callback URL is active or not.

Possible values:

  • dead
  • alive

APIKeyID

integer

Unique numeric ID for the API Key this callback URL is assigned to.

ID

integer

Unique numeric ID for this callback URL.

Version

integer

Indicates whether the events are sent one at a time to the callback URL, or are grouped.

Possible values:

  • 1 - The events are not grouped and a callback is received for each event individually.
  • 2 - The events are grouped. A callback for the grouped events is received with a maximum frequency of once per second. We advise to use this value to avoid reaching the API rate limits.

Url

string

The URL used for this object.

Note: The URL provided cannot be a root URL.

Total

integer