Skip to main content
POST
/
customers
Create a customer
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": "[email protected]",
  "address": {
    "phoneNumber": "<string>",
    "line1": "<string>",
    "line2": "<string>",
    "postalCode": "<string>",
    "city": "<string>",
    "state": "<string>",
    "country": "<string>"
  },
  "settings": [
    {
      "id": "<string>",
      "value": "<string>",
      "namespace": "<string>",
      "name": "<string>",
      "dataType": "STRING"
    }
  ],
  "account": {
    "id": "ACC00001",
    "name": "Primary Account",
    "invoiceCurrency": "<string>",
    "aliases": "acme_primary",
    "accountAliases": [
      {
        "value": "<string>",
        "effectiveFrom": "2023-11-07T05:31:56Z",
        "effectiveUntil": "2023-11-07T05:31:56Z"
      }
    ],
    "address": {
      "phoneNumber": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "postalCode": "<string>",
      "city": "<string>",
      "state": "<string>",
      "country": "<string>"
    },
    "primaryEmail": "[email protected]",
    "billingInformation": {
      "emailRecipients": [
        "<string>"
      ],
      "additionalEmailRecipients": [
        "<string>"
      ]
    },
    "settings": [
      {
        "id": "<string>",
        "value": "<string>",
        "namespace": "<string>",
        "name": "<string>",
        "dataType": "STRING"
      }
    ],
    "netTermDays": 45,
    "metadata": {},
    "tags": [
      "<string>"
    ],
    "status": "ACTIVE"
  }
}
'
{
  "id": "<string>",
  "togaiCustomerId": "<string>",
  "name": "<string>",
  "primaryEmail": "<string>",
  "billingAddress": "<string>",
  "address": {
    "phoneNumber": "<string>",
    "line1": "<string>",
    "line2": "<string>",
    "postalCode": "<string>",
    "city": "<string>",
    "state": "<string>",
    "country": "<string>"
  },
  "settings": [
    {
      "id": "<string>",
      "value": "<string>",
      "namespace": "<string>",
      "name": "<string>",
      "dataType": "STRING"
    }
  ],
  "account": {
    "id": "<string>",
    "togaiAccountId": "<string>",
    "togaiCustomerId": "<string>",
    "name": "<string>",
    "customerId": "<string>",
    "status": "ACTIVE",
    "invoiceCurrency": "USD",
    "aliases": [
      {
        "alias": "<string>"
      }
    ],
    "netTermDays": 123,
    "address": {
      "phoneNumber": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "postalCode": "<string>",
      "city": "<string>",
      "state": "<string>",
      "country": "<string>"
    },
    "primaryEmail": "[email protected]",
    "billingInformation": {
      "emailRecipients": [
        "<string>"
      ],
      "additionalEmailRecipients": [
        "<string>"
      ]
    },
    "settings": [
      {
        "id": "<string>",
        "value": "<string>",
        "namespace": "<string>",
        "name": "<string>",
        "dataType": "STRING"
      }
    ],
    "invoiceGroupDetails": {
      "id": "<string>",
      "name": "<string>",
      "email": "<string>",
      "dailyInvoiceConsolidation": true,
      "invoiceCurrency": "<string>",
      "billingAddress": {
        "phoneNumber": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "postalCode": "<string>",
        "city": "<string>",
        "state": "<string>",
        "country": "<string>"
      },
      "netTermDays": 123
    },
    "metadata": {},
    "tags": [
      "<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 string length: 50
Example:

"01BX5ZZKBKACTAV9WEVGEMMVRZ"

name
string
required

Name of the Customer

Required string length: 3 - 255
Example:

"ACME Enterprise"

primaryEmail
string
required

Primary email of the customer

Maximum string length: 320
address
object
required

billing address of the customer

settings
object[]
Maximum array length: 10
account
object

Payload to create account

Response

Response for Create customer request

id
string
required

Identifier of customer

Maximum string 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 string length: 320
billingAddress
string
address
object

billing address of the customer

settings
object[]
Maximum array length: 10
account
object

Structure of an account