# Audit

Audit log access

Source: https://keyenv.dev/docs/api/audit/

Audit log access

## List audit logs

```http
GET /api/v1/audit
```

Returns audit logs for teams the user has access to

**Operation ID:** `listAuditLogs` &middot; **Authentication:** `Authorization: Bearer <token>`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | `string (uuid)` | no | Filter by team ID |
| `limit` | `integer` | no | Maximum number of results |
| `offset` | `integer` | no | Number of results to skip |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | Audit logs | `object` |
| `401` | Authentication required | `Error` |

### Response body (`200`)

| Field | Type | Description |
| --- | --- | --- |
| `logs` | `object[]` |  |

### Example

```bash
curl -X GET "https://api.keyenv.dev/api/v1/audit" \
  -H "Authorization: Bearer $KEYENV_TOKEN"
```

## List team audit logs

```http
GET /api/v1/teams/{teamId}/audit
```

Returns audit logs for a specific team

**Operation ID:** `listTeamAuditLogs` &middot; **Authentication:** `Authorization: Bearer <token>`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `teamId` | `string (uuid)` | yes | Team UUID |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | no | Maximum number of results |
| `offset` | `integer` | no | Number of results to skip |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | Audit logs | `object` |
| `401` | Authentication required | `Error` |
| `403` | Insufficient permissions | `Error` |

### Response body (`200`)

| Field | Type | Description |
| --- | --- | --- |
| `logs` | `object[]` |  |

### Example

```bash
curl -X GET "https://api.keyenv.dev/api/v1/teams/{teamId}/audit" \
  -H "Authorization: Bearer $KEYENV_TOKEN"
```
