REST ClientCompatAccounts

list

View as MarkdownOpen in Claude

List accounts.

Query parameters

FriendlyNamestringOptional
A named unique identifier for the resource. Allowed characters: `A-Za-z0-9_-`. Maximum of 100 characters.
PageintegerOptional>=0Defaults to 0
The page number to retrieve. Page numbers are zero-indexed, so the first page is 0.
PageSizeintegerOptional1-1000Defaults to 50
The number of results to return per page. The default is 50, and the maximum is 1000.
PageTokenstringOptional
A token used to retrieve a specific page of results. The token is returned in the response of a previous request.

Response

uristringRequired
The URI of the current page.
first_page_uristringRequired
The URI of the first page.
next_page_uristring or nullRequired
The URI of the next page. Null if there are no more results.
previous_page_uristring or nullRequired
The URI of the previous page. Null if this is the first page.
pageintegerRequired
The current page number (zero-indexed).
page_sizeintegerRequired
The number of results per page.
accountslist of objectsRequired
List of accounts.

Response Example

Response
1{
2 "uri": "/api/laml/2010-04-01/Accounts?Page=0&PageSize=50",
3 "first_page_uri": "/api/laml/2010-04-01/Accounts?Page=0&PageSize=50",
4 "next_page_uri": "/api/laml/2010-04-01/Accounts?Page=1&PageSize=50",
5 "page": 0,
6 "page_size": 50,
7 "accounts": [
8 {
9 "sid": "b3877c40-da60-4998-90ad-b792e98472af",
10 "friendly_name": "My Project",
11 "status": "active",
12 "auth_token": "redacted",
13 "date_created": "Sat, 15 Sep 2018 10:00:00 +0000",
14 "date_updated": "Sat, 16 Sep 2018 10:00:00 +0000",
15 "type": "Full",
16 "owner_account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
17 "region_preference": "us-east",
18 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af",
19 "subproject": false,
20 "subresource_uris": {
21 "available_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers",
22 "applications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications",
23 "calls": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls",
24 "conferences": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences",
25 "incoming_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers",
26 "queues": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues",
27 "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Recordings",
28 "messages": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Messages",
29 "transcriptions": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Transcriptions"
30 }
31 }
32 ]
33}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9accounts = client.compat.accounts.list()