POST https://webapi.mymarketing.co.il/api/webhooks
Create a new Webhook
Request Information
URI Parameters
Body Parameters
Name
Description
Type
Additional information
name
The name of the web-hook
string
Required
url
The url that the web hook will call
string
is_active
Is this web-hook active or not
boolean
Request Formats
application/json, text/json
Sample:
{
"parameters": [
{
"key": "sample string 1",
"value": "sample string 2",
"event_value_type": "custom_text",
"user_field": "sample string 3",
"event_parameter_type": "header"
},
{
"key": "sample string 1",
"value": "sample string 2",
"event_value_type": "custom_text",
"user_field": "sample string 3",
"event_parameter_type": "header"
}
],
"name": "sample string 1",
"url": "sample string 2",
"event_type": "contact_change",
"format": "json",
"is_active": true,
"stateid": 5
}
application/xml, text/xml
Sample:
<UserApiEventCreate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models">
<event_type>contact_change</event_type>
<format>json</format>
<is_active>true</is_active>
<name>sample string 1</name>
<stateid>Untitled</stateid>
<url>sample string 2</url>
<parameters>
<ParametersDetailsUpdate>
<event_parameter_type>header</event_parameter_type>
<event_value_type>custom_text</event_value_type>
<key>sample string 1</key>
<user_field>sample string 3</user_field>
<value>sample string 2</value>
</ParametersDetailsUpdate>
<ParametersDetailsUpdate>
<event_parameter_type>header</event_parameter_type>
<event_value_type>custom_text</event_value_type>
<key>sample string 1</key>
<user_field>sample string 3</user_field>
<value>sample string 2</value>
</ParametersDetailsUpdate>
</parameters>
</UserApiEventCreate>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Name
Description
Type
Additional information
id
integer
name
The name of the web-hook
string
Required
url
The url that the web hook will call
string
is_active
Is this web-hook active or not
boolean
Response Formats
application/json, text/json
Sample:
{
"id": 1,
"parameters": [
{
"id": 1,
"key": "sample string 2",
"value": "sample string 3",
"event_value_type": "custom_text",
"user_field": "sample string 4",
"event_parameter_type": "header"
},
{
"id": 1,
"key": "sample string 2",
"value": "sample string 3",
"event_value_type": "custom_text",
"user_field": "sample string 4",
"event_parameter_type": "header"
}
],
"name": "sample string 2",
"url": "sample string 3",
"event_type": "contact_change",
"format": "json",
"is_active": true,
"stateid": 5
}
application/xml, text/xml
Sample:
<UserApiEventInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models">
<event_type>contact_change</event_type>
<format>json</format>
<is_active>true</is_active>
<name>sample string 2</name>
<stateid>Untitled</stateid>
<url>sample string 3</url>
<id>1</id>
<parameters>
<ParametersDetailsInfo>
<event_parameter_type>header</event_parameter_type>
<event_value_type>custom_text</event_value_type>
<key>sample string 2</key>
<user_field>sample string 4</user_field>
<value>sample string 3</value>
<id>1</id>
</ParametersDetailsInfo>
<ParametersDetailsInfo>
<event_parameter_type>header</event_parameter_type>
<event_value_type>custom_text</event_value_type>
<key>sample string 2</key>
<user_field>sample string 4</user_field>
<value>sample string 3</value>
<id>1</id>
</ParametersDetailsInfo>
</parameters>
</UserApiEventInfo>