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

# Delete a custom headers set

> Deletes a custom headers set. By default the delete is refused while the set is still in use: if any webhook or OAuth credentials use it, nothing is deleted and the request fails with `409 Conflict`, naming the reason and listing the ids of the webhooks and OAuth credentials using it. This protects a shared set from being removed out from under the things that depend on it.

Pass `forceDelete=true` to delete anyway. That detaches everything using the set — it clears each webhook's and each OAuth credential set's `webhookCustomHeadersId`, it does **not** delete the webhook or the credentials — then deletes the set and returns the deleted resource together with `detachedWebhookIds` and `detachedWebhookOauthIds`. A detached webhook stops sending these headers with its notifications, and detached OAuth credentials stop sending them on the token request.

When nothing uses the set the delete succeeds either way, and both lists come back empty.

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




## OpenAPI

````yaml https://swagger.fireblocks.com/openapi.yaml delete /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}:
    delete:
      tags:
        - Webhooks V2
      summary: Delete a custom headers set
      description: >
        Deletes a custom headers set. By default the delete is refused while the
        set is still in use: if any webhook or OAuth credentials use it, nothing
        is deleted and the request fails with `409 Conflict`, naming the reason
        and listing the ids of the webhooks and OAuth credentials using it. This
        protects a shared set from being removed out from under the things that
        depend on it.


        Pass `forceDelete=true` to delete anyway. That detaches everything using
        the set — it clears each webhook's and each OAuth credential set's
        `webhookCustomHeadersId`, it does **not** delete the webhook or the
        credentials — then deletes the set and returns the deleted resource
        together with `detachedWebhookIds` and `detachedWebhookOauthIds`. A
        detached webhook stops sending these headers with its notifications, and
        detached OAuth credentials stop sending them on the token request.


        When nothing uses the set the delete succeeds either way, and both lists
        come back empty.


        **Endpoint Permissions:** Owner, Admin, Non-Signing Admin.
      operationId: deleteWebhookCustomHeaders
      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
        - name: forceDelete
          required: false
          in: query
          description: >-
            Delete the set even while webhooks or OAuth credentials still use
            it, detaching them instead of refusing. Leave it unset, or `false`,
            to get a `409 Conflict` whenever anything still uses the set.
          schema:
            type: boolean
            default: false
          example: true
      responses:
        '200':
          description: >-
            The deleted custom headers set, plus the ids of any webhooks and
            OAuth credentials that were detached from it
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteWebhookCustomHeadersResponse'
        '409':
          description: >-
            Webhooks or OAuth credentials still use this set and `forceDelete`
            was not set. Nothing was deleted. The error message names the reason
            and the ids of the webhooks and OAuth credentials using it — detach
            them, or retry with `forceDelete=true`.
          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<DeleteWebhookCustomHeadersResponse>> =
            fireblocks.webhooksV2.deleteWebhookCustomHeaders(webhooksV2ApiDeleteWebhookCustomHeadersRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<DeleteWebhookCustomHeadersResponse>>
            response =
            fireblocks.webhooksV2().deleteWebhookCustomHeaders(webhookCustomHeadersId,
            forceDelete);
        - lang: Python
          source: >-
            response =
            fireblocks.webhooks_v2.delete_webhook_custom_headers(webhook_custom_headers_id,
            force_delete);
components:
  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
  schemas:
    DeleteWebhookCustomHeadersResponse:
      description: >-
        The deleted custom headers set, plus the ids of any webhooks and OAuth
        credentials the delete detached from it. Things are only detached by
        `forceDelete=true`; without it a delete is refused with `409` while
        anything still uses the set.
      allOf:
        - $ref: '#/components/schemas/WebhookCustomHeadersSet'
        - type: object
          properties:
            detachedWebhookIds:
              type: array
              description: >-
                Webhooks whose `webhookCustomHeadersId` was cleared. The
                webhooks themselves are not deleted and keep delivering, just
                without these headers. Empty unless `forceDelete=true` detached
                something.
              items:
                type: string
                format: uuid
              example:
                - 44fcead0-7053-4831-a53a-df7fb90d440f
            detachedWebhookOauthIds:
              type: array
              description: >-
                OAuth credentials whose `webhookCustomHeadersId` was cleared.
                The credentials themselves are not deleted; their token requests
                just no longer carry these headers. Empty unless
                `forceDelete=true` detached something.
              items:
                type: string
                format: uuid
              example:
                - 55fcead0-7053-4831-a53a-df7fb90d440f
          required:
            - detachedWebhookIds
            - detachedWebhookOauthIds
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
    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
  responses:
    Error:
      description: Error Response
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSchema'

````