# Workspaces API

Create the billing container an account's projects live in.

**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

- `GET /v1/workspaces`
- `POST /v1/workspaces`

A workspace is the billing boundary: one plan, one bill, and one or more [projects](https://emailbump.com/docs/projects-api) inside it. Create a second workspace when something needs its own separate bill.

## Create a workspace

Creating a workspace also creates a same-named **starter project** inside it on the free plan, and returns both.

**Body parameters**

- `name` — *string*, required — Display name for the workspace.

```bash
curl -X POST https://emailbump.com/api/v1/workspaces \
  -H "Authorization: Bearer ebk_all_access_key" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Acme Agency" }'
```

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

## List workspaces

Every workspace the key's owner belongs to, with its projects:

```bash
curl https://emailbump.com/api/v1/workspaces \
  -H "Authorization: Bearer ebk_all_access_key"
```

```json
{ "data": [ { "workspace": { … }, "projects": [ { … } ] } ] }
```

Those project ids are what you put in `X-Project-Id` to use the [project API](https://emailbump.com/docs/api-reference) with this same key.
