Skip to content

Update Webhook Subscription

Request

Security
Bearer
Path
subscriptionIdstring, (uuid)required
Bodyapplication/jsonrequired
eventSourceobject(EventSource)

Replacement event source scope. If provided, fully replaces the existing scope.

namestring

Human-readable display name for the subscription.

eventTypesArray of strings, non-empty

Replacement list of event types this subscription should receive. If provided, must contain at least one entry; the new list fully replaces the existing one.

isActiveboolean

Whether the subscription is active. When false, the subscription is preserved but incoming events will not be matched against it and no deliveries will be made.

urlstring, (uri)

HTTPS endpoint that Spotnana will POST event payloads to. Must use the https scheme and accept POST requests.

customHeadersobject

Replacement set of additional HTTP headers to include on every webhook request. Sending an empty map clears all existing custom headers; omitting the field leaves them unchanged. Reserved headers managed by Spotnana (such as Authorization and Content-Type) will override any values supplied here.

curl -i -X PATCH \
  'https://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions/{subscriptionId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "eventSource": {
      "scopes": [
        {
          "predicates": [
            {
              "type": "COMPANY",
              "values": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "comparator": "IN"
            }
          ]
        }
      ]
    },
    "name": "string",
    "eventTypes": [
      "TRAVELER_V2"
    ],
    "isActive": true,
    "url": "http://example.com",
    "customHeaders": {
      "headerName1": {
        "X-Custom-Header": "my-value",
        "Authorization-Extra": "token123"
      },
      "headerName2": {
        "X-Custom-Header": "my-value",
        "Authorization-Extra": "token123"
      }
    }
  }'

Responses

Webhook Subscription Updated Successfully

Response
No content