v3

latestOpenAPI 3.1.2Apache 2.02026-07-31231237972.0 KB
Webhooks/Webhooks

Update webhook

Updates a webhook using values specified by a webhook object passed as JSON in the POST payload. If the object does not define a specific property, its value will not be updated.

The response is the full webhook object as returned by the Get webhook endpoint.

The request needs to specify the Content-Type: application/json HTTP header!

When providing your API authentication token, we recommend using the request's Authorization header, rather than the URL. (More info).

put/v2/webhooks/{webhookId}

Path parameters

webhookIdstring required
Example:pVJtoTelgYUq4qJOt

Webhook ID.

Request body

isAdHocboolean nullable
eventTypesWebhookEventType[] nullable
ignoreSslErrorsboolean nullable
doNotRetryboolean nullable
requestUrlstring uri nullable
payloadTemplatestring nullable
headersTemplatestring nullable
descriptionstring nullable
shouldInterpolateStringsboolean nullable

Example request

{
  "eventTypes": [
    "ACTOR.RUN.SUCCEEDED"
  ],
  "condition": {
    "actorId": "hksJZtadYvn4mBuin",
    "actorTaskId": "asdLZtadYvn4mBZmm",
    "actorRunId": "hgdKZtadYvn4mBpoi"
  },
  "requestUrl": "http://example.com/",
  "payloadTemplate": "{\\n \"userId\": {{userId}}...",
  "headersTemplate": "{\\n \"Authorization\": \"Bearer ...\"}",
  "description": "this is webhook description"
}

Response

Example response

{
  "data": {
    "id": "YiKoxjkaS9gjGTqhF",
    "createdAt": "2019-12-12T07:34:14.202Z",
    "modifiedAt": "2019-12-13T08:36:13.202Z",
    "userId": "wRsJZtadYvn4mBZmm",
    "eventTypes": [
      "ACTOR.RUN.SUCCEEDED"
    ],
    "condition": {
      "actorId": "hksJZtadYvn4mBuin",
      "actorTaskId": "asdLZtadYvn4mBZmm",
      "actorRunId": "hgdKZtadYvn4mBpoi"
    },
    "requestUrl": "http://example.com/",
    "payloadTemplate": "{\\n \"userId\": {{userId}}...",
    "headersTemplate": "{\\n \"Authorization\": \"Bearer ...\"}",
    "description": "this is webhook description",
    "lastDispatch": {
      "finishedAt": "2019-12-13T08:36:13.202Z"
    },
    "stats": {
      "totalDispatches": 1
    }
  }
}