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 "previous_page_uri": null,
6 "page": 0,
7 "page_size": 50,
8 "accounts": [
9 {
10 "sid": "b3877c40-da60-4998-90ad-b792e98472af",
11 "friendly_name": "My Project",
12 "status": "active",
13 "auth_token": "redacted",
14 "date_created": "Sat, 15 Sep 2018 10:00:00 +0000",
15 "date_updated": "Sat, 16 Sep 2018 10:00:00 +0000",
16 "type": "Full",
17 "owner_account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
18 "region_preference": "us-east",
19 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af",
20 "subproject": false,
21 "signing_key": null,
22 "subresource_uris": {
23 "addresses": null,
24 "available_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers",
25 "applications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications",
26 "authorized_connect_apps": null,
27 "calls": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls",
28 "conferences": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences",
29 "connect_apps": null,
30 "incoming_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers",
31 "keys": null,
32 "notifications": null,
33 "outgoing_caller_ids": null,
34 "queues": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues",
35 "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Recordings",
36 "sandbox": null,
37 "sip": null,
38 "short_codes": null,
39 "messages": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Messages",
40 "transcriptions": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Transcriptions",
41 "usage": null
42 }
43 }
44 ]
45}

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()