Skip to main content
Keys

Create key

POST/v4/config/ows/key-management/keys

Adds a signing key to the organisation. There are two ways:

  • Create a key in a key store with the capability create (local, vault, gcp-kms, aws-kms, azure-key-vault, dpod). The key is an ECDSA P-256 key (ES256) that cannot be exported. All fields are optional: the body {} creates a key in the default local key store, the first key store of List key stores: local-hsm (Local vault (HSM)) on an installation with the HSM as a dedicated option, else local-openbao (Local vault).
  • Reference a key that the provider already has, in a key store with the capability reference (vault, gcp-kms, aws-kms, azure-key-vault, dpod, csc). Give keyStoreId and a providerKeyName from List provider keys. The wallet reads the public key and, except for csc, signs and verifies a test message. For a remote signing key store (csc), the key gets the certificate chain of the CSC credential (certificateSource qtsp), and a qualified provider also gets its trust checked against the EU trusted lists.

A created key has a name in its key store: vault, a Transit key named by the key ID; gcp-kms, the crypto key ows-<keyId>; aws-kms, the alias alias/ows-<keyId>; azure-key-vault, the key ows-<keyId>; dpod, the key pair label ows:<keyId>.

A new key has no certificate chain. To sign with cryptographicKeyFormat x509, give it a chain with Generate CSR and Upload certificate chain, or with Create test certificate. An organisation can have at most 1000 keys (retired keys do not count). A call with a sandbox API key adds the key to the main organisation.

Authorizations

  • Authorizationstringheaderrequired

    Your API key with the prefix ApiKey: ApiKey <your-api-key>. Get an API key.

    Scope:keys:create

Body

application/json

The key store and the name of a new key, or the key store and the provider key to reference. The wallet refuses an unknown member.

  • keyStoreIdstring

    The key store of the key. Required to reference a provider key. Default for a new key the default local key store (local-hsm on an installation with the HSM as a dedicated option, else local-openbao).

    At most 64 characters.

    Example:"local-openbao"

  • namestring

    A free name of the key, for example what it signs, at most 100 characters. Optional. Update key changes it later.

    At most 100 characters.

    Example:"PID issuance 2026"

  • algorithmenum<string>

    The signature algorithm of a new key. Optional; ES256 is the only value.

    Available options:ES256

    Example:"ES256"

  • providerKeyNamestring

    The provider key to reference, from List provider keys. Give it only to reference a key. vault: the name of the Transit key. gcp-kms: a crypto key version of the key ring (projects/<project>/locations/<location>/keyRings/<keyRing>/cryptoKeys/<key>/cryptoKeyVersions/<version>). aws-kms: a key ARN of the region, a key ID or an alias (alias/<name>); the wallet keeps the key ARN. azure-key-vault: a key ID of the vault with its version (<vaultUrl>/keys/<name>/<version>). dpod: the label of a key pair (1 to 128 characters, no control character, no /). csc: the ID of the CSC credential. Another form gives 400.

    At most 512 characters.

    Example:"signing-key-1"

  • providerSecretstring

    Write-only. Only to reference a key of a csc key store, the PIN of the CSC credential. Optional; without it, the wallet uses the userPin of the key store. No answer returns it.

    At most 256 characters.

    Example:"<yourPin>"

Response

application/json

The new key.

  • keyIdstring

    The key ID of the new key, also jwk.kid and key.keyId.

    Example:"3f2a91c47b8d4e6fa0c5d7e18b924f30"

  • jwkobject

    The public key of the new key as a JWK, the same as key.jwk.

  • keyobject

    A signing key of the organisation, with its key store, its public JWK and what its certificate allows. It has public values only, never the private key, the name of the key at the provider or a secret. The wallet key of the organisation (the automatic key that the wallet creates at the deployment, the holder identity of the organisation wallet) is not a signing key, and no key answer has it while it has no certificate chain.