Webhook API
Update a resthook subscription
Update data of a resthook subscription.
patch/v2/resthook_subscriptions/{id}
Path parameters
idinteger required
Resthook subscription's ID.
ResthookSubscription's ID
Request body
Example request
{
"event": "document.parse.succeeded",
"organization": "mEFayXdO",
"workspace": "mEFayXdO",
"version": "v3"
}Response
Successfully updated resthook subscription data.
Example response
{
"event": "document.parse.succeeded",
"organization": {
"identifier": "mEFayXdO",
"name": "Grove Street King",
"userRole": "admin",
"avatar": "https://affinda-api.s3.amazonaws.com/media/org-avatar.png?AWSAccessKeyId=KEY&Signature=SIG",
"resthookSignatureKey": "465c6598bd34c0558f0ce256c43209d49fa85b0ff3e4c18b24e408b7563143ad"
},
"workspace": {
"identifier": "mEFayXdO",
"organization": {
"identifier": "mEFayXdO",
"name": "Grove Street King",
"userRole": "admin",
"avatar": "https://affinda-api.s3.amazonaws.com/media/org-avatar.png?AWSAccessKeyId=KEY&Signature=SIG",
"resthookSignatureKey": "465c6598bd34c0558f0ce256c43209d49fa85b0ff3e4c18b24e408b7563143ad"
}
},
"targetUrl": "https://my-site.com/receive",
"active": true,
"autoDeactivated": true,
"autoDeactivateReason": "Resthook fails after 10 retries. The last error received was: 500 - Internal server error.",
"version": "v3"
}