Update a subscription
If you need to make changes to an existing webhook, you can easily do so by utilizing the PATCH {URI}/webhooks/{webhookId}
endpoint. This functionality becomes particularly useful in scenarios where you've subscribed to events with a specific endpoint but now require a modification, such as updating the endpoint URL. This flexibility ensures that your subscription remains adaptable to evolving integration requirements.
Endpoint | Purpose |
---|---|
PATCH {URI}/webhooks/{webhookId} | To update an existing subscription |
The following path parameter is used with PATCH {URI}/webhooks/{webhookId}
:
Parameter | Data type | Description |
---|---|---|
webhookId | string | (Required) The webhook identifier |
The following body parameters are used with PATCH {URI}/webhooks/{webhookId}
:
Parameter | Data type | Description |
---|---|---|
url | string | The URL of the customer's webhook listener. Must be a valid URL. |
headers | array of objects | Appropriate for the authentication method the customer wants Tango to use when calling their webhook listener |
-name | string | (Required) The name of the header |
-value | string | (Required) The value of the header |
Categories | array of objects | The categories the customer wants to subscribe to. |
eventTypes | array of objects | The event types the customer wants to subscribe to. |
signingCertificate | string | (Required) The public X509 certificate used to sign the webhook payload. The certificate must be base64 encoded. |
The following response shows an example of how to modify a webhook subscription by using PATCH {URI}/webhooks/{webhookId
}:
{
"webhookId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "string",
"headers": [
{
"name": "string",
"value": "string"
}
],
"categories": [
"string"
],
"eventTypes": [
"string"
],
"signingCertificate": "string",
"createdAt": "2024-06-13T20:06:24.565Z",
"expiresAt": "2024-06-13T20:06:24.565Z",
"updatedAt": "2024-06-13T20:06:24.565Z"
}
The following response messages are possible for this endpoint:
- 200 OK
- 400 Bad Request
- 401 Unauthorized
Updated 6 months ago