CNaughtCNaught
PricingSign In

Get List of Subaccounts

Gets a list of subaccounts in reverse chronological order up to the provided limit number of subaccounts per call. Pagination is supported by passing the first subaccount id from a previous call into ending_before to retrieve the previous page, or the last subaccount id from a previous call into starting_after to retrieve the next page.

GET/subaccounts

Authorizations#

Authorization

string

header

required

Bearer authentication header of the form Bearer <token>, where <token> is your CNaught API key.

Query Parameters#

limit

integer | null

default: 20

Limits the number of subaccounts returned, default is 20, max is 100

starting_after

string | null

If specified, returns subaccounts created before (earlier than) the subaccount with this id, exclusive (subaccount with this id is not included). Only one of starting_after and ending_before can be specified.

ending_before

string | null

If specified, returns subaccounts created after (later than) the order with this id, exclusive (subaccount with this id is not included). Only one of starting_after and ending_before can be specified.

Response#

200

List of Subaccounts

Get Vehicle Ride Credits Price Quote

Get List of Subaccounts

curl --request GET \
  --url https://api.cnaught.com/v1/subaccounts \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "5nubL0NS",
      "name": "Marketing Department",
      "email": "jane.doe@example.com",
      "default_portfolio_id": "mHvNvWbq",
      "created_on": "2023-08-01T18:00:00.000000Z"
    }
  ]
}