Body
Required
-
The URL of the webhook endpoint.
-
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, orsmsUndelivered. -
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.
Responses
-
Success
-
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.
curl \
--request POST 'https://api.usecollect.com/v1/webhooks' \
--user "username:password" \
--header "Content-Type: application/json" \
--data '{"types":["created","statusChanged","dueDateChanged"],"targetUrl":"https://yourserver.com/collect-hook","campaignId":"sGyGrNPDxQDy6ZRAm"}'
{
"types": [
"created",
"statusChanged",
"dueDateChanged"
],
"targetUrl": "https://yourserver.com/collect-hook",
"campaignId": "sGyGrNPDxQDy6ZRAm"
}
{
"_id": "eqQkPdnqwN7J38QEx",
"types": [
"created",
"statusChanged",
"dueDateChanged"
],
"status": "active",
"createdAt": "2024-07-13T15:01:38Z",
"targetUrl": "https://yourserver.com/collect-hook"
}