# The API key object

> Credential metadata, Workspace assignments and recorded activity.

Use a person's credentials to create, list, retrieve and revoke API keys. An API key can make
one-shot Consolidate requests; Workspace assignments additionally permit stored-memory access.
Key creation requires administration access to every assigned Workspace.

The object below shows retrievable metadata. Creation alone adds the one-time `secret` field.
Save that value in your application's secret configuration; subsequent reads cannot return it.
Revocation returns a compact acknowledgment. See [API keys](https://augenta.pages.dev/docs/api-keys.md) for ownership rules.

## Available operations

* [POST `/v1/orgs/{id}/keys` — Create an API key](https://augenta.pages.dev/docs/api-reference/create-api-key.md)
* [GET `/v1/orgs/{id}/keys` — List your API keys](https://augenta.pages.dev/docs/api-reference/list-api-keys.md)
* [GET `/v1/orgs/{id}/keys/{keyId}` — Retrieve an API key](https://augenta.pages.dev/docs/api-reference/get-api-key.md)
* [DELETE `/v1/orgs/{id}/keys/{keyId}` — Revoke an API key](https://augenta.pages.dev/docs/api-reference/revoke-api-key.md)

## Attributes

These are response fields: always present can allow null; conditional fields can be omitted.

<a id="apikey-object"></a>

### `apikey.object`

`string` · always present

The resource type. Always api_key.

Allowed values: `"api_key"`.

<a id="apikey-id"></a>

### `apikey.id`

`string` · always present

Public credential identity used in administration routes. It is not the authentication secret.

Min length: `1`.

<a id="apikey-orgid"></a>

### `apikey.orgId`

`string` · always present

Owning Organization's Augenta ID.

Min length: `1`.

<a id="apikey-label"></a>

### `apikey.label`

`string` · always present

Human-readable credential name.

<a id="apikey-createdbyuserid"></a>

### `apikey.createdByUserId`

`string` · always present

Person who issued the credential.

<a id="apikey-createdat"></a>

### `apikey.createdAt`

`string` · always present

Recorded credential creation time.

<a id="apikey-scope"></a>

### `apikey.scope`

`string` · conditional

Scope metadata, when present.

<a id="apikey-workspaceids"></a>

### `apikey.workspaceIds`

`array<string>` · conditional

Assigned Workspaces. An empty array permits one-shot Consolidate only.

<a id="apikey-workspaceid"></a>

### `apikey.workspaceId`

`string` · conditional

Legacy single-Workspace assignment, when applicable.

<a id="apikey-connectorid"></a>

### `apikey.connectorId`

`string` · conditional

Legacy Connector-backed credential reference, when applicable.

<a id="apikey-lastactiveat"></a>

### `apikey.lastActiveAt`

`string` · conditional

Last recorded authentication activity, when available.

<a id="apikey-revokedat"></a>

### `apikey.revokedAt`

`string` · conditional

Recorded revocation time, when revoked.

## Example object

```json
{
  "object": "api_key",
  "id": "sk-aug-example",
  "orgId": "org_example",
  "label": "Release assistant",
  "workspaceIds": [
    "release-guides"
  ],
  "createdByUserId": "user_example",
  "createdAt": "2026-10-27T12:00:00Z"
}
```
