Skip to main content
GET
/
accounts
List accounts of customer
curl --request GET \
  --url https://api.togai.com/accounts \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "G234DZZKBKACATFFGVGEMERFI",
      "togaiAccountId": "account.dsvvre314.dcs314",
      "customerId": "ACME_CUSTOMER_1",
      "togaiCustomerId": "customer.dsvvre314.dcs314",
      "name": "ACME Enterprise - Account2",
      "status": "ACTIVE",
      "aliases": [
        {
          "alias": "account2@acme.com"
        },
        {
          "alias": "+1234567890"
        }
      ]
    }
  ],
  "nextToken": "eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ==",
  "context": {
    "pageSize": 10
  }
}
account_id
string
Unique identifier of the account
customer_id
string
Unique identifier of the customer corresponding to the account
status
enum
Status of the account (`ACTIVE`, `ARCHIVED`)
invoice_currency
string
Currency in which the account is invoiced (`USD`, `EUR`, `INR`…)
account_id
string
customer_id
string
status
string
invoice_currency
string

Allowed filter combinations

  • account_id
  • customer_id
  • status
  • invoice_currency
  • customer_id, status
Fields that can be searched on using _search query param
account_id
string
name
string
primary_email
string
Fields with which the list response can be sorted using _sort query param
account_id
string
updated_at
string
Default sort order:updated_at DESC, account_id ASC

Authorizations

Authorization
string
header
required

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

Query Parameters

nextToken
string
Example:

"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ=="

pageSize
number
Example:

10

Response

Response for list customers request

data
object[]
nextToken
string
context
object
I