Create API key
POST/v2/config/admin/apikey
Creates an API key for the organisation. Use the key to call the OID4VCI and OpenID4VP endpoints from a server, in place of a bearer access token. Send the key as Authorization: ApiKey <apiKey>.
Give the key the scopes that it needs. The config scope opens the configuration endpoints of the digital wallet, such as credential definitions, presentation definitions, webhooks and keys. The service refuses any scope other than config, audit, service and onboard with HTTP 400.
The response holds the token in full, in the apiKey field. This is the only moment at which you can copy it from a create response, so keep it in a safe place.
To bind the key to a sandbox organisation instead of the main wallet, send the identifier of the sandbox organisation in the sandboxOrgId field of the body. This field is the only way to bind a key at creation; the X-SandboxOrgId header has no effect on this operation. The sandbox organisation must belong to your organisation and must be deployed.
Request
- application/json
Body
required
The API key to create.
apiKey objectrequired
The API key to create.
Name of the API key. Use it to tell your keys apart.
Possible values: [config, audit, service, onboard]
Scopes of the API key. Each scope opens a group of endpoints. The service refuses any other value with HTTP 400. Use config for the OID4VCI and OpenID4VP configuration endpoints.
Default value: 30
Lifetime of the API key in days, counted from the moment of creation. The service uses 30 days when you leave this field out, or when you send 0 or a negative value.
Identifier of the sandbox organisation to bind the API key to. Leave the field out, or send an empty string, to bind the key to the main wallet of the organisation. The sandbox organisation must belong to your organisation and must be deployed; if it does not, the service gives HTTP 400.
Responses
- 200
- 400
- 401
- 403
- 500
The service created the API key. This operation returns 200, not 201. The apiKey field of the returned object holds the signed token.
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
apiKey objectrequired
The API key that the service created.
Unique identifier of the API key.
Name of the API key. The service does not check this value for uniqueness.
Possible values: [config, audit, service, onboard]
Scopes of the API key. Each scope opens a group of endpoints. The service refuses any other value with HTTP 400.
The signed JSON Web Token. Send it as Authorization: ApiKey <apiKey>. The token holds the scopes, the organisation, the organisation administrator and, when the key is bound to a sandbox organisation, the sandbox organisation.
Default value: 30
Lifetime of the API key in days, counted from the moment the service created or last updated the key. The service uses 30 days when you send 0 or a negative value.
Moment when the service last wrote the API key, in UTC. The service sets this value on create and on every update, including the delete operation.
Moment when the API key expires, in UTC.
Possible values: [igrantio, aip10]
Type of the API key. The list operation returns only keys of type igrantio; these are the keys that you create with this group of operations.
Identifier of the sandbox organisation that the API key is bound to. The field is absent when the key belongs to the main wallet of the organisation.
createdBy objectrequired
The user who created the API key, and the moment of creation. The service keeps this as log metadata.
Identifier of the user who created the API key. The value is an empty string for a key created with an API key.
Email address of the user who created the API key.
Moment of creation, in UTC.
{
"apiKey": {
"id": "6889e1a4c5b2f30001a3d720",
"name": "Production issuance key",
"scopes": [
"config",
"service"
],
"apiKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJTY29wZXMiOlsiY29uZmlnIl0...",
"expiryInDays": 30,
"timestamp": "2026-08-09T10:15:30Z",
"expiryTimestamp": "2026-09-08T10:15:30Z",
"type": "igrantio",
"sandboxOrgId": "6889e1a4c5b2f30001a3d710",
"createdBy": {
"id": "6889e1a4c5b2f30001a3d6e0",
"email": "[email protected]",
"at": "2026-08-09T10:15:30Z"
}
}
}
{
"apiKey": {
"id": "6889e1a4c5b2f30001a3d720",
"name": "Production issuance key",
"scopes": [
"config",
"service"
],
"apiKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJTY29wZXMiOlsiY29uZmlnIl0...",
"expiryInDays": 30,
"timestamp": "2026-08-09T10:15:30Z",
"expiryTimestamp": "2026-09-08T10:15:30Z",
"type": "igrantio",
"createdBy": {
"id": "6889e1a4c5b2f30001a3d6e0",
"email": "[email protected]",
"at": "2026-08-09T10:15:30Z"
}
}
}
The request is invalid. The service returns this status when apiKey or scopes is missing, when scopes holds a value other than config, audit, service or onboard, when the sandbox organisation of sandboxOrgId does not exist, or when that sandbox organisation is not deployed.
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"
}
The caller has no permission for this operation. Only an organisation administrator can manage API keys; an API key cannot create another API key.
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"
}