Modify a webhook

POST /webhooks/{webhookId}

This endpoint modify an existing webhook. It returns the webhook object.

Path parameters

  • webhookId string Required

    Specify the ID of the webhook to modify.

application/json

Body

  • targetUrl string Required

    The URL of the webhook endpoint.

  • types array[string]

    The list of events to enable for this endpoint.

    Values are created, statusChanged, portalSubmited, dueDateChanged, portalViewed, docUploaded, docDeleted, docParsed, itemApproved, itemRejected, itemReopened, itemCancelValidation, formSubmited, emailSent, emailClicked, emailBounced, emailOpened, emailMarkedAsSpam, emailBlocked, emailUnsub, smsSent, smsDelivered, smsClicked, smsFailed, or smsUndelivered.

  • We'll call this endpoint only for this campaignId.

  • If you specify a secret token, it will be sent with the hook request in the HTTP header.

  • status string

    The status of the webhook. It can be active or paused

    Values are active or paused.

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object
    • _id string
    • status string
    • createdAt string(date-time)
    • types array[string]

      Values are created, statusChanged, portalSubmited, dueDateChanged, portalViewed, docUploaded, docDeleted, docParsed, itemApproved, itemRejected, itemReopened, itemCancelValidation, formSubmited, emailSent, emailClicked, emailBounced, emailOpened, emailMarkedAsSpam, emailBlocked, emailUnsub, smsSent, smsDelivered, smsClicked, smsFailed, or smsUndelivered.

    • We'll call this endpoint only for this campaignId.

    • If you specify a secret token, it will be sent with the hook request in the HTTP header.

  • Bad Request -- Your request is invalid.

  • Unauthorized -- Your API key is wrong.

  • Forbidden -- The object requested is hidden for administrators only.

  • Not Found -- The specified object could not be found.

  • Too Many Requests -- You're requesting too many objects! Slow down!

  • Internal Server Error -- We had a problem with our server. Try again later.

  • Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

POST /webhooks/{webhookId}
curl \
 -X POST https://api.usecollect.com/v1/webhooks/{webhookId} \
 -H "Content-Type: application/json" \
 -d '{"status":"paused"}'
Request example
{
  "status": "paused"
}
Response examples (200)
{
  "_id": "eqQkPdnqwN7J38QEx",
  "types": [
    "created",
    "statusChanged",
    "dueDateChanged"
  ],
  "status": "paused",
  "createdAt": "2022-07-13T15:01:38Z",
  "targetUrl": "https://yourserver.com/collect-hook"
}