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

# Generate a cryptographic key

> Generates a new cryptographic key for a user. Requires a user identifier and a verification_id that exists in the identity_verifications table and belongs to the user associated with the organisation. This endpoint calls the hot-keys orchestrator partner-assign-key endpoint.



## OpenAPI

````yaml /specs/retail.openapi.json post /v1/key/generate
openapi: 3.0.3
info:
  title: Control Orchestrator API
  description: API for orchestrating identity verification and key management workflows
  version: 1.0.0
servers:
  - url: https://orchestrator.control.coincover.com
    description: Production server
  - url: https://orchestrator.uat-control.coincover.com
    description: Development server
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Verification
    description: Start, check, and simulate biometric identity verification.
  - name: Keys
    description: Generate, assign, and verify cryptographic keys.
  - name: Backups
    description: Store and recover encrypted backup data.
paths:
  /v1/key/generate:
    post:
      tags:
        - Keys
      summary: Generate a cryptographic key
      description: >-
        Generates a new cryptographic key for a user. Requires a user identifier
        and a verification_id that exists in the identity_verifications table
        and belongs to the user associated with the organisation. This endpoint
        calls the hot-keys orchestrator partner-assign-key endpoint.
      operationId: generateKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyGenerateRequest'
      responses:
        '200':
          description: Key generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyGenerateResponse'
components:
  schemas:
    KeyGenerateRequest:
      type: object
      properties:
        user_identifier:
          type: string
          description: User identifier (REQUIRED)
          example: john.doe@example.com
        verification_id:
          type: string
          description: >-
            Verification ID from a previous verification. (REQUIRED) Must exist
            in identity_verifications table and belong to the user associated
            with the organisation.
          example: a7b8c9d0-e1f2-4345-a678-901234567890
        sign_with:
          type: array
          description: >-
            Optional context fields to bind into the enclave signature.
            public_key is always signed implicitly and must not be included.
            Every requested field must resolve to a non-empty value, except
            key_fingerprint which may resolve after generation. Each field may
            only be listed once.
          items:
            type: string
            enum:
              - external_customer_id
              - external_package_id
              - pulled_by_id
              - pulled_by_type
              - user_id
              - key_id
              - key_fingerprint
          example:
            - external_customer_id
            - user_id
            - key_fingerprint
      required:
        - user_identifier
        - verification_id
    KeyGenerateResponse:
      type: object
      properties:
        key_id:
          type: string
          format: uuid
          description: Unique identifier for the generated key (UUID)
          example: 550e8400-e29b-41d4-a716-446655440000
        public_key:
          type: string
          description: Public key in hexadecimal format
          example: 30820122300d06092a864886f70d...
        signature:
          type: string
          description: >-
            Base64 ECDSA P-256 DER signature. When sign_with is omitted, this
            signs the bare public_key hex; otherwise it signs signed_payload.
            Verify it with the verification key CoinCover issued you during
            integration, not with public_key.
          example: MEUCIQDxyz123abc456def789ghi...
        signed_payload:
          type: string
          description: >-
            RFC 8785 JCS-canonical JSON string signed by the enclave. Present
            only when sign_with was supplied. Verify its exact UTF-8 bytes
            without re-stringifying.
          example: >-
            {"external_customer_id":"acme-wallet","public_key":"30820122300d..."}
        signed_fields:
          type: array
          description: >-
            Validated context fields included in signed_payload, in request
            order. Does not include public_key. Present only when sign_with was
            supplied.
          items:
            type: string
            enum:
              - external_customer_id
              - external_package_id
              - pulled_by_id
              - pulled_by_type
              - user_id
              - key_id
              - key_fingerprint
          example:
            - external_customer_id
            - user_id
            - key_fingerprint
      required:
        - key_id
        - public_key
        - signature
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication and authorization
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: ID token as Bearer token

````