For more information on using API

POST https://webapi.mymarketing.co.il/api/webhooks

Create a new Webhook

Request Information

URI Parameters

Body Parameters

UserApiEventCreate

Name

Description

Type

Additional information

parameters

Collection of ParametersDetailsUpdate
name

The name of the web-hook

string

Required

url

The url that the web hook will call

string
event_type

Event type

is_active

Is this web-hook active or not

boolean
stateid

Web hook state (deprecated - please use the is_active flag)

Request Formats

application/json, text/json

Sample:
{
  "parameters": [
    {
      "key": "sample string 1",
      "value": "sample string 2",
      "event_parameter_type": "header"
    },
    {
      "key": "sample string 1",
      "value": "sample string 2",
      "event_parameter_type": "header"
    }
  ],
  "name": "sample string 1",
  "url": "sample string 2",
  "event_type": "contact_change",
  "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>
  <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>
      <key>sample string 1</key>
      <value>sample string 2</value>
    </ParametersDetailsUpdate>
    <ParametersDetailsUpdate>
      <event_parameter_type>header</event_parameter_type>
      <key>sample string 1</key>
      <value>sample string 2</value>
    </ParametersDetailsUpdate>
  </parameters>
</UserApiEventCreate>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

UserApiEventInfo

Name

Description

Type

Additional information

id

integer
parameters

Collection of ParametersDetailsInfo
name

The name of the web-hook

string

Required

url

The url that the web hook will call

string
event_type

Event type

is_active

Is this web-hook active or not

boolean
stateid

Web hook state (deprecated - please use the is_active flag)

Response Formats

application/json, text/json

Sample:
{
  "id": 1,
  "parameters": [
    {
      "id": 1,
      "key": "sample string 2",
      "value": "sample string 3",
      "event_parameter_type": "header"
    },
    {
      "id": 1,
      "key": "sample string 2",
      "value": "sample string 3",
      "event_parameter_type": "header"
    }
  ],
  "name": "sample string 2",
  "url": "sample string 3",
  "event_type": "contact_change",
  "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>
  <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>
      <key>sample string 2</key>
      <value>sample string 3</value>
      <id>1</id>
    </ParametersDetailsInfo>
    <ParametersDetailsInfo>
      <event_parameter_type>header</event_parameter_type>
      <key>sample string 2</key>
      <value>sample string 3</value>
      <id>1</id>
    </ParametersDetailsInfo>
  </parameters>
</UserApiEventInfo>