# Overview (/api-reference)

The reference is generated from the same schemas the API validates requests with, so it always matches what the API accepts.

## Base URL [#base-url]

```txt
https://app.alienmail.io/api/v1
```

Send your API key on every request as `Authorization: Bearer <your API key>`. See [Authentication](/authentication).

## Try it [#try-it]

Each endpoint page has a playground. Enter your API key in **Authorization**, fill in the parameters and body, and press **Send** to call the live API and see the response. Requests go through this site to the API, and your key is not stored.

<Callout type="warn">
Requests from the playground are real. Starting a campaign sends email, and adding, updating and removing leads change your data.
</Callout>

## Endpoints [#endpoints]

| Method | Path | Permission |
|---|---|---|
| `GET` | [`/campaigns`](/api-reference/campaigns/listCampaigns) | `CAMPAIGN_READ` |
| `POST` | [`/campaigns/{id}/start`](/api-reference/campaigns/startCampaign) | `CAMPAIGN_START` |
| `POST` | [`/campaigns/{id}/pause`](/api-reference/campaigns/pauseCampaign) | `CAMPAIGN_STATUS_UPDATE` |
| `GET` | [`/campaigns/{id}/leads`](/api-reference/leads/listLeads) | `CAMPAIGN_READ` |
| `POST` | [`/campaigns/{id}/leads`](/api-reference/leads/addLeads) | `LEAD_CAMPAIGN_ENROLL` |
| `PATCH` | [`/campaigns/{id}/leads/{email}`](/api-reference/leads/updateLead) | `LEAD_CAMPAIGN_ENROLL` |
| `DELETE` | [`/campaigns/{id}/leads/{email}`](/api-reference/leads/removeLead) | `LEAD_CAMPAIGN_ENROLL` |
| `DELETE` | [`/campaigns/{id}/leads`](/api-reference/leads/removeLeads) | `LEAD_CAMPAIGN_ENROLL` |
| `GET` | [`/mailboxes`](/api-reference/mailboxes/listMailboxes) | `SMTP_READ` |
| `PATCH` | [`/mailboxes/{id}`](/api-reference/mailboxes/updateMailbox) | `SMTP_UPDATE` |

## Download the spec [#download-the-spec]

[`/openapi.json`](/openapi.json) is the OpenAPI 3.1 spec. Import it into Postman or Insomnia, or generate a typed client with a tool like `openapi-typescript`.