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
| Method | Endpoint | What it does |
|---|---|---|
GET | /api/ | Get account's Webhooks information |
GET | /api/ | Get the Webhook of a given id |
POST | /api/ | Create a new Webhook |
PUT | /api/ | Update a Webhook |
DELETE | /api/ | Delete a Webhook by a given id |
GET | /api/ | Get the Webhook Parameters for a given webhook id |
POST | /api/ | Add a parameter to a webhook, sent as a header or in the request body |
PUT | /api/ | Update a given Webhook Parameter |
DELETE | /api/ | Delete a given Webhook Parameter |
POST | /api/ | Send a test request for a given Webhook |
POST | /api/ | Send a test request with a given url and parameters |
Endpoint details
Get account's Webhooks information
GET https://webapi.mymarketing.co.il/api/webhooks
| Parameter | In | Type | Description |
|---|---|---|---|
eventType | query | TypesUserApiEventTypes | |
stateType | query | TypesStateTypes | |
targetType | query | TypesUserApiEventTargetTypes | |
is_ignore_parameters | query | boolean |
Full reference, request and response samples
Get the Webhook of a given id
GET https://webapi.mymarketing.co.il/api/webhooks/{id}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Webhook 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
| Parameter | In | Type | Description |
|---|---|---|---|
parameters | body | Collection of ParametersDetailsUpdate | |
name | body | string | The name of the web-hook Required. |
url | body | string | The url that the web hook will call |
event_type | body | TypesUserApiEventTypes | Event type |
format | body | UserApiEventFormatTypes | Web hook format |
is_active | body | boolean | Is this web-hook active or not |
is_custom_only | body | boolean | Whether this webhook fires only for custom events |
stateid | body | TypesStateTypes | Web 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Webhook id. Can be found using the endpoint "Get account's Webhooks information" Required. |
name | body | string | The name of the web-hook Required. |
url | body | string | The url that the web hook will call |
event_type | body | TypesUserApiEventTypes | Event type |
format | body | UserApiEventFormatTypes | Web hook format |
is_active | body | boolean | Is this web-hook active or not |
is_custom_only | body | boolean | Whether this webhook fires only for custom events |
stateid | body | TypesStateTypes | Web 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Webhook 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Webhook 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Required. |
key | body | string | The parameter's name. |
value | body | string | The parameter's value. |
event_value_type | body | UserApiEventValueTypes | Value of parameter |
user_field | body | string | Value of parameter |
event_parameter_type | body | TypesUserApiEventsParameterTypes | Where 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Webhook id Required. |
parameterid | path | integer | Webhook parameter id Required. |
key | body | string | The parameter's name. |
value | body | string | The parameter's value. |
event_value_type | body | UserApiEventValueTypes | Value of parameter |
user_field | body | string | Value of parameter |
event_parameter_type | body | TypesUserApiEventsParameterTypes | Where 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}
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Webhook id Required. |
parameterid | path | integer | Webhook 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
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | integer | Webhook 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
| Parameter | In | Type | Description |
|---|---|---|---|
url | body | string | |
format | body | UserApiEventFormatTypes | Accepts both the enum names ("json" / "form_url_encoded") and their numeric values. |
is_custom_only | body | boolean | |
event_type | body | TypesUserApiEventTypes | |
target_type | body | TypesUserApiEventTargetTypes | |
parameters | body | Collection 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.