accounts

List Post

POST
Gets a list of accounts.

Request

This endpoint expects an object.
created_by
list of stringsOptional
Filters for accounts created by the specified user(s).
created_date
objectOptional
cursor
stringOptional
The cursor to resume iteration from. If not provided, then iteration starts from the beginning.
display_name
list of stringsOptional
Array of display names of accounts to be filtered.
external_refs
list of stringsOptional
Array of references of accounts to be filtered.
limit
integerOptional
The maximum number of accounts to return per page. The default is '50'.
mode
enumOptional
The iteration mode to use. If "after", then entries after the provided cursor will be returned, or if no cursor is provided, then from the beginning. If "before", then entries before the provided cursor will be returned, or if no cursor is provided, then from the end. Entries will always be returned in the specified sort-by order.
Allowed values: afterbefore
modified_date
objectOptional
sort_by
list of stringsOptional
Fields to sort the accounts by and the direction to sort them in.
stage
list of stringsOptional
Filters for accounts on specified stages.

Response

This endpoint returns an object
accounts
list of objects
List containing all the accounts
next_cursor
stringOptional
The cursor used to iterate subsequent results in accordance to the sort order. If not set, then no later elements exist.
prev_cursor
stringOptional
The cursor used to iterate preceding results in accordance to the sort order. If not set, then no prior elements exist.
POST
1curl -X POST https://api.devrev.ai/accounts.list \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{}'
Response
1{
2 "accounts": [
3 {
4 "external_refs": [
5 "external_refs"
6 ],
7 "id": "id",
8 "owned_by": [],
9 "created_date": "2023-01-01T12:00:00Z",
10 "description": "description",
11 "display_id": "display_id",
12 "display_name": "display_name",
13 "domains": [
14 "domains"
15 ],
16 "modified_date": "2023-01-01T12:00:00Z",
17 "tier": "tier"
18 }
19 ],
20 "next_cursor": "next_cursor",
21 "prev_cursor": "prev_cursor"
22}