> ## 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.

# Create a custom headers set

> Creates a reusable set of custom HTTP headers. Attach it to a webhook by passing the returned id as that webhook's `webhookCustomHeadersId`, to send the headers with that webhook's notifications, or to OAuth credentials as their `webhookCustomHeadersId`, to send them on the token request to your authorization server. Several webhooks and OAuth credentials may share one set, so changing it covers all of them at once. Header values are write-only and are never returned.

One set of rules applies to every use of a set, whether a webhook or OAuth credentials attach it: a value is a string or an array of strings (one header line per element), except `Cookie` and `Authorization`, which take a single string. Where Fireblocks sends its own `Authorization` header (an OAuth bearer token on a delivery, `client_secret_basic` on a token request), a custom `Authorization` header is not sent. Attaching a set checks only that it exists in your workspace.

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




## OpenAPI

````yaml https://swagger.fireblocks.com/openapi.yaml post /webhooks_settings/custom_headers
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:
    post:
      tags:
        - Webhooks V2
      summary: Create a custom headers set
      description: >
        Creates a reusable set of custom HTTP headers. Attach it to a webhook by
        passing the returned id as that webhook's `webhookCustomHeadersId`, to
        send the headers with that webhook's notifications, or to OAuth
        credentials as their `webhookCustomHeadersId`, to send them on the token
        request to your authorization server. Several webhooks and OAuth
        credentials may share one set, so changing it covers all of them at
        once. Header values are write-only and are never returned.


        One set of rules applies to every use of a set, whether a webhook or
        OAuth credentials attach it: a value is a string or an array of strings
        (one header line per element), except `Cookie` and `Authorization`,
        which take a single string. Where Fireblocks sends its own
        `Authorization` header (an OAuth bearer token on a delivery,
        `client_secret_basic` on a token request), a custom `Authorization`
        header is not sent. Attaching a set checks only that it exists in your
        workspace.


        **Endpoint Permissions:** Owner, Admin, Non-Signing Admin.
      operationId: createWebhookCustomHeaders
      parameters:
        - $ref: '#/components/parameters/X-Idempotency-Key'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookCustomHeadersRequest'
      responses:
        '201':
          description: created the custom headers set successfully
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookCustomHeadersSet'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response: Promise<FireblocksResponse<WebhookCustomHeadersSet>>
            =
            fireblocks.webhooksV2.createWebhookCustomHeaders(webhooksV2ApiCreateWebhookCustomHeadersRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<WebhookCustomHeadersSet>> response =
            fireblocks.webhooksV2().createWebhookCustomHeaders(createWebhookCustomHeadersRequest,
            idempotencyKey);
        - lang: Python
          source: >-
            response =
            fireblocks.webhooks_v2.create_webhook_custom_headers(create_webhook_custom_headers_request,
            idempotency_key);
components:
  parameters:
    X-Idempotency-Key:
      name: Idempotency-Key
      in: header
      description: >-
        A unique identifier for the request. If the request is sent multiple
        times with the same idempotency key, the server will return the same
        response as the first request. The idempotency key is valid for 24
        hours.
      required: false
      schema:
        type: string
  schemas:
    CreateWebhookCustomHeadersRequest:
      type: object
      description: >-
        A new reusable set of custom HTTP headers. Attach it to a webhook by
        passing the returned id as that webhook's `webhookCustomHeadersId`, or
        to OAuth credentials as theirs. Several webhooks and OAuth credentials
        may share one set, so changing it covers all of them at once.
      properties:
        name:
          type: string
          description: A label for this set, shown when listing them.
          example: Production gateway key
          minLength: 1
          maxLength: 128
        headers:
          $ref: '#/components/schemas/WebhookCustomHeadersMap'
      required:
        - name
        - headers
    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
    WebhookCustomHeadersMap:
      type: object
      minProperties: 1
      description: >-
        The headers, as a map of header name to value. At least one header is
        required. Values are write-only; responses return only the header names,
        lowercased.

        A value is a string, sent as one header line, or an array of strings,
        sent as one header line per element under the same name. `Cookie` and
        `Authorization` accept only a string. An empty array is rejected — leave
        the name out instead. Arrays are accepted whether the set is sent with a
        webhook's notifications or on an OAuth token request, which sends one
        header line per element in the same way.

        At most 10 headers, counted by name — an array value counts once,
        however many lines it sends. Names must be valid HTTP header tokens, are
        case-insensitive, and are at most 128 characters. A value may be empty
        and has no length limit of its own; the whole object must be under 16 KB
        when serialized as UTF-8. A value that large may still be refused by
        your own endpoint, since web servers commonly cap the whole request
        header block at around 8 KB.

        Reserved names: `Host`, `Content-Type`, `Content-Length`,
        `Transfer-Encoding`, `Connection`, `User-Agent`, `Accept`,
        `Accept-Encoding`, `Fireblocks-Signature` and
        `Fireblocks-Webhook-Signature` are set by Fireblocks and can never be
        used. The same list applies whether the set is sent with a webhook's
        notifications or on an OAuth token request.

        `Authorization` may be set. When Fireblocks sends its own
        `Authorization` header, a custom one is not sent: an OAuth bearer token
        on a webhook that has `webhookOauthId` set, and the client credentials
        on the token request of OAuth credentials that use
        `client_secret_basic`. With no OAuth credentials on a webhook, or with
        `client_secret_post`, `client_secret_jwt` or `private_key_jwt` on the
        token request, it is sent as configured.
      additionalProperties:
        description: >-
          A string, sent as one header line, or an array of strings, sent as one
          header line per element. 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
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
  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'

````