Update a subscription
Use PATCH {URI}/webhooks/{webhookId}
to update an existing webhook subscription. This flexibility ensures that your subscription remains adaptable to evolving integration requirements. PATCH is an http method used to apply partial modifications to a resource, while {URI} is a placeholder for the base URI of the API you are working with. Replace {webhookId} with the unique identifier of the webhook.
Endpoint | Purpose |
---|---|
PATCH {URI}/webhooks/{webhookId} | To update an existing subscription |
You can use this endpoint to update various properties of the webhook, such as the endpoint URL, event types, or other settings. The path parameter {webhookId} is used to specify the unique identifier of the webhook you want to update:
Parameter | Data type | Requirement | Description |
---|---|---|---|
webhookId | string | required | The webhook identifier |
When using the PATCH {URI}/webhooks/{webhookId}
endpoint to update an existing webhook, you can include various body parameters to specify the changes you want to make:
Parameter | Data type | Requirement | Description |
---|---|---|---|
url | string | - | URL to which the webhook should send events. 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. It shows the event types that the webhook should listen for. |
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 possible response codes for this endpoint are as follows. For details, see i18nkey codes and their error messages:
- 200 OK
- 400 Bad Request
- 401 Unauthorized
Updated 2 days ago