> ## 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 API key callback handler

> Update the callback handler of an API key
Endpoint Permission: Admin and Non-Signing Admin.



## OpenAPI

````yaml https://docs.fireblocks.com/api/v1/swagger.yaml patch /cosigners/{cosignerId}/api_keys/{apiKeyId}
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:
  /cosigners/{cosignerId}/api_keys/{apiKeyId}:
    patch:
      tags:
        - Cosigners (Beta)
      summary: Update API key callback handler
      description: |-
        Update the callback handler of an API key
        Endpoint Permission: Admin and Non-Signing Admin.
      operationId: updateCallbackHandler
      parameters:
        - name: cosignerId
          required: true
          in: path
          description: The unique identifier of the cosigner
          example: 44fcead0-7053-4831-a53a-df7fb90d440f
          schema:
            type: string
            format: uuid
        - name: apiKeyId
          required: true
          in: path
          description: The unique identifier of the API key
          example: 44fcead0-7053-4831-a53a-df7fb90d440f
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCallbackHandlerRequest'
      responses:
        '202':
          description: The API key object with the new callback handler
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
            Location:
              $ref: '#/components/headers/Location'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCallbackHandlerResponse'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response:
            Promise<FireblocksResponse<UpdateCallbackHandlerResponse>> =
            fireblocks.cosignersBeta.updateCallbackHandler(cosignersBetaApiUpdateCallbackHandlerRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<UpdateCallbackHandlerResponse>>
            response =
            fireblocks.cosignersBeta().updateCallbackHandler(updateCallbackHandlerRequest,
            cosignerId, apiKeyId);
        - lang: Python
          source: >-
            response =
            fireblocks.cosigners_beta.update_callback_handler(update_callback_handler_request,
            cosigner_id, api_key_id);
components:
  schemas:
    UpdateCallbackHandlerRequest:
      type: object
      properties:
        callbackHandler:
          $ref: '#/components/schemas/CallbackHandlerRequest'
    UpdateCallbackHandlerResponse:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the API key
          example: 44fcead0-7053-4831-a53a-df7fb90d440f
          format: uuid
        callbackHandler:
          $ref: '#/components/schemas/CallbackHandlerRequest'
      required:
        - id
    CallbackHandlerRequest:
      type: object
      properties:
        url:
          type: string
          description: The callback handler's URL
          example: https://example.com/callback-handler
        publicKey:
          type: string
          description: The callback handler's public key
          example: |-
            -----BEGIN PUBLIC KEY-----
            ... truncated ...-----END PUBLIC KEY-----
        cert:
          type: string
          description: The callback handler's certificate
          example: |-
            -----BEGIN CERTIFICATE-----
            ... truncated ...
            -----END CERTIFICATE-----
      required:
        - url
    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
    Location:
      schema:
        type: string
      description: The location URL of the request status
  responses:
    Error:
      description: Error Response
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSchema'

````