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

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 account

Response

201
application/json
Response for Create and Get account requests

Structure of an account