> For the complete documentation index, see [llms.txt](https://mava.gitbook.io/mava-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mava.gitbook.io/mava-docs/webhooks-and-api/api/get-agents.md).

# Get Agents

### Endpoint

```
GET /api/categories
```

### Authentication

* Requires API token authentication
* Subject to rate limiting

### Response

**Success (200 OK)**

```json
{
  "agents": [
    {
      "id": "6630a1f4c2b9e4a1d8f00b21",
      "email": "ada@acme.com",
      "username": "Ada",
      "walletAddress": null
    },
    {
      "id": "6630a1f4c2b9e4a1d8f00b22",
      "email": null,
      "username": "Grace",
      "walletAddress": "0xfDf95D7A893f87A6809E532d57ac220525873B80"
    }
  ]
}
```

#### Response Fields

| Field                    | Type           | Description                                                                |
| ------------------------ | -------------- | -------------------------------------------------------------------------- |
| `agents`                 | array          | The organization's non-archived agents                                     |
| `agents[].id`            | string         | Unique identifier of the agent. Use this value for `assignedTo`            |
| `agents[].email`         | string \| null | The agent's email, or `null` if the agent signed up with a wallet          |
| `agents[].username`      | string \| null | The agent's display name, or `null` if not set                             |
| `agents[].walletAddress` | string \| null | The agent's wallet address, or `null` if the agent signed up with an email |

#### Error Responses

**Unauthorized (401)**

```json
{
  "error": "Unauthorized"
}
```

**Server error (500)**

```json
{
  "error": "Internal server error"
}
```

### Behavior

* Only agents belonging to the authenticated organization are returned; agents of other organizations are never included.
* Archived agents are excluded.
* `email` and `walletAddress` are mutually independent — an agent may have one, the other, or both.

### Example (cURL)

```bash
curl -X GET https://app.mava.app/api/agents \
    -H "x-auth-token: YOUR_API_KEY"
```
