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

# Register an approval key

> Nominate an existing Anchorage Digital API key as an approver for the caller's organization, into the
`ACTIVE` approval group named by `approvalGroupId` when one is given; the caller's key must hold
`MANAGE_IAAS_POLICY_ENGINE`. Registration is ungoverned: the key is `ACTIVE` at once and counts
toward its group from then on. A key belongs to one group for its whole life, and a key registered
without a group never joins one.



## OpenAPI

````yaml /knowledge-base/openapi/v4.yaml post /approvers/keys
openapi: 3.1.0
info:
  title: Anchorage Digital Account APIs (v4)
  version: 4.0.0-beta
  description: >-
    Reference for the Anchorage Digital v4 API, the surface behind Crypto as a
    Service: account management (accounts and the account tree, beneficiaries,
    freeze/unfreeze/close), balances and transactions, trusted destinations,
    orders and allocations, withdrawals, deposit instructions, deposit
    attributions, the policy engine (policies, approval keys), and supported
    asset types. Approval groups, endorsements, compliance profiles, customers
    (onboarding), fee configuration updates, interest enrollment, funding
    allocations, and destination removal are under construction and return
    mocked data only.


    Status: BETA. The v4 API is available in the sandbox only
    (https://api.anchorage-staging.com/v4) and is not available in production
    yet. The contract may change until general availability. Which endpoints are
    live, in final testing, or under construction:
    https://docs.anchorage.com/platform/developers/caas/caas-overview


    Authentication: every request carries an `Api-Access-Key` header. Every
    POST, PATCH, and DELETE additionally requires an `Idempotency-Key`, and is
    signed with `Api-Signature` (hex-encoded Ed25519 over
    `timestamp_epoch_seconds + uppercase(http_method) + request_path +
    request_body`) plus `Api-Timestamp` (unix epoch seconds).


    Pagination: list endpoints accept `after` (cursor) and `limit` (page size, 1
    to 1000, default 100) and return a `page.endCursor` to continue from. Errors
    use a common envelope with a human-readable `message`; batch endpoints
    return a result per item instead.


    Guides: https://docs.anchorage.com/platform/developers/caas/caas-overview
servers:
  - url: https://api.anchorage-staging.com/v4
security:
  - Api-Access-Key: []
tags:
  - name: Accounts
  - name: Compliance Profiles
  - name: Balances
  - name: Transactions
  - name: Trusted Destinations
  - name: Orders & Allocations
  - name: Withdrawals
  - name: Deposit Instructions
  - name: Deposit Attributions
  - name: Policies
  - name: Approval Groups
  - name: Endorsements
  - name: Customers
  - name: Asset Types
paths:
  /approvers/keys:
    post:
      tags:
        - Approval Groups
      summary: Register an approval key
      description: >-
        Nominate an existing Anchorage Digital API key as an approver for the
        caller's organization, into the

        `ACTIVE` approval group named by `approvalGroupId` when one is given;
        the caller's key must hold

        `MANAGE_IAAS_POLICY_ENGINE`. Registration is ungoverned: the key is
        `ACTIVE` at once and counts

        toward its group from then on. A key belongs to one group for its whole
        life, and a key registered

        without a group never joins one.
      operationId: registerApprovalKey
      parameters:
        - name: Idempotency-Key
          in: header
          schema:
            type: string
          required: true
          description: >-
            Client-supplied key that deduplicates retried requests. Reusing a
            key returns the original result instead of repeating the action.
        - name: Api-Signature
          in: header
          required: true
          schema:
            type: string
            pattern: ^[0-9A-Fa-f]{128,160}$
          description: >-
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds +
            uppercase(http_method) + request_path + request_body`.
        - name: Api-Timestamp
          in: header
          required: true
          schema:
            type: integer
            format: int64
          description: Current timestamp, represented as unix epoch seconds
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyCreateRequest'
      responses:
        '202':
          description: Change accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyChangeAcceptedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
components:
  schemas:
    KeyCreateRequest:
      required:
        - class
        - apiKeyId
        - publicKey
        - label
        - approvalGroupId
      title: Approval Key Create Request
      type: object
      properties:
        class:
          $ref: '#/components/schemas/KeyClass'
        apiKeyId:
          type: string
          pattern: ^[0-9a-fA-F]{64}$
          description: >-
            The approver's API key id: hex-encoded SHA-256 of its access key, as
            shown when the key was issued. A key is nominated at most once per
            organization, for all time: once registered it cannot be nominated
            again, even after it is archived. The key must be an `ACTIVE` API
            key of the caller's organization.
        publicKey:
          type: string
          pattern: ^[0-9a-fA-F]{64}$
          description: >-
            The key's Ed25519 public key, hex-encoded (32 bytes). Must be the
            canonical encoding of a point on the curve outside the small-order
            subgroup; a key from any standard generator is. Must be the public
            key Anchorage Digital holds for `apiKeyId`; a nomination whose key
            does not match is refused.
        label:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            A name for the key, used only in audit records. It does not identify
            the key holder. Surrounding whitespace is removed; what remains must
            be 1 to 128 characters.
        approvalGroupId:
          pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          description: >-
            The approval group the key joins, in canonical lowercase hyphenated
            form. Must be an `ACTIVE` approval group of the caller's
            organization; the key belongs to it for its whole life and cannot be
            moved to another group. Optional until approval groups can be
            created through this API; it becomes required then, and a key
            registered without one belongs to no group.
          type: string
          format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
      additionalProperties: false
    KeyChangeAcceptedResponse:
      title: Approval Key Change Accepted Response
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/KeyChangeAccepted'
    ErrorDetails:
      title: ErrorDetails
      type: object
      properties:
        message:
          description: A human-readable message providing more details about the error.
          example: Missing required field 'amount'.
          type: string
      required:
        - message
    KeyClass:
      title: Approval Key Class
      type: string
      description: >-
        The kind of credential registered. Only Anchorage Digital API keys are
        supported.
      enum:
        - api_key
    KeyChangeAccepted:
      title: Approval Key Change Accepted
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
        status:
          $ref: '#/components/schemas/KeyStatus'
        action:
          $ref: '#/components/schemas/ActionRef'
        createdAt:
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
    KeyStatus:
      title: Approval Key Status
      type: string
      enum:
        - ACTIVE
        - ARCHIVED
    ActionRef:
      title: Action Reference
      type: object
      required:
        - id
      description: >-
        A pointer to the action opened for this change. Present only when policy
        evaluation found every

        other requirement already satisfied except one: it still needs more
        endorsements. Absent means the

        change applied immediately with no policy blocking it.
      properties:
        id:
          description: The action's id in the Endorsements surface.
          type: string
          format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
        reason:
          type: string
          description: Optional human-readable explanation of why endorsement is needed.
  securitySchemes:
    Api-Access-Key:
      type: apiKey
      name: Api-Access-Key
      in: header
      description: An API key associated with a security role

````

## Related topics

- [Policies and approvals](https://docs.anchorage.com/knowledge-base/platform/developers/caas/caas-policies.md)
- [Getting started](https://docs.anchorage.com/knowledge-base/platform/developers/caas/caas-getting-started.md)
- [API reference](https://docs.anchorage.com/knowledge-base/api-reference/v4/introduction.md)
- [Archive an approval key](https://docs.anchorage.com/knowledge-base/api-reference/v4/approval-groups/archive-an-approval-key.md)
- [Get an approval key](https://docs.anchorage.com/knowledge-base/api-reference/v4/approval-groups/get-an-approval-key.md)
