Skip to navigation

Create a customer alias

Adds another of your IDs for the customer, or for one of its active units when customerUnit is set; usage sent under the value then lands on it, and the value names the customer anywhere the Date Versioned API accepts one. The value must be unique across the account, ignoring case, among aliases, customer external IDs and unit IDs (resource_exists), and can’t be a draft customer’s external ID (alias_held_by_draft_customer). It can’t contain /, \, ?, #, % or a control character, start or end with a space, or start with als_. Signals already held under the value are released to the customer. {customer} takes the customer’s cus_ ID, your externalId, or one of its aliases. {alias} takes the alias’s als_ ID or its value, URL-encoded and matched ignoring letter case, within that customer; a value starting als_ is tried as a Paid ID first.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Path parameters

customerstringRequired1-255 characters

The customer’s cus_ ID, your externalId, or one of its aliases.

Headers

Paid-BetaenumRequired

This endpoint is in the customer_aliases=v1 beta. Send this header to use it.

Allowed values:

Request

Body
valuestringRequired1-255 characters

Your other ID for the customer, unique across your account ignoring letter case, among aliases, customer external IDs and unit IDs. Usage sent under it lands on the customer, or on customerUnit. Can’t change. 1 to 255 characters, with no /, \, ?, #, %, control character or space at either end, and not starting with als_.

customerUnitstring or nullOptional1-255 characters

An active unit of the customer for usage under the alias to land on: its cu_ ID or your externalId. Leave it out, or send null, for the whole customer.

metadatamap from strings to stringsOptional

String key-value pairs of your own, up to 500 characters per value. Always updatable.

sourcestring or nullOptional1-64 characters
Your label for the system that sends under this alias, or null. Up to 64 characters. Defaults to null.

Response

201
idstring
The alias's ID.
objectenum

The type of object. Always customerAlias.

Allowed values:
createdAtdatetime
When the object was created.
archivedAtdatetime or null

When the alias was archived, or null. Archiving is a label: an archived alias still resolves, and usage sent under it still lands on the customer.

customerstring

The customer the alias belongs to, by its cus_ ID.

customerUnitstring or null

The unit of the customer that usage sent under the alias lands on, by its cu_ ID, or null when the alias is for the whole customer.

firstUsedAtdatetime or null

When usage was first recorded under this value, or null while none has been. It can be earlier than createdAt: usage sent under the value before this alias existed counts, such as a signal held and then released, or an earlier alias of the same value. It lags as used does; for aliases used before Paid recorded it, the time is approximate.

livemodeboolean

true for an object on a live account, false on a test account.

metadatamap from strings to strings

String key-value pairs of your own.

sourcestring or null
Your label for the system that sends under this alias, or null.
systemManagedboolean

Whether Paid made the alias: when a customer’s externalId changed, keeping the old ID working, or from a SalesBricks buyer. A system-managed alias can’t be updated, archived, unarchived or deleted.

usedboolean

Whether usage has been recorded under the alias’s value: true once firstUsedAt is set. Naming the customer by the alias in an API call doesn’t count. It 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. A used alias can’t be deleted; delete checks recorded usage itself and never waits for used.

valuestring

Your other ID for the customer, unique across your account ignoring letter case, among aliases, customer external IDs and unit IDs. Usage sent under it lands on the customer, or on customerUnit. Can’t change.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error