Skip to main content
POST
Generate a cryptographic key

Authorizations

X-API-Key
string
header
required

API key for authentication and authorization

Body

application/json
user_identifier
string
required

User identifier (REQUIRED)

Example:

"john.doe@example.com"

verification_id
string
required

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
enum<string>[]

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.

Available options:
external_customer_id,
external_package_id,
pulled_by_id,
pulled_by_type,
user_id,
key_id,
key_fingerprint
Example:

Response

200 - application/json

Key generated successfully

key_id
string<uuid>
required

Unique identifier for the generated key (UUID)

Example:

"550e8400-e29b-41d4-a716-446655440000"

public_key
string
required

Public key in hexadecimal format

Example:

"30820122300d06092a864886f70d..."

signature
string
required

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
string

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
enum<string>[]

Validated context fields included in signed_payload, in request order. Does not include public_key. Present only when sign_with was supplied.

Available options:
external_customer_id,
external_package_id,
pulled_by_id,
pulled_by_type,
user_id,
key_id,
key_fingerprint
Example: