Saltar al contenido principal
GET
/
v1
/
phone
List Phones
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
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de consulta

after
string<uuid> | null
before
string<uuid> | null
page
integer | null
Rango requerido: x >= 1
limit
integer
predeterminado:20
Rango requerido: 1 <= x <= 100
order
enum<string>
predeterminado:desc
Opciones disponibles:
asc,
desc
inbound_agent_id
string<uuid> | null
outbound_agent_id
string<uuid> | null
status
enum<string> | null

Enum representing the status of a phone number register. The cycle is as follows:

  • RESERVED: The phone number is reserved for a certain amount of time before being assigned
  • ASSIGNED: The phone number is assigned to a company
  • RELEASED: The phone number is released from the company and is pending availability for purchase (30 days before it can be purchased again)
  • FINISHED: The phone register process is finished, and the phone number is available for purchase again. Once a phone number reaches this status, it cannot return to previous statuses.
Opciones disponibles:
reserved,
assigned,
released,
finished
start_assigned_at
string<date-time> | null
end_assigned_at
string<date-time> | null

Respuesta

Successful Response

data
PhoneRegisterResponseSchema · object[]
requerido
has_more
boolean
requerido
first_id
string<uuid> | null
last_id
string<uuid> | null
current_page
integer | null
total_pages
integer | null