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

# Enable or disable a credential

> Pause or resume token issuance for a credential without deleting it.

**Requires scope:** `manage:credentials` — see [Required scopes](/getting-started/authentication#required-scopes-finance-api).

Sets the credential to `ACTIVE` or `DISABLED`. Disabling is a pause, not a delete: the credential keeps its `clientId`, secret and history and simply stops issuing tokens. Re-enabling restores it unchanged.

<Warning>If Venly provisioned more than one credential for your company before this endpoint existed, disabling one is **final** — at most one may be active, and restoring a disabled one needs Venly. If a secret is compromised, [rotate](/api-reference/Finance-API/api-credentials/rotate-a-credentials-secret) rather than disable.</Warning>

## Errors

| HTTP | `code` | When |
| - | - | - |
| `400` | *(validation)* | `status` missing or not `ACTIVE` / `DISABLED` |
| `404` | `credential-not-found` | unknown `clientId`, or one belonging to another company |
| `409` | `credential-limit-exceeded` | setting `ACTIVE` while another credential is already active |
| `503` | `keycloak-unavailable` | the identity provider was unreachable; retry |


## OpenAPI

````yaml api-reference/Finance-API-Specs.yaml PUT /api-credentials/{clientId}/status
openapi: 3.1.0
info:
  title: Venly Finance API
  description: >
    REST API for the Venly Finance platform:

    - Party management (Individuals & Organisations)

    - Identity verification — hosted KYC/KYB links and Sumsub share-token
    forwarding

    - Account management with party association

    - Wallet balances & token allowances on supported chains

    - Virtual bank accounts for global pay-in (EUR SEPA, USD ACH/WIRE/RTP/SWIFT)

    - Fiat-to-crypto payment sessions (pay-in)

    - Bank pay-outs — beneficiary allow-listing, routes, and PULL/PUSH pay-outs

    - Account-to-account fiat & crypto transfers

    - EIP-2612 permits and allowances

    - Webhook registration for asynchronous event delivery


    ## Authentication


    All endpoints use OAuth2 client credentials. Obtain a token first, then
    include it in every request:


    **Step 1 — Get a token:**

    ```bash

    curl -X POST
    https://login.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
    \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "grant_type=client_credentials&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}"
    ```


    **Step 2 — Use the token:**

    ```

    Authorization: Bearer {access_token}

    ```


    Tokens expire after **5 minutes**. Implement refresh logic in your client.


    ## Selecting a tenant


    A token that grants more than one tenant must say which one each request is
    for, in the

    `x-tenant-id` header. With a single-tenant token, omit it. Any value you
    send must exactly match a

    tenant the token grants; a missing, malformed or foreign value is answered
    with a generic

    `403 forbidden` that reveals nothing about which tenants exist. Send the
    header at most once.


    ## Request correlation


    Every response — including `401` and `403` — carries an `X-Correlation-Id`
    header identifying the

    operation in our logs. Quote it in a support request. You may supply your
    own, as

    `X-Correlation-Id` or (as a fallback) `X-Request-Id`, matching
    `^[A-Za-z0-9_.:-]{1,64}$`. A value

    outside that shape is replaced with a generated one rather than rejected.
  version: 1.10.0
  contact:
    name: Venly Support
    email: support@venly.io
    url: https://docs.venlyfinance.com
  license:
    name: Proprietary
  x-logo:
    url: https://venlyfinance.com/logo.png
  x-security-contact: security@venly.io
servers:
  - url: https://api.venlyfinance.com/v1
    description: Production
  - url: https://api-staging.venlyfinance.com/v1
    description: Staging
security:
  - OAuth2: []
tags:
  - name: Parties
    description: Party management (Individuals & Organisations)
  - name: Accounts
    description: Account management, party-role associations
  - name: Wallets
    description: Blockchain wallet balances
  - name: Virtual Bank Accounts
    description: Virtual bank account payment references for global payments
  - name: Fiat-to-crypto Payment Sessions
    description: >-
      Hosted fiat-to-crypto pay-in sessions. **Coming soon** — not yet enabled;
      use a virtual bank account to receive fiat today.
  - name: Payout Bank Accounts
    description: Allow-listing beneficiary bank accounts as pay-out destinations
  - name: Payout Routes
    description: >-
      Account-scoped routes pairing a beneficiary bank account with a crypto
      deposit asset
  - name: Payouts
    description: Crypto-to-fiat pay-outs over a registered route
  - name: Transfers
    description: Fiat and crypto transfer operations between accounts
  - name: Permits
    description: EIP-712 permit signature management for token approvals
  - name: Supported Assets
    description: >-
      Discover which chains and assets your tenant can settle in, and whether an
      account can use them yet.
  - name: Allowances
    description: Token allowance management for wallets
  - name: Webhooks
    description: Webhook registration, delivery testing and delivery history
  - name: Pay-Ins
    description: >-
      The pay-in ledger — every fiat credit that settled (or failed to settle)
      into an account wallet
  - name: Billing
    description: The invoices Venly has issued to your company
  - name: API Credentials
    description: Self-service management of your company's OAuth client credentials
  - name: Company
    description: Your own company profile
paths:
  /api-credentials/{clientId}/status:
    parameters:
      - $ref: '#/components/parameters/TenantId'
    put:
      tags:
        - API Credentials
      summary: Enable or disable a credential
      description: >
        **Requires scope:** `manage:credentials`


        Sets the credential to `ACTIVE` or `DISABLED`.


        Disabling is **not** a delete, and no delete is offered: the credential
        keeps its `clientId`,

        its roles and its history, and simply stops issuing tokens. It still
        appears in the listing, as

        `DISABLED`.


        Setting `ACTIVE` again restores token issuance with the same `clientId`
        and the same secret —

        provided no other credential of yours is active. At most one credential
        may be active, so

        re-enabling is refused with `credential-limit-exceeded` while another
        still is. If your company

        holds a single credential, which is the norm, this never applies.


        It applies only if your company holds more than one credential —
        possible where Venly

        provisioned them before this endpoint existed. **For such a company,
        disabling is final**: it is

        how the company converges on a single credential, and restoring a
        disabled one requires Venly.


        Disabling does **not** free your credential slot, so it is a pause, not
        a way to make room for a

        replacement. If the secret is compromised, rotate instead: that
        invalidates the old secret

        immediately and keeps the credential usable.
      operationId: updateApiCredentialStatus
      parameters:
        - $ref: '#/components/parameters/ClientId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateApiCredentialStatusRequest'
            example:
              status: DISABLED
      responses:
        '200':
          description: Status updated. Never includes a secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SingleApiCredentialResponse'
              example:
                success: true
                result:
                  clientId: fin-8f2c1a9b-0000-4000-8000-000000000001-checkout-service
                  name: checkout-service
                  status: DISABLED
                  createdAt: '2026-09-03T10:12:00Z'
                  lastRotatedAt: '2026-09-11T08:44:19Z'
        '400':
          description: '`status` is missing or is not `ACTIVE` or `DISABLED`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Forbidden — the token lacks `manage:credentials`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >
            `credential-not-found`. A `clientId` belonging to another company
            answers exactly this — same

            status, same code, same message as one that does not exist anywhere.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >
            `credential-limit-exceeded` — setting `ACTIVE` while another of your
            credentials is already

            active. This can only arise if your company holds more than one
            credential, and there is no

            self-service way past it. Disabling is never refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            `keycloak-unavailable` — the identity provider could not be reached.
            Retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    TenantId:
      name: x-tenant-id
      in: header
      required: false
      description: >
        Which tenant the request is scoped to, among those your token grants.
        Omit it when the token

        grants exactly one tenant; it is **required** when the token grants more
        than one. A supplied

        value must exactly match a tenant the token grants.


        Absent when required, blank, malformed, or naming a tenant the token
        does not grant — each gets

        the same generic `403 forbidden`, which reveals neither whether a tenant
        exists nor which ones

        you may use. Send the header once: a repeated header is rejected the
        same way.
      schema:
        type: string
        format: uuid
        example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    ClientId:
      name: clientId
      in: path
      required: true
      description: The credential's OAuth `client_id`
      schema:
        type: string
      example: fin-8f2c1a9b-0000-4000-8000-000000000001-checkout-service
  schemas:
    UpdateApiCredentialStatusRequest:
      type: object
      required:
        - status
      properties:
        status:
          $ref: '#/components/schemas/ApiCredentialStatus'
    SingleApiCredentialResponse:
      allOf:
        - $ref: '#/components/schemas/BaseResponse'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/ApiCredential'
    ErrorResponse:
      type: object
      description: Error response wrapper
      properties:
        success:
          type: boolean
          description: Always false for error responses
          example: false
        errors:
          type: array
          description: List of errors that occurred
          items:
            $ref: '#/components/schemas/ErrorBody'
        result:
          type: object
          nullable: true
          description: Null or omitted when success is false
    ApiCredentialStatus:
      type: string
      description: >
        Lifecycle state of a credential. There is no deleted state: revocation
        is `DISABLED`, which is

        reversible and preserves the credential's identity, roles and history.
      enum:
        - ACTIVE
        - DISABLED
    BaseResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the request was successful
    ApiCredential:
      type: object
      description: >
        A credential as it is read back. This schema has **no `secret`
        property** — the secret is

        returned only by create and rotate, and cannot be recovered by reading.
      required:
        - clientId
        - status
      properties:
        clientId:
          type: string
          description: The OAuth `client_id`. Server-generated.
          example: fin-8f2c1a9b-0000-4000-8000-000000000001-checkout-service
        name:
          type: string
          description: The label supplied at creation
          example: checkout-service
        status:
          $ref: '#/components/schemas/ApiCredentialStatus'
        createdAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the credential was provisioned. Absent for credentials created
            before this endpoint existed.
        lastRotatedAt:
          type: string
          format: date-time
          nullable: true
          description: When the secret was last rotated. Absent until the first rotation.
    ErrorBody:
      type: object
      description: Individual error details
      properties:
        code:
          type: string
          description: Machine-readable error code
          example: invalid-request
        message:
          type: string
          description: Human-readable error message
          example: The request contains invalid parameters.
  responses:
    Unauthorized:
      description: Authentication required or failed (401)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            errors:
              - code: unauthenticated
                message: Please authenticate to perform this action.
  securitySchemes:
    OAuth2:
      type: oauth2
      description: >
        OAuth2 client credentials flow. Token endpoints:

        - Staging:
        https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token

        - Production:
        https://login.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
      flows:
        clientCredentials:
          tokenUrl: >-
            https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
          scopes: {}

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.