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

# Update a credential

> Partially updates a credential owned by the authenticated integrator: `label`, `active`, and
`accessScope` can each be changed independently; omitted fields are left untouched. The
credential signing the current request can only change its own label, not its own `active`
status or access scope, so an integrator always keeps one working read-write credential.
Requires a read-write credential.



## OpenAPI

````yaml /api-reference/openapi-integrator.json patch /v1/integrator/credentials/{pubkey}
openapi: 3.0.3
info:
  title: Byzantine Integrator API
  description: Byzantine REST API for integrators.
  license:
    name: ''
  version: 0.2.0
servers:
  - url: https://sandbox.api.byzantine.fi
    description: Sandbox
security: []
tags:
  - name: API health
    description: Check API status.
  - name: Customer management
    description: Endpoints to create, update, and retrieve customer information.
  - name: Account management
    description: Endpoints to manage accounts, bank accounts, invitations, and user roles.
  - name: Products
    description: Endpoints to get data about products and vaults.
  - name: Transactions
    description: Endpoints to create and manage transactions.
  - name: OTP authentication
    description: Endpoints to initialize and manage user authentication with OTP.
  - name: Webhooks
    description: Integrator-managed outbound webhook subscriptions and delivery history.
  - name: Integrator key management
    description: >-
      Endpoints to inspect the current integrator credential scope, create,
      update and delete integrator keys.
paths:
  /v1/integrator/credentials/{pubkey}:
    patch:
      tags:
        - Integrator key management
      summary: Update a credential
      description: >-
        Partially updates a credential owned by the authenticated integrator:
        `label`, `active`, and

        `accessScope` can each be changed independently; omitted fields are left
        untouched. The

        credential signing the current request can only change its own label,
        not its own `active`

        status or access scope, so an integrator always keeps one working
        read-write credential.

        Requires a read-write credential.
      operationId: update_credential
      parameters:
        - name: X-Pubkey
          in: header
          description: >-
            Integrator's ECDSA public key (P-256 curve, compressed SEC1 format).
            Example:
            0x038fedef7c12f93bbf342ad8943b7a825a3b41f61c9dc118b2c718efebabbf62fd
          required: true
          schema:
            type: string
        - name: X-Timestamp
          in: header
          description: >-
            Unix timestamp in seconds (UTC). Must be within tolerance window (1
            minute) to prevent replay attacks. Example: 1760375826
          required: true
          schema:
            type: string
        - name: X-Signature
          in: header
          description: >-
            ECDSA signature (DER-encoded, hex with 0x prefix). Signs the
            message: {timestamp}{METHOD}{path_and_query}{json_body}. Example:
            0x3045022100...
          required: true
          schema:
            type: string
        - name: pubkey
          in: path
          description: Public key of the credential
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCredentialPayload'
        required: true
      responses:
        '200':
          description: Credential updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialSummaryResponse'
        '400':
          description: >-
            Bad request - Empty update or credential demoting/deactivating
            itself
        '401':
          description: Unauthorized - Invalid credential or signature
        '403':
          description: Forbidden - Read-only credentials cannot edit credentials
        '404':
          description: Credential not found for this integrator
        '500':
          description: Internal server error
      security:
        - integrator_auth: []
components:
  schemas:
    UpdateCredentialPayload:
      type: object
      properties:
        accessScope:
          allOf:
            - $ref: '#/components/schemas/IntegratorAccessScope'
          nullable: true
        active:
          type: boolean
          description: New active status for the credential. Left untouched when omitted.
          nullable: true
        label:
          type: string
          description: New label for the credential. Left untouched when omitted.
          nullable: true
    CredentialSummaryResponse:
      type: object
      required:
        - pubkey
        - integratorId
        - accessScope
        - active
      properties:
        pubkey:
          type: string
          description: Public key identifying the credential.
        integratorId:
          $ref: '#/components/schemas/Uuid'
        accessScope:
          $ref: '#/components/schemas/IntegratorAccessScope'
        active:
          type: boolean
          description: Whether the credential is active.
        label:
          type: string
          description: Label of the credential.
          nullable: true
    IntegratorAccessScope:
      type: string
      enum:
        - read_write
        - read_only
      example: read_write
    Uuid:
      type: string
      format: uuid
      description: A UUID string
      example: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    integrator_auth:
      type: apiKey
      in: header
      name: X-Pubkey, X-Timestamp, X-Signature

````