Create, update, test and delete webhooks and their parameters. See also Webhook formats.

All endpoints use the base URL https://webapi.mymarketing.co.il and an API key in the Authorization header. New to the API? Start with Get started with the ActiveTrail API.

Endpoints

MethodEndpointWhat it does
GET/api/webhooksGet account's Webhooks information
GET/api/webhooks/{id}Get the Webhook of a given id
POST/api/webhooksCreate a new Webhook
PUT/api/webhooks/{id}Update a Webhook
DELETE/api/webhooks/{id}Delete a Webhook by a given id
GET/api/webhooks/{id}/parametersGet the Webhook Parameters for a given webhook id
POST/api/webhooks/{id}/parametersAdd a parameter to a webhook, sent as a header or in the request body
PUT/api/webhooks/{id}/parameters/{parameterid}Update a given Webhook Parameter
DELETE/api/webhooks/{id}/parameters/{parameterid}Delete a given Webhook Parameter
POST/api/webhooks/{id}/TestSend a test request for a given Webhook
POST/api/webhooks/TestSend a test request with a given url and parameters

Endpoint details

Get account's Webhooks information

GET https://webapi.mymarketing.co.il/api/webhooks
ParameterInTypeDescription
eventTypequeryTypesUserApiEventTypes
stateTypequeryTypesStateTypes
targetTypequeryTypesUserApiEventTargetTypes
is_ignore_parametersqueryboolean

Full reference, request and response samples

Get the Webhook of a given id

GET https://webapi.mymarketing.co.il/api/webhooks/{id}
ParameterInTypeDescription
idpathintegerWebhook id. Can be found using the endpoint "Get account's Webhooks information" Required.

Full reference, request and response samples

Create a new Webhook

POST https://webapi.mymarketing.co.il/api/webhooks
ParameterInTypeDescription
parametersbodyCollection of ParametersDetailsUpdate
namebodystringThe name of the web-hook Required.
urlbodystringThe url that the web hook will call
event_typebodyTypesUserApiEventTypesEvent type
formatbodyUserApiEventFormatTypesWeb hook format
is_activebodybooleanIs this web-hook active or not
is_custom_onlybodybooleanWhether this webhook fires only for custom events
stateidbodyTypesStateTypesWeb hook state (deprecated - please use the is_active flag)

The request body is a JSON object (UserApiEventCreate).

Full reference, request and response samples

Update a Webhook

PUT https://webapi.mymarketing.co.il/api/webhooks/{id}
ParameterInTypeDescription
idpathintegerWebhook id. Can be found using the endpoint "Get account's Webhooks information" Required.
namebodystringThe name of the web-hook Required.
urlbodystringThe url that the web hook will call
event_typebodyTypesUserApiEventTypesEvent type
formatbodyUserApiEventFormatTypesWeb hook format
is_activebodybooleanIs this web-hook active or not
is_custom_onlybodybooleanWhether this webhook fires only for custom events
stateidbodyTypesStateTypesWeb hook state (deprecated - please use the is_active flag)

The request body is a JSON object (UserApiEventUpdate).

Full reference, request and response samples

Delete a Webhook by a given id

DELETE https://webapi.mymarketing.co.il/api/webhooks/{id}
ParameterInTypeDescription
idpathintegerWebhook id. Can be found using the endpoint "Get account's Webhooks information" Required.

Full reference, request and response samples

Get the Webhook Parameters for a given webhook id

GET https://webapi.mymarketing.co.il/api/webhooks/{id}/parameters
ParameterInTypeDescription
idpathintegerWebhook id. Can be found using the endpoint "Get account's Webhooks information" Required.

Full reference, request and response samples

Add a parameter to a webhook, sent as a header or in the request body

POST https://webapi.mymarketing.co.il/api/webhooks/{id}/parameters
ParameterInTypeDescription
idpathinteger Required.
keybodystringThe parameter's name.
valuebodystringThe parameter's value.
event_value_typebodyUserApiEventValueTypesValue of parameter
user_fieldbodystringValue of parameter
event_parameter_typebodyTypesUserApiEventsParameterTypesWhere the parameter is sent: header (1) or post, in the request body (2).

The request body is a JSON object (ParametersDetailsUpdate).

Full reference, request and response samples

Update a given Webhook Parameter

PUT https://webapi.mymarketing.co.il/api/webhooks/{id}/parameters/{parameterid}
ParameterInTypeDescription
idpathintegerWebhook id Required.
parameteridpathintegerWebhook parameter id Required.
keybodystringThe parameter's name.
valuebodystringThe parameter's value.
event_value_typebodyUserApiEventValueTypesValue of parameter
user_fieldbodystringValue of parameter
event_parameter_typebodyTypesUserApiEventsParameterTypesWhere the parameter is sent: header (1) or post, in the request body (2).

The request body is a JSON object (ParametersDetailsUpdate).

Full reference, request and response samples

Delete a given Webhook Parameter

DELETE https://webapi.mymarketing.co.il/api/webhooks/{id}/parameters/{parameterid}
ParameterInTypeDescription
idpathintegerWebhook id Required.
parameteridpathintegerWebhook parameter id Required.

Full reference, request and response samples

Send a test request for a given Webhook

POST https://webapi.mymarketing.co.il/api/webhooks/{id}/Test
ParameterInTypeDescription
idpathintegerWebhook id Required.

Full reference, request and response samples

Send a test request with a given url and parameters

POST https://webapi.mymarketing.co.il/api/webhooks/Test
ParameterInTypeDescription
urlbodystring
formatbodyUserApiEventFormatTypesAccepts both the enum names ("json" / "form_url_encoded") and their numeric values.
is_custom_onlybodyboolean
event_typebodyTypesUserApiEventTypes
target_typebodyTypesUserApiEventTargetTypes
parametersbodyCollection of ApiEventParameterTestData

The request body is a JSON object (ApiEventTestData).

Full reference, request and response samples

This reference is based on the ActiveTrail API documentation, where you can also test each endpoint with your own API key.