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

# Revoke a signing key of OAuth credentials

> Deletes a key of OAuth credentials at once, for when a key may have leaked: it drops out of the published set immediately rather than being kept for 30 days. Revoking never causes an outage.

Without a `kid`, revokes the key Fireblocks is signing with: signing switches to the successor, which your authorization server already holds, and a new successor is generated. A cached access token is discarded, so the next delivery fetches a new one.

With the successor's `kid`, deletes the successor and generates a new one; signing is unchanged. With the `kid` of a key rotated out by `rotate_key` and still published, deletes that key, and a cached access token is discarded as well. Keys left behind by a `signingAlg` change drop out of the published set after 5 minutes but are kept for 30 days, and can be revoked by `kid` until then. Credentials using `private_key_jwt` always keep a key to sign with.

On credentials that no longer use `private_key_jwt`, whose keys stay published for 30 days after the switch, a `kid` is required: that key is deleted and nothing is generated. The last key they hold can be revoked too, leaving an empty set.

Returns the `kid` of the key revoked, which without a `kid` in the request is the key Fireblocks was signing with. The public keys are at the `jwksUri` of the credentials: fetch them again, or register the new successor with your authorization server. Use `rotate_key` for a routine rotation, which keeps the replaced key published for 30 days.

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




## OpenAPI

````yaml https://swagger.fireblocks.com/openapi.yaml post /webhooks_settings/oauth/{webhookOauthId}/revoke_key
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/oauth/{webhookOauthId}/revoke_key:
    post:
      tags:
        - Webhooks V2
      summary: Revoke a signing key of OAuth credentials
      description: >
        Deletes a key of OAuth credentials at once, for when a key may have
        leaked: it drops out of the published set immediately rather than being
        kept for 30 days. Revoking never causes an outage.


        Without a `kid`, revokes the key Fireblocks is signing with: signing
        switches to the successor, which your authorization server already
        holds, and a new successor is generated. A cached access token is
        discarded, so the next delivery fetches a new one.


        With the successor's `kid`, deletes the successor and generates a new
        one; signing is unchanged. With the `kid` of a key rotated out by
        `rotate_key` and still published, deletes that key, and a cached access
        token is discarded as well. Keys left behind by a `signingAlg` change
        drop out of the published set after 5 minutes but are kept for 30 days,
        and can be revoked by `kid` until then. Credentials using
        `private_key_jwt` always keep a key to sign with.


        On credentials that no longer use `private_key_jwt`, whose keys stay
        published for 30 days after the switch, a `kid` is required: that key is
        deleted and nothing is generated. The last key they hold can be revoked
        too, leaving an empty set.


        Returns the `kid` of the key revoked, which without a `kid` in the
        request is the key Fireblocks was signing with. The public keys are at
        the `jwksUri` of the credentials: fetch them again, or register the new
        successor with your authorization server. Use `rotate_key` for a routine
        rotation, which keeps the replaced key published for 30 days.


        **Endpoint Permissions:** Owner, Admin, Non-Signing Admin.
      operationId: revokeWebhookOauthKey
      parameters:
        - name: webhookOauthId
          required: true
          in: path
          description: The unique identifier of the OAuth credentials
          schema:
            type: string
            example: 44fcead0-7053-4831-a53a-df7fb90d440f
            format: uuid
        - $ref: '#/components/parameters/X-Idempotency-Key'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeWebhookOauthKeyRequest'
      responses:
        '200':
          description: The key was revoked; the `kid` of the key revoked
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevokeWebhookOauthKeyResponse'
        '400':
          description: >-
            The request cannot be applied: `kid` is `null`, empty or longer than
            64 characters, or no `kid` was sent for credentials that no longer
            use `private_key_jwt`.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: >-
            No such OAuth credentials in this workspace, or they hold no key
            with this `kid`. A key already deleted, by a revoke or at the end of
            its 30 days, is not found.
          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<RevokeWebhookOauthKeyResponse>> =
            fireblocks.webhooksV2.revokeWebhookOauthKey(webhooksV2ApiRevokeWebhookOauthKeyRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<RevokeWebhookOauthKeyResponse>>
            response =
            fireblocks.webhooksV2().revokeWebhookOauthKey(webhookOauthId,
            revokeWebhookOauthKeyRequest, idempotencyKey);
        - lang: Python
          source: >-
            response =
            fireblocks.webhooks_v2.revoke_webhook_oauth_key(webhook_oauth_id,
            revoke_webhook_oauth_key_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:
    RevokeWebhookOauthKeyRequest:
      type: object
      description: >-
        Which key to revoke. Omit `kid`, or send an empty body, to revoke the
        key Fireblocks is signing with.
      properties:
        kid:
          type: string
          description: >-
            The `kid` of the key to revoke, as the JWKS at `jwksUri` lists it:
            the signing key, its successor, a key rotated out and still
            published, or a key left behind by a `signingAlg` change within its
            30 days. Omit to revoke the signing key; `null` is refused rather
            than read as omitted. Required on credentials that no longer use
            `private_key_jwt`.
          minLength: 1
          maxLength: 64
          example: a1b2c3d4e5f60718...
    RevokeWebhookOauthKeyResponse:
      type: object
      description: >-
        The key that was revoked. It is no longer published at the `jwksUri` of
        the credentials. Fetch the JWKS from there for the current public keys.
      properties:
        kid:
          type: string
          description: >-
            The `kid` of the key revoked. When the request carried no `kid`,
            this is the key Fireblocks was signing with. It is the SHA-256
            fingerprint of the public key's DER (SPKI) encoding, in lowercase
            hex.
          example: a1b2c3d4e5f60718...
      required:
        - kid
    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'

````