> ## Documentation Index
> Fetch the complete documentation index at: https://docs.evomarketing.co/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> Backend API endpoints and namespaces

The EVO Dialed backend exposes three API namespaces, each serving different clients.

## API namespaces

| Namespace | Base path         | Auth          | Client                   |
| --------- | ----------------- | ------------- | ------------------------ |
| Internal  | `/api/internal/*` | Admin JWT     | Admin frontend           |
| Creator   | `/api/creator/*`  | Creator JWT   | iOS app                  |
| Public    | `/api/public/*`   | None/Passcode | Client hub, public pages |

## Internal API

For EVO team members. Requires admin JWT with `user_typ: "evo"`.

### Brands

| Method | Path                                       | Description            |
| ------ | ------------------------------------------ | ---------------------- |
| GET    | `/api/internal/brands`                     | List all brands        |
| GET    | `/api/internal/brands/:id`                 | Get brand details      |
| POST   | `/api/internal/brands`                     | Create brand           |
| PATCH  | `/api/internal/brands/:id`                 | Update brand           |
| POST   | `/api/internal/brands/:id/pipeline_status` | Change pipeline status |

### Campaigns

| Method | Path                                | Description          |
| ------ | ----------------------------------- | -------------------- |
| GET    | `/api/internal/campaigns`           | List campaigns       |
| GET    | `/api/internal/campaigns/:id`       | Get campaign details |
| POST   | `/api/internal/campaigns`           | Create campaign      |
| PATCH  | `/api/internal/campaigns/:id`       | Update campaign      |
| POST   | `/api/internal/campaigns/:id/pause` | Pause campaign       |

### Creators

| Method | Path                                | Description               |
| ------ | ----------------------------------- | ------------------------- |
| GET    | `/api/internal/creators`            | List creators (paginated) |
| GET    | `/api/internal/creators/:id`        | Get creator details       |
| PATCH  | `/api/internal/creators/:id`        | Update creator            |
| POST   | `/api/internal/creators/:id/remove` | Remove creator            |
| POST   | `/api/internal/creators/:id/flags`  | Add flag                  |

### Mission Control

| Method | Path                                       | Description       |
| ------ | ------------------------------------------ | ----------------- |
| GET    | `/api/internal/mission_control`            | Get MC board data |
| GET    | `/api/internal/mission_control/brands/:id` | Brand MC details  |

### Pipeline

| Method | Path                          | Description            |
| ------ | ----------------------------- | ---------------------- |
| GET    | `/api/internal/pipeline`      | Get pipeline board     |
| POST   | `/api/internal/pipeline/move` | Move brand in pipeline |

### Chat (Admin)

| Method | Path                                  | Description       |
| ------ | ------------------------------------- | ----------------- |
| GET    | `/api/internal/chat/channels`         | List all channels |
| POST   | `/api/internal/chat/channels`         | Create channel    |
| POST   | `/api/internal/chat/channels/:id/pin` | Pin message       |

## Creator API

For creators via iOS app. Requires creator JWT with `user_typ: "creator"`.

### Dashboard

| Method | Path                     | Description       |
| ------ | ------------------------ | ----------------- |
| GET    | `/api/creator/dashboard` | Dashboard data    |
| GET    | `/api/creator/me`        | Current user info |

### Brands

| Method | Path                               | Description           |
| ------ | ---------------------------------- | --------------------- |
| GET    | `/api/creator/brands`              | List creator's brands |
| GET    | `/api/creator/brands/:id`          | Brand hub data        |
| GET    | `/api/creator/brands/:id/strategy` | Brand strategy        |

### Campaigns

| Method | Path                         | Description           |
| ------ | ---------------------------- | --------------------- |
| GET    | `/api/creator/campaigns`     | List active campaigns |
| GET    | `/api/creator/campaigns/:id` | Campaign details      |

### Integrations

| Method | Path                                | Description             |
| ------ | ----------------------------------- | ----------------------- |
| GET    | `/api/creator/integrations`         | List connected accounts |
| POST   | `/api/creator/integrations/connect` | Connect OAuth account   |
| DELETE | `/api/creator/integrations/:id`     | Disconnect account      |

### Chat

| Method | Path                                      | Description              |
| ------ | ----------------------------------------- | ------------------------ |
| GET    | `/api/creator/chat/channels`              | List accessible channels |
| GET    | `/api/creator/chat/channels/:id/messages` | Get messages             |
| POST   | `/api/creator/chat/channels/:id/messages` | Send message             |

### Brand Deals

| Method | Path                                 | Description          |
| ------ | ------------------------------------ | -------------------- |
| GET    | `/api/creator/brand_deals`           | List available deals |
| POST   | `/api/creator/brand_deals/:id/apply` | Apply to deal        |

## Public API

No authentication required (some endpoints need passcode).

### Client Hub

| Method | Path                                     | Description     |
| ------ | ---------------------------------------- | --------------- |
| GET    | `/api/public/client_hubs/:slug`          | Get hub data    |
| POST   | `/api/public/client_hubs/:slug/verify`   | Verify passcode |
| GET    | `/api/public/client_hubs/:slug/overview` | Hub overview    |
| GET    | `/api/public/client_hubs/:slug/roster`   | Creator roster  |

### Reports

| Method | Path                         | Description         |
| ------ | ---------------------------- | ------------------- |
| GET    | `/api/public/reports/:token` | Public brand report |

### Contracts

| Method | Path                               | Description   |
| ------ | ---------------------------------- | ------------- |
| GET    | `/api/public/contracts/:hash`      | View contract |
| POST   | `/api/public/contracts/:hash/sign` | Sign contract |

### Invites

| Method | Path                                    | Description     |
| ------ | --------------------------------------- | --------------- |
| GET    | `/api/public/invite_codes/:code`        | Validate invite |
| POST   | `/api/public/invite_codes/:code/accept` | Accept invite   |

## Webhooks

External services call these endpoints:

| Path                              | Source         | Purpose             |
| --------------------------------- | -------------- | ------------------- |
| `/api/webhooks/slack`             | Slack          | Event subscriptions |
| `/api/webhooks/livekit`           | LiveKit        | Voice room events   |
| `/api/webhooks/metrics_backfills` | ScrapeCreators | Post backfills      |

## Response format

All responses are JSON:

```json theme={null}
{
  "data": { ... },
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 100
  }
}
```

### Error responses

```json theme={null}
{
  "error": "Not found",
  "code": "not_found",
  "details": { ... }
}
```

| Status | Meaning          |
| ------ | ---------------- |
| 400    | Bad request      |
| 401    | Unauthorized     |
| 403    | Forbidden        |
| 404    | Not found        |
| 422    | Validation error |
| 500    | Server error     |

## Rate limiting

* General: 1000 requests/minute
* Client hub passcode: 20 attempts/hour
* OAuth: 60 requests/minute
