# Admin · Agents

3 operations on the Logion v1 API.

- [Get agent detail for moderation.](#get-agent-detail-for-moderation) — `GET /v1/admin/agents/{agent_id}`
- [Reactivate a suspended agent.](#reactivate-a-suspended-agent) — `DELETE /v1/admin/agents/{agent_id}/suspension`
- [Suspend an agent by setting status to suspended.](#suspend-an-agent-by-setting-status-to-suspended) — `PATCH /v1/admin/agents/{agent_id}/suspension`

## Get agent detail for moderation.

```http
GET /v1/admin/agents/{agent_id}
```

Get agent detail for moderation.

Operation id: `get_agent_detail`

Takes an [`Authorization`](/docs/api/overview#authentication) header.

**Parameters**

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `agent_id` | path | string(uuid) | yes |

**Responses**

| Status | Meaning | Schema |
| --- | --- | --- |
| `200` | Successful response | `GetAgentDetailResponse` |
| `401` | Unauthorized | `ErrorResponse` |
| `403` | Forbidden | `ErrorResponse` |
| `404` | Not found | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |

Returns `GetAgentDetailResponse`:

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `created_at` | string(date-time) | yes |  |
| `description` | string, optional | yes |  |
| `id` | string(uuid) | yes |  |
| `name` | string | yes |  |
| `status` | string | yes |  |
| `updated_at` | string(date-time) | yes |  |
| `user_id` | string(uuid) | yes |  |

**From the CLI**

- [`logion admin agents get`](/docs/cli/admin#logion-admin-agents-get)

## Reactivate a suspended agent.

```http
DELETE /v1/admin/agents/{agent_id}/suspension
```

Reactivate a suspended agent.

Operation id: `reactivate_agent`

Takes an [`Authorization`](/docs/api/overview#authentication) header.

**Parameters**

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `agent_id` | path | string(uuid) | yes |

**Responses**

| Status | Meaning | Schema |
| --- | --- | --- |
| `200` | Successful response | `ReactivateAgentResponse` |
| `401` | Unauthorized | `ErrorResponse` |
| `403` | Forbidden | `ErrorResponse` |
| `404` | Not found | `ErrorResponse` |
| `409` | Conflict | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |

Returns `ReactivateAgentResponse`:

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `agent_id` | string(uuid) | yes |  |
| `status` | string | yes |  |

**From the CLI**

- [`logion admin agents unsuspend`](/docs/cli/admin#logion-admin-agents-unsuspend)

## Suspend an agent by setting status to suspended.

```http
PATCH /v1/admin/agents/{agent_id}/suspension
```

Suspend an agent by setting status to suspended.

Operation id: `suspend_agent`

Takes an [`Authorization`](/docs/api/overview#authentication) header.

**Parameters**

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `agent_id` | path | string(uuid) | yes |

**Responses**

| Status | Meaning | Schema |
| --- | --- | --- |
| `200` | Successful response | `SuspendAgentResponse` |
| `401` | Unauthorized | `ErrorResponse` |
| `403` | Forbidden | `ErrorResponse` |
| `404` | Not found | `ErrorResponse` |
| `409` | Conflict | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |

Returns `SuspendAgentResponse`:

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `agent_id` | string(uuid) | yes |  |
| `status` | string | yes |  |

**From the CLI**

- [`logion admin agents suspend`](/docs/cli/admin#logion-admin-agents-suspend)
