Create a new Webhook
POST {{baseUrl}}/webhooks
Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - event_action
and event_object
. E.g., use *.*
for getting notifications about all events, added.deal
for any newly added deals, deleted.persons
for any deleted persons, etc. See the guide for Webhooks for more details.
Request Body
{"subscription_url"=>"<string>", "event_action"=>"<string>", "event_object"=>"<string>", "user_id"=>"<integer>", "http_auth_user"=>"<string>", "http_auth_password"=>"<string>", "version"=>"1.0"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"status":"ok","success":true,"data":{"id":1,"company_id":1,"owner_id":1,"user_id":1,"event_action":"added","event_object":"activityType","subscription_url":"http://example.org","version":"1.0","is_active":1,"add_time":"2019-10-25T08:25:27.000Z","remove_time":null,"type":"general","http_auth_user":null,"http_auth_password":null,"additional_data":{},"remove_reason":null,"last_delivery_time":null,"last_http_status":null,"admin_id":1}}