# Agencies: client workspaces through the API

> Add, rename, cap and archive an agency's client workspaces with the Ladoo API, read each client's monthly usage, bill clients through your Stripe, and automate inside a client's workspace.

Source: https://tryladoo.com/docs/developers/agencies-and-client-workspaces · Updated 2026-11-21

On the Agency plan, each business you serve gets its own [client workspace](https://tryladoo.com/docs/agencies/client-workspaces) under your agency workspace. The API can do the agency's side of that: add clients, set their minute caps, read their usage and bill them. These endpoints work only with a key made in the agency workspace; anywhere else they answer `409 not_an_agency`.

## Add a client workspace

```sh
curl https://api.tryladoo.com/v1/clients \
  -H "Authorization: Bearer $LADOO_AGENCY_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 3c9e1f7a-5b2d-4e8c-a0f1-6d4b2c8e9a10" \
  -d '{ "name": "Rivera Plumbing", "slug": "rivera-plumbing" }'
```

- Needs `clients:write`. `slug` is optional: lowercase letters, numbers and dashes, 3 to 48 characters.
- The agency's owners and admins can open the new workspace straight away, as admins. Invite the client's own people from inside it.
- When the plan has no room for another client, the answer is `402 client_workspace_limit`.
- Send an `Idempotency-Key`, so a retry after a network error doesn't add the client twice.
- Add `from_template` to start the client's first agent from one of your [agent templates](https://tryladoo.com/docs/developers/agent-templates) in the same request: `{ "template_id": "…", "name": "Ava", "variables": { "office_number": "+15125550111" } }`. This needs `agents:write` as well.

## List clients and their usage

- `GET /v1/clients` lists every client workspace, archived ones included, with its member count and minute cap (`clients:read`). With `billing:read`, each one also shows what you bill it.
- `GET /v1/clients/usage` gives each client's calls and minutes for the agency's current billing period, the one caps count against. Add `?month=2026-10` for a calendar month, in UTC.

## Caps, renames and archiving

`PATCH /v1/clients/{id}` (`clients:write`) changes a client:

```json
{
  "name": "Rivera Plumbing & Drains",
  "cap": {
    "monthly_minutes": 500,
    "at_cap": "forward",
    "fallback_number": "+15555550123"
  }
}
```

- `cap` replaces the client's [monthly minute cap](https://tryladoo.com/docs/agencies/client-minute-caps). `monthly_minutes: null` removes it. At the cap, `continue` keeps answering and counts the extra minutes; `forward` sends live calls to `fallback_number` without answering.
- `"archived": true` hides the workspace and closes it to everyone. Its phone numbers stop answering (callers hear it's unavailable) until you restore it with `"archived": false` or release the numbers. A restored client counts against the plan's limit again.

## Bill clients through your Stripe

With your Stripe account connected under **Settings → Client workspaces**, Ladoo can invoice each client from it. See [Bill clients through Stripe](https://tryladoo.com/docs/agencies/bill-clients-through-stripe).

- `PUT /v1/clients/{id}/billing` (`billing:write`) starts billing a client, or changes the price from its next invoice. The first call creates the customer and subscription on your Stripe account.
- `DELETE /v1/clients/{id}/billing` stops it. The subscription ends at the end of the current period.

## Work inside a client's workspace

An API key belongs to one workspace. A key made in the agency workspace manages the client list, but it can't read a client's calls or change its agent.

To automate inside a client's workspace, make a key there:

1. In Ladoo, click the workspace name at the top left and choose the client.
2. Go to **Settings → Developers** and create a key with the scopes that integration needs.
3. Use that key for the client's calls, people, agents and webhooks.

Each client's key, webhooks and data stay separate from every other client's, so one client's integration can never see another's callers. If an agency owner or admin who made a client's key leaves the agency, the key stops working too (see [Authentication and scopes](https://tryladoo.com/docs/developers/authentication-and-scopes#a-key-never-does-more-than-the-person-who-made-it)).

> **Tip:** Webhook events carry `workspace_id`. If one server takes events from several clients, give each client's endpoint its own signing secret and check the event's `workspace_id` against the client you expect.

## Your brand

Agencies can put their own name and logo on their clients' emails, dashboard and chat widgets. `GET /v1/brand` and `PATCH /v1/brand` read and change it; see [White-label](https://tryladoo.com/docs/agencies/white-label) for what each setting does.
