# Update Webhook Subscription

Endpoint: PATCH /v3/webhooks/subscriptions/{subscriptionId}
Version: v3
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer

## Path parameters:

  - `subscriptionId` (string, required)

## Request fields (application/json):

  - `eventSource` (object)
    Replacement event source scope. If provided, fully replaces the existing scope.

  - `eventSource.scopes` (array, required)
    List of scopes evaluated with OR logic. An event matches if at least one scope
is satisfied.

  - `eventSource.scopes.predicates` (array, required)
    List of predicates that must all be satisfied for this scope to match.

  - `eventSource.scopes.predicates.type` (string, required)
    The type of event source entity.
    Enum: "COMPANY", "BOOKING_TMC", "CONTRACTING_TMC"

  - `eventSource.scopes.predicates.values` (array, required)
    List of entity IDs to match against.

  - `eventSource.scopes.predicates.comparator` (string)
    Comparator for evaluation. Defaults to `IN`.
    Enum: "IN"

  - `name` (string)
    Human-readable display name for the subscription.

  - `eventTypes` (array)
    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.

  - `isActive` (boolean)
    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.

  - `url` (string)
    HTTPS endpoint that Spotnana will POST event payloads to. Must use the `https`
scheme and accept `POST` requests.

  - `customHeaders` (object)
    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.

## Response 200:

  - `200` (unknown)
    Webhook Subscription Updated Successfully

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `debugIdentifier` (string)
    Link to debug the error internally.

  - `errorMessages` (array)

  - `errorMessages.errorCode` (string)
    Error code to identify the specific errors.

  - `errorMessages.message` (string)
    Message containing details of error.

  - `errorMessages.errorParameters` (array)
    Error message parameters.

  - `errorMessages.errorParameters.name` (string)
    Parameter name

  - `errorMessages.errorParameters.value` (string)
    Parameter value

  - `errorMessages.errorDetail` (string)
    More details about the error.

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `debugIdentifier` (string)
    Link to debug the error internally.

  - `errorMessages` (array)

  - `errorMessages.errorCode` (string)
    Error code to identify the specific errors.

  - `errorMessages.message` (string)
    Message containing details of error.

  - `errorMessages.errorParameters` (array)
    Error message parameters.

  - `errorMessages.errorParameters.name` (string)
    Parameter name

  - `errorMessages.errorParameters.value` (string)
    Parameter value

  - `errorMessages.errorDetail` (string)
    More details about the error.

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `debugIdentifier` (string)
    Link to debug the error internally.

  - `errorMessages` (array)

  - `errorMessages.errorCode` (string)
    Error code to identify the specific errors.

  - `errorMessages.message` (string)
    Message containing details of error.

  - `errorMessages.errorParameters` (array)
    Error message parameters.

  - `errorMessages.errorParameters.name` (string)
    Parameter name

  - `errorMessages.errorParameters.value` (string)
    Parameter value

  - `errorMessages.errorDetail` (string)
    More details about the error.

## Response 404:

  - `404` (unknown)
    The specified resource was not found.

## Response 404 fields (application/json):

  - `debugIdentifier` (string)
    Link to debug the error internally.

  - `errorMessages` (array)

  - `errorMessages.errorCode` (string)
    Error code to identify the specific errors.

  - `errorMessages.message` (string)
    Message containing details of error.

  - `errorMessages.errorParameters` (array)
    Error message parameters.

  - `errorMessages.errorParameters.name` (string)
    Parameter name

  - `errorMessages.errorParameters.value` (string)
    Parameter value

  - `errorMessages.errorDetail` (string)
    More details about the error.

