POST
/
customers
curl --request POST \
  --url https://api.togai.com/customers \
  --header 'Authorization: <authorization>' \
  --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",
  "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",
    "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
headerrequired

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

Body

application/json
id
string
required

Customer identifier

name
string
required

Name of the Customer

primaryEmail
string
required

Primary email of the customer

address
object
required

billing address of the customer

settings
object[]
account
object

Payload to create account

Response

201 - application/json
id
string
required

Identifier of customer

name
string
required

Name of the Customer

primaryEmail
string
required

Primary email of the customer

billingAddress
string
address
object

billing address of the customer

settings
object[]
account
object

Structure of an account