Create an API key
Creates an API key bound to a subject (actor) in the project, optionally scoped to a set of capability IDs and an expiry. The full raw key is returned exactly once in `data.raw_key` — store it, it cannot be retrieved again. The authenticated actor must be a platform-level client.
/projects/{project_id}/api_keysCreates an API key bound to a subject (actor) in the project,
optionally scoped to a set of capability IDs and an expiry. The
full raw key is returned exactly once in data.raw_key — store
it, it cannot be retrieved again. The authenticated actor must be
a platform-level client.
JWT issued by IdentityX, signed with Ed25519
In: header
Path Parameters
Project ID.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request body for API key creation. Mirrors models.CreateAPIKeyRequest.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/api_keys" \ -H "Content-Type: application/json" \ -d '{ "subject_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "capabilities": [ "3fa85f64-5717-4562-b3fc-2c963f66afa7" ], "name": "checkout-prod", "env": "production", "expires_at": "2027-01-01T00:00:00Z" }'{
"code": 200,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"pagination": {
"page": 1,
"limit": 1,
"total": 0,
"has_next": true,
"has_prev": true,
"next_page": 0,
"prev_page": 0
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "string",
"data": {
"key": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"subject_id": "80e197be-61ad-4068-b4ff-a483fb5c18f9",
"name": "string",
"display_prefix": "string",
"metadata": {},
"expires_at": "2019-08-24T14:15:22Z",
"revoked_at": "2019-08-24T14:15:22Z",
"last_used_at": "2019-08-24T14:15:22Z",
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"created_at": "2019-08-24T14:15:22Z"
},
"raw_key": "string"
}
}{
"code": 0,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "IdentityX"
}{
"code": 0,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "IdentityX"
}{
"code": 0,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "IdentityX"
}{
"code": 0,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "IdentityX"
}{
"code": 0,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "IdentityX"
}Get a project actor by email GET
AIP custom method (`:verb` suffix per AIP-136). Fetches a single actor from the project by email address. The authenticated actor must be a user or member of the project (project-scoped service accounts included). Never public.
List project capabilities GET
Lists the capability grants defined for the project.