V3 REFERENCE Event API

/eventcallbackurl

Manage event-driven callback URLs, also called webhooks, used by the Mailjet platform when a specific action is triggered

List eventcallbackurl resources available for this apikey, use a GET request. Alternatively, you may want to add one or more filters.

# list eventcallbackurl resources

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/eventcallbackurl
Unique Key

In addition to the resource $ID, you can also use the unique key $EventType|$Backup to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
APIKeyID
OR
APIKeyALT
APIKeyID
ID reference to APIKey
APIKeyALT
Value of the APIKey field of the related APIKey resource
  • Mandatory
  • [ Type TAPIKey ]
EventType Numerical event type.
  • [ Type AnsiString ]

Allowed values:
  • open
  • click
  • bounce
  • spam
  • blocked
  • unsub
  • typofix
  • sent
  • parseapi
  • newsender
  • newsenderautovalid
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsBackup Is this a backup URL ?.
  • [ Type Boolean ]
Status Status of the event.
  • [ Type AnsiString ]

Allowed values:
  • dead
  • alive
Url URL to use.
  • Mandatory
  • [ Type AnsiString ]
Version Event API version for which this URL is valid.
  • [ Type SmallInt ]
Filters
Name Description
APIKey Only retrieve EventcallbackUrl resources for which APIKey ID equals the specified value.
  • [ Type Int64 ]
Backup Retrieve only backup callback URLs.
  • [ Type TBooleanFilter ]
EventType Only retrieve eventcallbackurl resources for which EventType equals the specified value.
  • [ Type TTriggerEvent ]
Status Only retrieve eventcallbackurl resources for which Status equals the specified value.
  • [ Type TTriggerStatus ]
Version Only retrieve eventcallbackurl resources for which Version equals the specified value.
  • [ Type SmallInt ]

Access a given eventcallbackurl resource, use a GET request, providing the eventcallbackurl's ID value.

# access the eventcallbackurl resource identified by $ID

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/eventcallbackurl/$ID

    
# access the resource through the EventType|Backup's value
# note: all keys marked as 'unique' may be used as an alternate ID

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/eventcallbackurl/$EventType|$Backup
    
    
Unique Key

In addition to the resource $ID, you can also use the unique key $EventType|$Backup to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
APIKeyID
OR
APIKeyALT
APIKeyID
ID reference to APIKey
APIKeyALT
Value of the APIKey field of the related APIKey resource
  • Mandatory
  • [ Type TAPIKey ]
EventType Numerical event type.
  • [ Type AnsiString ]

Allowed values:
  • open
  • click
  • bounce
  • spam
  • blocked
  • unsub
  • typofix
  • sent
  • parseapi
  • newsender
  • newsenderautovalid
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsBackup Is this a backup URL ?.
  • [ Type Boolean ]
Status Status of the event.
  • [ Type AnsiString ]

Allowed values:
  • dead
  • alive
Url URL to use.
  • Mandatory
  • [ Type AnsiString ]
Version Event API version for which this URL is valid.
  • [ Type SmallInt ]

Add a new eventcallbackurl resource with a POST request.

# add a new eventcallbackurl resource, beware of the Read Only fields!

curl -s -X POST \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/eventcallbackurl \
-H 'Content-Type: application/json' \
-d '{"APIKey": ...}'
Unique Key

In addition to the resource $ID, you can also use the unique key $EventType|$Backup to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
APIKeyID
OR
APIKeyALT
APIKeyID
ID reference to APIKey
APIKeyALT
Value of the APIKey field of the related APIKey resource
  • Mandatory
  • [ Type TAPIKey ]
EventType Numerical event type.
  • [ Type AnsiString ]

Allowed values:
  • open
  • click
  • bounce
  • spam
  • blocked
  • unsub
  • typofix
  • sent
  • parseapi
  • newsender
  • newsenderautovalid
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsBackup Is this a backup URL ?.
  • [ Type Boolean ]
Status Status of the event.
  • [ Type AnsiString ]

Allowed values:
  • dead
  • alive
Url URL to use.
  • Mandatory
  • [ Type AnsiString ]
Version Event API version for which this URL is valid.
  • [ Type SmallInt ]

Update one specific eventcallbackurl resource with a PUT request, providing the eventcallbackurl's ID value. Be sure to include all the mandatory properties.

# update content of resource eventcallbackurl identified by ID $ID

curl -s -X PUT \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/eventcallbackurl/$ID \
-H 'Content-Type: application/json' \
-d '{"APIKey": ...}'

    
# update the content, using the value of the EventType|Backup property
# note: all keys marked as 'unique' may be used as an alternate ID

curl -s -X PUT \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/eventcallbackurl/:EventType|Backup \
-H 'Content-Type: application/json' \
-d '{"APIKey": ...}'
    
Unique Key

In addition to the resource $ID, you can also use the unique key $EventType|$Backup to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
APIKeyID
OR
APIKeyALT
APIKeyID
ID reference to APIKey
APIKeyALT
Value of the APIKey field of the related APIKey resource
  • Mandatory
  • [ Type TAPIKey ]
EventType Numerical event type.
  • [ Type AnsiString ]

Allowed values:
  • open
  • click
  • bounce
  • spam
  • blocked
  • unsub
  • typofix
  • sent
  • parseapi
  • newsender
  • newsenderautovalid
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsBackup Is this a backup URL ?.
  • [ Type Boolean ]
Status Status of the event.
  • [ Type AnsiString ]

Allowed values:
  • dead
  • alive
Url URL to use.
  • Mandatory
  • [ Type AnsiString ]
Version Event API version for which this URL is valid.
  • [ Type SmallInt ]

Remove one given eventcallbackurl resource with a DELETE request, providing the eventcallbackurl's ID value.

# delete resource eventcallbackurl with ID $ID

curl -s -X DELETE \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/eventcallbackurl/$ID
    
# delete the resource using the alternate unique key EventType|Backup
# note: all keys marked as 'unique' may be used as an alternate ID

curl -s -X DELETE \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/eventcallbackurl/:EventType|Backup
    
Unique Key

In addition to the resource $ID, you can also use the unique key $EventType|$Backup to identify this resource. Please refer to the field(s) description below for more information.