Sift | Docs

UpdateWebhook

Update select fields of an existing webhook.

PATCH
/api/v1/webhooks

Request Body

application/jsonRequired

The request for a call to WebhookService_UpdateWebhook to update a webhook.

webhook
Required
object

updateMask
Required
string

The list of fields to be updated. The fields available to be updated are 'target_url', 'name', 'event_type', 'payload', 'http_headers', 'archived_date'.

curl -X PATCH "<API_URL>/api/v1/webhooks" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook": {
      "webhookId": "string",
      "organizationId": "string",
      "targetUrl": "string",
      "name": "string",
      "eventType": "WEBHOOK_EVENT_TYPE_UNSPECIFIED",
      "payload": "string",
      "createdDate": "2019-08-24T14:15:22Z",
      "modifiedDate": "2019-08-24T14:15:22Z",
      "archivedDate": "2019-08-24T14:15:22Z",
      "createdByUserId": "string",
      "modifiedByUserId": "string",
      "httpHeaders": [
        {
          "name": "string",
          "value": "string"
        }
      ]
    },
    "updateMask": "string"
  }'

A successful response.

{
  "webhook": {
    "webhookId": "string",
    "organizationId": "string",
    "targetUrl": "string",
    "name": "string",
    "eventType": "WEBHOOK_EVENT_TYPE_UNSPECIFIED",
    "payload": "string",
    "createdDate": "2019-08-24T14:15:22Z",
    "modifiedDate": "2019-08-24T14:15:22Z",
    "archivedDate": "2019-08-24T14:15:22Z",
    "createdByUserId": "string",
    "modifiedByUserId": "string",
    "httpHeaders": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  }
}