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.

EndpointPurpose
PATCH {URI}/webhooks/{webhookId}To update an existing subscription

The following path parameter is used with PATCH {URI}/webhooks/{webhookId}:

ParameterData typeDescription
webhookIdstring(Required) The webhook identifier

The following body parameters are used with PATCH {URI}/webhooks/{webhookId}:

ParameterData typeDescription
urlstringThe URL of the customer's webhook listener. Must be a valid URL.
headersarray of objectsAppropriate for the authentication method the customer wants Tango to use when calling their webhook listener
-namestring(Required) The name of the header
-valuestring(Required) The value of the header
Categoriesarray of objectsThe categories the customer wants to subscribe to.
eventTypesarray of objectsThe event types the customer wants to subscribe to.
signingCertificatestring(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

Rewards as a Service™ and the RaaS® API are provided by Tango Card, Inc. © 2024 Tango Card, Inc.