POST
/
customers
curl --request POST \
  --url https://api.togai.com/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
  "name": "ACME Enterprise",
  "primaryEmail": "admin@example.com",
  "address": {
    "phoneNumber": "+919876543210",
    "line1": "2281 Broadway Street",
    "line2": "G-31",
    "postalCode": "29501",
    "city": "Florence",
    "state": "South Carolina",
    "country": "US"
  },
  "settings": [
    {
      "id": "customerSettingId",
      "value": "INR",
      "namespace": "USER",
      "name": "Settings Name",
      "dataType": "STRING"
    }
  ],
  "account": {
    "id": "ACC00001",
    "name": "Primary Account",
    "invoiceCurrency": "USD",
    "aliases": [
      "acme_primary",
      "admin@example.com"
    ],
    "settings": [
      {
        "id": "accountSettingId",
        "value": "INR",
        "namespace": "USER",
        "name": "Settings Name",
        "dataType": "STRING"
      }
    ]
  }
}'
{
  "id": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
  "togaiCustomerId": "customer.dsvvre314.dcs314",
  "name": "ACME Enterprise",
  "primaryEmail": "admin@example.com",
  "address": {
    "phoneNumber": "+919876543210",
    "line1": "2281 Broadway Street",
    "line2": "G-31",
    "postalCode": "29501",
    "city": "Florence",
    "state": "South Carolina",
    "country": "US"
  },
  "settings": [
    {
      "id": "customerSettingId",
      "value": "INR",
      "namespace": "USER",
      "name": "Settings Name",
      "dataType": "STRING"
    }
  ],
  "account": {
    "id": "G234DZZKBKACATFFGVGEMERFH",
    "togaiAccountId": "account.safdla.c234ds",
    "customerId": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
    "togaiCustomerId": "customer.savass.11e1a",
    "name": "ACME Enterprise - Account",
    "invoiceCurrency": "USD",
    "status": "ACTIVE",
    "aliases": [
      {
        "alias": "G234DZZKBKACATFFGVGEMERFH",
        "status": "ACTIVE"
      }
    ],
    "settings": [
      {
        "id": "accountSettingId",
        "value": "INR",
        "namespace": "USER",
        "name": "Settings Name",
        "dataType": "STRING"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Payload to create customer

Payload to create customer

id
string
required

Customer identifier

Maximum length: 50
name
string
required

Name of the Customer

Required string length: 3 - 255
primaryEmail
string
required

Primary email of the customer

Maximum length: 320
address
object
required

billing address of the customer

settings
object[]
account
object

Payload to create account

Response

201
application/json
Response for Create customer request
id
string
required

Identifier of customer

Maximum length: 50
togaiCustomerId
string
required

Unique identifier of customer

name
string
required

Name of the Customer

Required string length: 3 - 255
primaryEmail
string
required

Primary email of the customer

Maximum length: 320
billingAddress
string
address
object

billing address of the customer

settings
object[]
account
object

Structure of an account