Create key
POST/v2/config/digital-wallet/openid/key-management/keys
Creates a new ECDSA P-256 key in a secure vault. The wallet uses the key to sign OID4VCI credentials and OpenID4VP responses. The vault sets the key type, the curve and the algorithm, so there is no parameter for them.
Enable the vault before you create a key in it.
Request
Header Parameters
Optional. Unique identifier of the sandbox organisation to use for this request. When you send this header, the service runs the operation in the context of the named sandbox organisation, that is, against the wallet of that sandbox organisation and not against the main wallet of the organisation. Leave the header out to use the main wallet.
The service reads this header only when you authenticate with a bearer access token. When you authenticate with an API key, the service takes the sandbox organisation from the API key and ignores this header. To run an API-key call in a sandbox organisation, bind the key to the sandbox organisation with PUT /v2/config/admin/apikey/{apiKeyId}/sandbox-org instead.
X-SubwalletId is the deprecated name of this header. The service continues to accept it, but X-SandboxOrgId wins if you send both headers.
The sandbox organisation must exist, must belong to your organisation and must be deployed. An unknown identifier, an identifier of a sandbox organisation that is not deployed, and an identifier that belongs to a different organisation all make the call fail with HTTP 400.
- application/json
Body
Vault that stores the new key. Send an empty object to use the iGrant.io vault.
Possible values: [1, 2, 3, 4]
Default value: 1
ID of the vault that stores the key. 1 is the iGrant.io vault, 2 is the Hashicorp vault, 3 is the QTSP vault and 4 is the database backed vault. Use 1 or 4 for normal key creation. The service uses the iGrant.io vault when you do not send this field.
Responses
- 201
- 400
- 401
- 500
Key created successfully.
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
Unique identifier of the new key.
jwk objectrequired
Public key of the new key pair in JSON Web Key (JWK) format.
Key type. The vault creates elliptic curve keys, so the value is EC.
Elliptic curve identifier. The vault uses the P-256 curve.
X coordinate of the elliptic curve point, in base64url format.
Y coordinate of the elliptic curve point, in base64url format.
Key identifier. The value is the same as keyId.
Signature algorithm for the key. The vault sets ES256.
Public key of the new key pair in JSON Web Key (JWK) format.
{
"keyId": "3f2a91c47b8d4e6fa0c5d7e18b924f30",
"jwk": {
"kty": "EC",
"crv": "P-256",
"x": "<base64url-x-coordinate>",
"y": "<base64url-y-coordinate>",
"kid": "3f2a91c47b8d4e6fa0c5d7e18b924f30",
"alg": "ES256"
}
}
The vault type is not valid, or the vault is not configured.
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
Unauthorized
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
Internal server error
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}