## Documentation Index

Fetch the complete documentation index at: [/docs/llms.txt](/content/docs/llms.txt)

Use this file to discover all available pages before exploring further.

### cURL

#### inherit_expiry

```bash
curl --request POST \
  --url https://api.arize.com/v2/api-keys/{api_key_id}/refresh \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

#### HTTP Status Codes

- **200**
- **400**
- **401**
- **403**
- **404**
- **422**
- **429**

### Sample API response for success

```json
{
  "id": "QXBp1003",
  "name": "CI pipeline key",
  "key_type": "USER",
  "status": "ACTIVE",
  "key": "ak-def456ghi789jkl012mno345pqr678stu901vwx234yzabc123",
  "redacted_key": "ak-def...123",
  "created_by_user_id": "Usr1001",
  "created_at": "2024-06-15T10:30:00Z",
  "expires_at": "2025-01-15T10:30:00Z"
}
```

### Sample API Responses for Errors

#### Invalid Request Parameters (400)
```json
{
  "status": 400,
  "title": "Invalid request parameters",
  "detail": "The 'name' field is required and must be a non-empty string.",
  "instance": "/resource",
  "type": "https://arize.com/docs/ax/rest-reference/errors#invalid-request"
}
```

#### Authentication Required (401)
```json
{
  "status": 401,
  "title": "Authentication required",
  "detail": "You must be authenticated to access this resource.",
  "instance": "/resource",
  "type": "https://arize.com/docs/ax/rest-reference/errors#authentication-required"
}
```

#### Access Forbidden (403)
```json
{
  "status": 403,
  "title": "Access forbidden",
  "detail": "You do not have permission to access this resource.",
  "instance": "/resource/12345",
  "type": "https://arize.com/docs/ax/rest-reference/errors#access-forbidden"
}
```

#### Resource Not Found (404)
```json
{
  "status": 404,
  "title": "Resource not found",
  "detail": "The requested resource with ID '12345' was not found.",
  "instance": "/resource/12345",
  "type": "https://arize.com/docs/ax/rest-reference/errors#resource-not-found"
}
```

#### Unprocessable Entity (422)
```json
{
  "status": 422,
  "title": "Unprocessable Entity",
  "detail": "One or more fields failed validation.",
  "instance": "/resource/12345",
  "type": "https://arize.com/docs/ax/rest-reference/errors#unprocessable-entity"
}
```

#### Rate Limit Exceeded (429)
```json
{
  "status": 429,
  "title": "Rate limit exceeded",
  "detail": "You have exceeded the allowed number of requests. Please try again later.",
  "instance": "/resource",
  "type": "https://arize.com/docs/ax/rest-reference/errors#rate-limit-exceeded"
}
```

### Authorizations

#### Authorization
- **Type**: string
- **Location**: header
- **Required**: Yes

Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format `authorization: <your_api_key>`.

### Path Parameters

#### api_key_id
- **Type**: string
- **Required**: Yes
- **Description**: The unique API key identifier (base64).

### Body Parameters

#### expires_at
- **Type**: string<date-time>
- **Description**: Expiration timestamp for the refreshed key. Required when the existing key has an expiry.

#### grace_period_seconds
- **Type**: integer
- **Description**: Grace period in seconds during which the old key remains valid after the refresh. Defaults to 0 (immediate revocation).

### Response
#### Success Response (200)
Successfully refreshed API key.
**Example of response:**

```json
{
  "id": "QXBp1003",
  "name": "CI pipeline key",
  "key_type": "USER",
  "status": "ACTIVE",
  "key": "ak-def456ghi789jkl012mno345pqr678stu901vwx234yzabc123",
  "created_at": "2024-06-15T10:30:00Z",
  "expires_at": "2025-01-15T10:30:00Z"
}
```
