> This page is for version Preview (default).
> For other versions, use one of these documentation indexes:
> - Preview (default): https://docs.preview.paid.ai/preview/llms.txt
> - Current: https://docs.preview.paid.ai/current/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.preview.paid.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.preview.paid.ai/_mcp/server.

# Customer aliases

> Let systems that can't store Paid's IDs send usage under their own IDs, and have it land on the right customer or unit.

A **customer alias** is another of your IDs for a customer, or for one of its units. Once an alias exists, its value works anywhere the API accepts a customer: on events, orders and in paths. Aliases are for systems that have no way to store Paid's `cus_` ID, such as a product platform that only knows its own workspace IDs. With an alias, usage from every system lands on one customer, one balance and one invoice, instead of a stray draft customer that's never billed.

Use a customer alias to:

* **Accept usage from another system** that sends events under its own ID, without changing what it sends.
* **Route a tenant to a unit**, such as a QA workspace to a non-billable [customer unit](/customers/customer-units).
* **Recover usage** that arrived under an ID before any customer had it: creating the alias releases the usage Paid held for it.
* **Name a person by email**, so their usage and their [seat](/orders-and-billing/seats) find the right unit.

Customer aliases are in the `customer_aliases=v1` beta: send `Paid-Beta: customer_aliases=v1` with each request.

## How aliases resolve

Wherever a request names a customer, Paid looks the value up in this order:

1. A Paid ID, if the value starts `cus_`.
2. A customer's `externalId`.
3. An alias, archived or not.

An alias `value` is unique across your account, ignoring letter case, among every alias, every customer's `externalId` and every unit's `externalId`. So a value always names exactly one customer, whichever system sends it.

Prefer Paid's IDs wherever you can store them. An alias is the fallback for a system that can't.

## Create an alias

Litware creates its customers from its CRM, so Northwind Traders is `cus_8HqL2xT`, with the CRM's ID `northwind` as its `externalId`. Litware's ticketing platform sends usage under its own workspace ID for Northwind, `ws_northwind_prod`, and has nowhere to store Paid's. Litware adds the workspace ID as an alias:

#### API

[Create a customer alias](../api-reference/customers/customer-aliases/create) on the customer, naming the system that uses it in `source`:

**`POST /v1/customers/cus_8HqL2xT/aliases`**

```json title="POST /v1/customers/cus_8HqL2xT/aliases"
{
  "value": "ws_northwind_prod",
  "source": "ticketing"
}
```

**`Response`**

```json title="Response"
{
  "id": "als_8Tn2Vc",
  "object": "customerAlias",
  "livemode": false,
  "customer": "cus_8HqL2xT",
  "customerUnit": null,
  "value": "ws_northwind_prod",
  "source": "ticketing",
  "systemManaged": false,
  "used": false,
  "firstUsedAt": null,
  "metadata": {},
  "createdAt": "2026-11-01T09:00:00Z",
  "archivedAt": null
}
```

#### Dashboard

> **Draft**
>
> These steps describe the planned v1 dashboard and will change before release.

1. Go to **Operate > Customers** and open **Northwind Traders**.
2. On the **Aliases** tab, click **Add alias**.
3. Enter the **Value** (`ws_northwind_prod`) and, under **Source**, the system that uses it (`ticketing`).
4. To point the alias at a unit, choose it under **Unit**.
5. Click **Add alias**.

| Field          | What it's for                                                                                                                                                                       |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `value`        | The ID your other system uses, 1 to 255 characters. It can't contain `/`, `\`, `?`, `#`, `%` or a control character, start or end with a space, or start with `als_`. Can't change. |
| `customerUnit` | An active unit of the customer to point the alias at, by `cu_` ID or your unit ID. Leave it out to point at the whole customer.                                                     |
| `source`       | Which of your systems uses the value, such as `ticketing` or `crm`, up to 64 characters. A label for you and a list filter: it doesn't change how the alias resolves.               |
| `metadata`     | String key-value pairs of your own.                                                                                                                                                 |

A value a draft customer already holds as its `externalId` is refused with `alias_held_by_draft_customer`. Usage sent under the value before the alias existed and held by Paid is released to the customer when you create the alias.

The ticketing platform keeps sending its own ID, and the usage lands on Northwind:

**`POST /v1/events`**

```json title="POST /v1/events"
{
  "eventName": "ticket.resolved",
  "customer": "ws_northwind_prod",
  "product": "support_agent",
  "dedupeKey": "tkt_51882"
}
```

The stored event's `customer` is `cus_8HqL2xT`.

## Point an alias at a unit

Set `customerUnit` to send everything under an alias to one [unit](/customers/customer-units). Northwind also has a QA workspace on the ticketing platform, which Litware models as a non-billable unit `qa`:

**`POST /v1/customers/cus_8HqL2xT/aliases`**

```json title="POST /v1/customers/cus_8HqL2xT/aliases"
{
  "value": "ws_northwind_qa",
  "customerUnit": "qa",
  "source": "ticketing"
}
```

Events sent as `customer: "ws_northwind_qa"` now land on Northwind's QA unit: recorded, never billed. Because aliases are unique across your account, this is also how a system that only knows a unit names it on its own, without the customer.

## Change or retire an alias

[Update an alias](../api-reference/customers/customer-aliases/update) to change its `source` or `metadata` at any time. `value`, `customer` and `customerUnit` never change.

* `used` says whether usage has been recorded under an alias's value, and `firstUsedAt` when usage was first recorded under this value. Naming the customer by the alias in an API call doesn't count. `firstUsedAt` can be earlier than the alias's `createdAt`: usage sent under the value before the alias existed counts, such as a signal held and then released, or an earlier alias of the same value.
* `used` is usually a few minutes behind. Usage recorded late (repaired, or released from hold after the alias was created) can take up to a day, and usage recorded more than three days after it happened is counted only when Paid next runs a full catch-up.
* An alias no usage was ever sent under can be [deleted](../api-reference/customers/customer-aliases/delete), which frees its value. Paid checks the usage it recorded when you delete, without waiting for `used`.
* An alias that has been used can't be deleted. When you stop sending under it, [archive](../api-reference/customers/customer-aliases/archive) it: it leaves the default list, but it keeps working, so usage sent late or backfilled under it still lands on the customer. [Unarchive](../api-reference/customers/customer-aliases/unarchive) puts it back in the list.

When a customer's `externalId` changes, Paid keeps the old ID as an alias so usage sent under it still lands. Aliases Paid makes have `systemManaged: true` and can't be updated, archived or deleted.

## Related

* [Customers](/customers/customers)
* [Customer units](/customers/customer-units)
* [Sending events](/usage/sending-events)
* [Customer aliases API reference](../api-reference/customers/customer-aliases/create)