Skip to main content
GET /api/v2/accounts Returns all customer accounts the authenticated user has active membership on. Use it to populate an account switcher or to discover the id you pass to admin operations.

Request

curl
curl https://api.interchange.io/api/v2/accounts \
  -H "Authorization: Bearer $SCOPE3_API_KEY"

Parameters

None.

Response

{
  "accounts": [
    {
      "id": 100,
      "company": "Acme Inc",
      "name": "Acme",
      "role": "ADMIN"
    },
    {
      "id": 205,
      "company": "Acme Retail",
      "name": "Acme Retail",
      "role": "MEMBER"
    }
  ]
}
FieldTypeNotes
accountsarrayCustomer accounts the user has access to
accounts[].idintegerCustomer ID
accounts[].companystringCompany name
accounts[].namestringDisplay name
accounts[].rolestringUser role on this customer (MEMBER, ADMIN, SUPER_ADMIN)

Errors

  • 401 UNAUTHORIZED — missing or invalid bearer token.
See Errors for the full error contract.

Account tasks

All account operations

Get current account

Your current context

Create child account

Add a child customer