# Admin keys

`GET https://api.search.brave.com/admin/v1/admin_keys`

The organization's admin API keys, oldest first. The secrets themselves are never returned.

## Query Parameters

| Name | Location | Type | Required | Constraints | Description |
|------|----------|------|----------|-------------|-------------|
| `include_deleted` | query | bool | No | default `false` |  |
| `limit` | query | int | No | `1`-`1000`; default `100` |  |
| `page` | query | string | No | length max `256` | `next_page` of the previous page. |

## Headers

| Name | Location | Type | Required | Constraints | Description |
|------|----------|------|----------|-------------|-------------|
| `authorization` | header | string | No |  | `Bearer <admin key>`. |
| `x-admin-key` | header | string | No |  | The admin key, if you can't send `Authorization`. |
| `api-version` | header | string | No |  | Pins the response format, one of 2026-11-12. |

## Responses

### 200
Successful Response

| Field | Type | Constraints | Description |
|-------|------|-------------|-------------|
| `object` | string? | `list`; default `list` |  |
| `data` | AdminKeyItem[] |  |  |
| `data[].object` | string? | `admin_key`; default `admin_key` |  |
| `data[].id` | string |  |  |
| `data[].name` | string |  |  |
| `data[].hint` | string |  |  |
| `data[].status` | string | `active`, `inactive`, `deactivated`, `deleted`, `expired` |  |
| `data[].scopes` | string[] |  |  |
| `data[].expires_at` | string? |  |  |
| `data[].last_used_at` | string? |  | Last authenticated request, to within an hour; null if never used. |
| `data[].created_by_name` | string? |  | Display name of the member who created it; null when unknown. |
| `data[].created_at` | string? |  |  |
| `has_more` | bool |  |  |
| `next_page` | string? |  |  |

#### Example

```json
{
  "object": "list",
  "data": [
    {
      "object": "admin_key",
      "id": "<string>",
      "name": "<string>",
      "hint": "<string>",
      "status": "active",
      "scopes": [
        "<string>"
      ],
      "expires_at": "2023-11-07T05:31:56Z",
      "last_used_at": "2023-11-07T05:31:56Z",
      "created_by_name": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "has_more": false,
  "next_page": "<string>"
}
```

## Errors

| Status | Error code | Detail |
|--------|------------|--------|
| 401 | `ADMIN_KEY_INVALID` | Missing, invalid, paused, deactivated, deleted or expired admin key. Admin keys start with bsk_admin_; search API keys don't work here. |
| 403 | `ADMIN_KEY_SCOPE_MISSING` | This admin key doesn't have the scope this endpoint needs. |
| 404 | `API_VERSION_NOT_FOUND` | The requested product api version is not found. |
| 422 | `VALIDATION` | Unable to validate request parameter(s). |
| 429 | `ADMIN_RATE_LIMITED` | Admin API rate limit exceeded for this organization. Usage updates every 5 minutes or so; poll at most that often. |
| 503 | `ADMIN_OVERLOADED` | The Admin API is busy. Retry after the number of seconds in Retry-After. |

Body: `AdminErrorResponse` (see [Schemas](#schemas)).

## Schemas

Types named in the tables above that are not expanded inline. Field paths are relative to the type.

### AdminErrorResponse

| Field | Type | Constraints | Description |
|-------|------|-------------|-------------|
| `type` | string? | default `ErrorResponse` | Always `ErrorResponse`. |
| `error` | AdminErrorModel |  |  |
| `error.id` | string |  | A unique identifier for this particular occurrence of the problem. |
| `error.status` | int |  | The HTTP status code applicable to this problem. |
| `error.detail` | string? |  | Explanation specific to this occurrence of the problem. Like title, this field's value can be localized. |
| `error.meta` | object? |  | A meta object containing non-standard meta-information about the error. |
| `error.code` | string | `VALIDATION`, `INVALID_TIME_RANGE`, `API_VERSION_NOT_FOUND`, `ADMIN_KEY_INVALID`, `ADMIN_KEY_SCOPE_MISSING`, `ADMIN_RATE_LIMITED`, `ADMIN_OVERLOADED` | An Admin API error code, such as `ADMIN_KEY_INVALID` or `ADMIN_RATE_LIMITED`. |
| `time` | int? | default `0` | Unix time in seconds when the error occurred. |