Webhook

Create a webhook

Subscribes a URL to events and answers 201 with the webhook. url, events and insecure_ssl are required. Set signature to have deliveries signed.

post/entities/Webhooks

Request

Query parameters

validation-levelinteger

Bit mask that relaxes validation on this write. 0 (the default) validates everything. Bits: 2 skip unchanged fields, 4 skip admin-defined validations, 8 allow read-only fields, 16 skip relation checks, 32 skip value checks, 64 skip invalid recalculations, 128 skip step-checklist gates, 256 add conditional field requirements, 512 skip uniqueness checks. Add bits together (20 = 4 + 16); member names and comma lists such as 4,16 work too. A value with an internal-only bit is refused with HTTP 400, code 117.

Request body

modifiedstring date-time

Last modification time.

createdstring date-time

Creation time.

insecure_sslboolean required

If True, remote side ssl certificate will not be validated when delivering notifications.

optionsobject

Params in REST API format (snake case), to modify the content of the WebHook. You can set "entity" options of the main entity on which the event occurs. E.g. Account for events like Account.Create, Account.Update, Account.Delete. For events with a secondary related entity you can also options under key "related_entity". E.g. for Account.LinkedDocument event, the "expand" option of CloudObject(Document) can be set under "related_entity" key. Filter follows REST API conventions: https://developers.coevera.com/reference/rest/ In addition, to REST params, you can conditionally trigger webhook only when specified fields will change. You can use "on-field-change" param and provide a list of api names on which this change will listen. The "on-field-change" option is available for Account, Appointment, Task, Contact, Opportunity, Lead, Product Line Item, Project, Quote and Custom Entity.

Suppressing Webhooks You can specify list of strings under "skip_keys" key in options. Whenever you make an API request with header "Webhook-Skip-Key" equal to any of the specified skip keys, the Webhook will not be triggered. This can prevent a Webhook loop.

Example: { "entity": { "Contact": { "expand": [ "primary_account", "primary_contact", "task_relations.task" ], "load-only": [ "id", "primary_account", "primary_contact.first_name", "task_relations.task" ], "filter": { "email1": ["test@example.com", "test@example.net"], "email2": "test@example.com" }, "filter-op": {"email1": "eq"}, # optional, default operator is eq "on-field-change": ["email1"] }, "Account": { "filter": { "owner_id": ["9900cce6-bcd6-412a-bcd1-1904556c949a"] } } }, "related_entity": {"expand": ["contact"], "load-only": ["id", "contact"]}, "skip_keys": ["gmail_sync", "custom_integration"], "chunk_size": 100, // defines the size of the chunk, default is 100, max is 100. "chunk_delay": 300, // each chunk will be delayed by N * chunk_delay seconds, where N is index of chunk, default is 0. "custom_entity_api_name": ["CE_Name1", "CE_Name2"] // in case of triggered custom entity, this will execute webhooks only for specified ones within the list. Default are all custom entity types. }

signaturestring uuid

Signature to verify webhook (has to be UUID). When signature is set, then all webhook requests will be signed using HMAC-SHA256. This signature will be used as key and request body as message. Signature will be located in "WebHook-Signature" header.

urlstring required

Target URL that webhook event payloads are POSTed to.

eventsstring[] required

Event types this webhook subscribes to (e.g. Account.Create, Lead.Update). At least one event is required; the webhook fires whenever any subscribed event occurs in the team space.

Example request

{
  "modified": "2019-01-01T00:00:00",
  "created": "2019-01-01T00:00:00",
  "signature": "01234567-abcd-dcba-ffff-000000000000",
  "url": "string",
  "events": [
    "*"
  ]
}

Response

The created Webhook record.

successboolean

True when the request succeeded; false on error.

Example response

{
  "success": true,
  "data": {
    "id": "01234567-abcd-dcba-ffff-000000000000",
    "modified": "2019-01-01T00:00:00",
    "created": "2019-01-01T00:00:00",
    "application_id": "01234567-abcd-dcba-ffff-000000000000",
    "client_id": "01234567-abcd-dcba-ffff-000000000000",
    "signature": "01234567-abcd-dcba-ffff-000000000000",
    "url": "string",
    "events": [
      "*"
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.