Customers

Create customer

Create a new customer.

post/api/v1/customers

Request body

currencystring

Three-letter ISO4217 currency code. Custom three-letter currency codes are also supported for convenience.

descriptionstring

Optional description of the resource. Maximum 1024 characters.

keystring

An optional unique key of the customer. Either key or usageAttribution.subjectKeys must be provided. Useful to reference the customer in external systems. For example, your database ID.

metadataMetadata

Set of key-value pairs. Metadata can be used to store additional information about a resource.

namestring required

Human-readable name for the resource. Between 1 and 256 characters.

primaryEmailstring

The primary email address of the customer.

Example request

{
  "billingAddress": {
    "country": "US"
  },
  "currency": "USD",
  "metadata": {
    "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
  }
}

Response

The request has succeeded and a new resource has been created as a result.

annotationsAnnotations

Set of key-value pairs managed by the system. Cannot be modified by user.

createdAtstring date-time required

Timestamp of when the resource was created.

currencystring

Three-letter ISO4217 currency code. Custom three-letter currency codes are also supported for convenience.

currentSubscriptionIdstring

The ID of the Subscription if the customer has one.

deletedAtstring date-time

Timestamp of when the resource was permanently deleted.

descriptionstring

Optional description of the resource. Maximum 1024 characters.

idstring required

A unique identifier for the resource.

keystring

An optional unique key of the customer. Either key or usageAttribution.subjectKeys must be provided. Useful to reference the customer in external systems. For example, your database ID.

metadataMetadata

Set of key-value pairs. Metadata can be used to store additional information about a resource.

namestring required

Human-readable name for the resource. Between 1 and 256 characters.

primaryEmailstring

The primary email address of the customer.

updatedAtstring date-time required

Timestamp of when the resource was last updated.

Example response

{
  "createdAt": "2024-01-01T01:01:01.001Z",
  "id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "name": "ACME Inc.",
  "updatedAt": "2024-01-01T01:01:01.001Z",
  "usageAttribution": {
    "subjectKeys": [
      "my_subject_key"
    ]
  }
}

Changes

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