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
Parameters
None.Response
| Field | Type | Notes |
|---|---|---|
accounts | array | Customer accounts the user has access to |
accounts[].id | integer | Customer ID |
accounts[].company | string | Company name |
accounts[].name | string | Display name |
accounts[].role | string | User role on this customer (MEMBER, ADMIN, SUPER_ADMIN) |
Errors
401 UNAUTHORIZED— missing or invalid bearer token.
Related
Account tasks
All account operations
Get current account
Your current context
Create child account
Add a child customer