customers

Create a new customer

Creates a new customer for the organization. externalId shares one set of ids with customer unit ids and aliases, unique across the organization and ignoring letter case: an external id that another customer already holds as a unit id or alias, or as its external id in another case, is refused with 409 EXTERNAL_ID_IN_USE. The same id in the same case is 400 DUPLICATE_EXTERNAL_ID, as before.

post/customers/

Request

  • Base URL: https://api.agentpaid.io/api/v2
  • URL: https://api.agentpaid.io/api/v2/customers/
  • Auth: HTTP bearer

Request body

namestring required
legalNamestring nullable
emailstring email
phonestring
websitestring
externalIdstring nullable
creationState'draft' | 'active'
vatNumberstring nullable
metadataobject nullable
defaultCurrencystring

Response

201

idstring required

Stable Paid customer display ID. Use this value as the {id} path parameter for customer routes, for example GET /api/v2/customers/cus_abc123/state.

namestring required
legalNamestring nullable required
emailstring required
phonestring required
websitestring required
externalIdstring nullable required
creationState'draft' | 'active' required
status'active' | 'churned' required

Customer status: churned when the customer is marked as churned, active otherwise.

churnDatestring date-time nullable required
vatNumberstring nullable required
metadataobject nullable required
defaultCurrencystring required

ISO 4217 currency code, for example USD, EUR, or GBP.

createdAtstring date-time required
updatedAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.