import requests
url = "https://api.diga.io/v1/phone/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"telephony_provider": "netelip",
"status": "reserved",
"nickname": "<string>",
"released_at": "2023-11-07T05:31:56Z",
"assigned_at": "2023-11-07T05:31:56Z",
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"has_more": true,
"first_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_page": 123,
"total_pages": 123
}Retrieve a list of phones, optionally filtered by agent ID.
import requests
url = "https://api.diga.io/v1/phone/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"telephony_provider": "netelip",
"status": "reserved",
"nickname": "<string>",
"released_at": "2023-11-07T05:31:56Z",
"assigned_at": "2023-11-07T05:31:56Z",
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"has_more": true,
"first_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_page": 123,
"total_pages": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
x >= 11 <= x <= 100asc, desc Enum representing the status of a phone number register. The cycle is as follows:
reserved, assigned, released, finished