# Projects API

Add projects to a workspace and mint the keys they send with.

**All-access key.** These endpoints act on your account rather than inside one project, so a project-scoped key can't reach them. See [Authentication](https://emailbump.com/docs/api-keys).

## Endpoints

- `POST /v1/projects`
- `POST /v1/projects/{project_id}/api-keys`

A project is a sending unit inside a workspace, with its own contacts, campaigns, flows, domains, and keys. Every workspace starts with one; this adds more.

## Create a project

**Body parameters**

- `workspace_id` — *string*, required — The workspace that will own the project.
- `name` — *string*, required — Project display name.

```bash
curl -X POST https://emailbump.com/api/v1/projects \
  -H "Authorization: Bearer ebk_all_access_key" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "b1c2…",
    "name": "Acme Newsletter"
  }'
```

```json
{
  "project": {
    "id": "7a10…",
    "workspace_id": "b1c2…",
    "name": "Acme Newsletter",
    "slug": "acme-newsletter-3f9a2b"
  }
}
```

Contacts, campaigns, flows, lists, and templates are all project resources — create them with the [project API](https://emailbump.com/docs/api-reference), using the key below or this one plus an `X-Project-Id` header.

## Mint a project key

A project-scoped `ebk_` key for the application that will send from this project. The secret is returned once and never again.

**Body parameters**

- `name` — *string*, required — Names the key in the project's request log, e.g. `checkout-production`.

```bash
curl -X POST https://emailbump.com/api/v1/projects/7a10…/api-keys \
  -H "Authorization: Bearer ebk_all_access_key" \
  -H "Content-Type: application/json" \
  -d '{ "name": "server" }'
```

```json
{
  "key": "ebk_…",
  "api_key": { "id": "9d70…", "name": "server", "prefix": "ebk_1a2b3c4" }
}
```
