# Retrieve an API key

## GET `/v1/orgs/{id}/keys/{keyId}`

Read key metadata as its creator or an organization administrator. The secret and secret hash are never returned.

## Authentication

Use a person's Bearer access token or console session. See [Authentication](https://augenta.pages.dev/docs/authentication.md).

## Request example

```bash
curl --fail-with-body -X GET "https://api.augenta.ai/v1/orgs/$AUGENTA_ORG_ID/keys/$AUGENTA_API_KEY_ID" \
  -H "Authorization: Bearer $AUGENTA_ACCESS_TOKEN"
```

## Parameters

<a id="request-parameters-id"></a>

### `request.parameters.id`

`string` · required

path parameter.

Min length: `1`.

<a id="request-parameters-keyid"></a>

### `request.parameters.keyId`

`string` · required

path parameter.

Min length: `1`.

## Response 200

API key resource.

Content-Type: `application/json`

```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"
}
```

<a id="response-200-object"></a>

### `response.200.object`

`string` · always present

The resource type. Always api_key.

Allowed values: `"api_key"`.

<a id="response-200-id"></a>

### `response.200.id`

`string` · always present

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

Min length: `1`.

<a id="response-200-orgid"></a>

### `response.200.orgId`

`string` · always present

Owning Organization's Augenta ID.

Min length: `1`.

<a id="response-200-label"></a>

### `response.200.label`

`string` · always present

Human-readable credential name.

<a id="response-200-createdbyuserid"></a>

### `response.200.createdByUserId`

`string` · always present

Person who issued the credential.

<a id="response-200-createdat"></a>

### `response.200.createdAt`

`string` · always present

Recorded credential creation time.

<a id="response-200-scope"></a>

### `response.200.scope`

`string` · conditional

Scope metadata, when present.

<a id="response-200-workspaceids"></a>

### `response.200.workspaceIds`

`array<string>` · conditional

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

<a id="response-200-workspaceid"></a>

### `response.200.workspaceId`

`string` · conditional

Legacy single-Workspace assignment, when applicable.

<a id="response-200-connectorid"></a>

### `response.200.connectorId`

`string` · conditional

Legacy Connector-backed credential reference, when applicable.

<a id="response-200-lastactiveat"></a>

### `response.200.lastActiveAt`

`string` · conditional

Last recorded authentication activity, when available.

<a id="response-200-revokedat"></a>

### `response.200.revokedAt`

`string` · conditional

Recorded revocation time, when revoked.

## Response 400

invalid_request: invalid fields or destination.

Content-Type: `application/json`

<a id="response-400-error"></a>

### `response.400.error`

`object` · always present

<a id="response-400-error-code"></a>

### `response.400.error.code`

`string` · always present

Stable. The Errors page lists every code.

<a id="response-400-error-message"></a>

### `response.400.error.message`

`string` · always present

Human-readable. May change; don't parse it.

<a id="response-400-error-retryable"></a>

### `response.400.error.retryable`

`boolean` · always present

<a id="response-400-error-retryafterseconds"></a>

### `response.400.error.retryAfterSeconds`

`integer` · conditional

Capacity retry interval, also present as Retry-After before stream headers commit. SSE error events retain this field after HTTP 200 is committed.

Minimum: `1`.

<a id="response-400-error-billingurl"></a>

### `response.400.error.billingUrl`

`string` · conditional

Top-up action when error.code is insufficient_balance (HTTP 402).

<a id="response-400-requestid"></a>

### `response.400.requestId`

`string` · always present

The request's id, as in the `X-Request-Id` response header.

## Response 401

unauthenticated: sign in first.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 403

forbidden: this action requires a person with the necessary role; API keys cannot administer resources.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 404

not_found: the key is unavailable.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 409

conflict: the operation could not be completed.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 429

rate_limited: retry after Retry-After.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 500

internal_error: quote requestId when reporting a failure.

Content-Type: `application/json`

Response fields use the same schema as Response 400.
