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
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

togaiCustomerId
string
required

Unique 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