> ## Documentation Index
> Fetch the complete documentation index at: https://developers.fireblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a custom headers set

> Updates only the fields present in the request; anything omitted is left as it is. `headers` is merged name by name rather than replaced: a header sent with a value is added or overwritten, a header sent as `null` is deleted, and a header you omit is left alone. The change applies to every webhook and OAuth credential set that uses the set.

A change that would leave the set with no headers is refused with a `400` — delete the set instead. Where Fireblocks sends its own `Authorization` header, a custom `Authorization` header is not sent: on a webhook that has OAuth credentials attached (the OAuth bearer token), and on the token request of OAuth credentials that use `client_secret_basic`.

**Endpoint Permissions:** Owner, Admin, Non-Signing Admin.




## OpenAPI

````yaml https://swagger.fireblocks.com/openapi.yaml patch /webhooks_settings/custom_headers/{webhookCustomHeadersId}
openapi: 3.0.0
info:
  title: Fireblocks API
  description: >
    Fireblocks provides a suite of applications to manage digital asset
    operations and a complete development platform to build your business on the
    blockchain.


    - Visit our website for more information: [Fireblocks
    Website](https://fireblocks.com)

    - Visit our developer docs: [Fireblocks
    DevPortal](https://developers.fireblocks.com)
  version: 1.6.2
  contact:
    email: developers@fireblocks.com
servers:
  - url: https://api.fireblocks.io/v1
    description: Fireblocks Production Environment Base URL
  - url: https://sandbox-api.fireblocks.io/v1
    description: Fireblocks Sandbox Environment Base URL
security: []
paths:
  /webhooks_settings/custom_headers/{webhookCustomHeadersId}:
    patch:
      tags:
        - Webhooks V2
      summary: Update a custom headers set
      description: >
        Updates only the fields present in the request; anything omitted is left
        as it is. `headers` is merged name by name rather than replaced: a
        header sent with a value is added or overwritten, a header sent as
        `null` is deleted, and a header you omit is left alone. The change
        applies to every webhook and OAuth credential set that uses the set.


        A change that would leave the set with no headers is refused with a
        `400` — delete the set instead. Where Fireblocks sends its own
        `Authorization` header, a custom `Authorization` header is not sent: on
        a webhook that has OAuth credentials attached (the OAuth bearer token),
        and on the token request of OAuth credentials that use
        `client_secret_basic`.


        **Endpoint Permissions:** Owner, Admin, Non-Signing Admin.
      operationId: updateWebhookCustomHeaders
      parameters:
        - name: webhookCustomHeadersId
          required: true
          in: path
          description: The unique identifier of the custom headers set
          schema:
            type: string
            example: 44fcead0-7053-4831-a53a-df7fb90d440f
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookCustomHeadersRequest'
      responses:
        '200':
          description: Updated custom headers set
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookCustomHeadersSet'
        '400':
          description: >-
            Neither `name` nor `headers` was provided, so there is nothing to
            change, or the change was refused: it would leave the set with no
            headers, or a header breaks the rules for header names and values.
            Nothing was changed.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response: Promise<FireblocksResponse<WebhookCustomHeadersSet>>
            =
            fireblocks.webhooksV2.updateWebhookCustomHeaders(webhooksV2ApiUpdateWebhookCustomHeadersRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<WebhookCustomHeadersSet>> response =
            fireblocks.webhooksV2().updateWebhookCustomHeaders(updateWebhookCustomHeadersRequest,
            webhookCustomHeadersId);
        - lang: Python
          source: >-
            response =
            fireblocks.webhooks_v2.update_webhook_custom_headers(update_webhook_custom_headers_request,
            webhook_custom_headers_id);
components:
  schemas:
    UpdateWebhookCustomHeadersRequest:
      type: object
      description: >-
        A partial update. Every field is optional and an omitted field is left
        as it is. A change to `headers` applies to every webhook and OAuth
        credential set using the set.
      properties:
        name:
          type: string
          description: A label for this set. Omit to leave it unchanged.
          example: Production gateway key
          minLength: 1
          maxLength: 128
        headers:
          $ref: '#/components/schemas/WebhookCustomHeadersMapUpdate'
    WebhookCustomHeadersSet:
      type: object
      description: >-
        A stored set of custom HTTP headers, referenced by webhooks and by OAuth
        credentials through their `webhookCustomHeadersId`. On a webhook the
        headers go out with every notification; on OAuth credentials they go out
        on the token request to your authorization server. Header values are
        write-only: only the names are returned.
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The id of the custom headers set. Pass this as a webhook's, or OAuth
            credentials', `webhookCustomHeadersId` to attach it.
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          description: The label given to this set.
          example: Production gateway key
        headerNames:
          type: array
          description: >-
            Names of the headers in the set, lowercased. Header values are never
            returned.
          items:
            type: string
          example:
            - x-gateway-key
            - x-region-tag
        createdAt:
          type: integer
          format: int64
          description: The date and time the set was created, in milliseconds.
          example: 1625097600000
        updatedAt:
          type: integer
          format: int64
          description: The date and time the set was last updated, in milliseconds.
          example: 1625097600000
      required:
        - id
        - name
        - headerNames
        - createdAt
        - updatedAt
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
    WebhookCustomHeadersMapUpdate:
      type: object
      description: >-
        A delta applied to the headers. A header with a value is added or
        replaced, a header with `null` is deleted, and one you leave out is
        untouched. A value replaces what is stored under that name rather than
        adding to it, so an array is the complete new set of lines for that
        header. Names are case-insensitive, so a `null` under one casing deletes
        a header stored under another, and names are stored and returned
        lowercased.

        The set cannot be emptied: a change that would leave no headers is
        refused with a `400`. To remove the set, delete it. The whole field
        cannot be `null`.

        Same rules as on create: a string or a non-empty array, `Cookie` and
        `Authorization` string-only, 10 headers and under 16 KB in the resulting
        set, the same reserved names (see the create request) never allowed, and
        values write-only. Entries set to `null` do not count towards the limit.

        The change applies to everything already using the set. Where Fireblocks
        sends its own `Authorization` header, a custom `Authorization` header is
        not sent: on a webhook that has `webhookOauthId` set (an OAuth bearer
        token), and on the token request of OAuth credentials that use
        `client_secret_basic`.
      additionalProperties:
        description: >-
          A string, sent as one header line, or an array of strings, sent as one
          header line per element, or `null` to delete the header. A string may
          be empty. A value must not contain control characters. An array must
          not be empty and is not accepted for `Cookie` or `Authorization`.
        example: abc123
      example:
        X-Gateway-Key: abc123
        X-Forwarded-For:
          - 203.0.113.7
          - 198.51.100.4
        X-Region-Tag: null
  headers:
    X-Request-ID:
      schema:
        type: string
      description: >-
        Unique ID correlated to the API request. Please provide it in any
        support ticket you create or on Github issues related to Fireblocks SDKs
  responses:
    Error:
      description: Error Response
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSchema'

````