Telephony

The Vonage Business Telephony API enables you to manage calls and retrieve device registration information.

Descargar la especificación OpenAPI

Get list of active calls for a given account (paginated). Please use Reports API to get list of completed calls.

gethttps://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/:account_id/calls

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Consulta Parámetros

extension
string
ejemplo1234
page_size
string
Por defecto100
ejemplo100

Return max this amount of calls in the response.

order
string
ejemploasc

Either ascending or descending order.
Must be one of asc or desc.

start_time
string
ejemplo1595955770

Return the calls that occurred after this point in time.
Should be of type epoch with seconds precision.

end_time
integer
ejemplo1595955770

Return the calls that occurred before this point in time.
Should be of type epoch with seconds precision.

Ruta Parámetros

account_id
string
Requerido
ejemplo1234

Respuestas
Tipo de contenido

200 response

calls
array
account_id
string
ejemplo1234
call_id
string
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6
direction
string
ejemploinbound
Debe ser uno de:inboundoutbound
end_time
string(date-time)
ejemplo1595959736
from
string
ejemplo1235551111
legs
array
account_id
string
ejemplo1234

Account that this call leg belongs to

call_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Call Id this call belongs to

direction
string
ejemploinbound

Leg direction - either "inbound" or "outbound"

Debe ser uno de:inboundoutbound
end_time
string(date-time)
ejemplo1595959736

Call end time (if applicable)

from
string
ejemplo1231112222

The "from" DID or extension

leg_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Globally unique leg Id

start_time
string(date-time)
ejemplo1595959736

Call start time

status
string
ejemplobusy

current leg status

Debe ser uno de:busyfailedunansweredringingon-call
to
string
ejemplo1234567890

The "to" DID or extension

start_time
string(date-time)
ejemplo1595959736
status
string
ejemplobusy
Debe ser uno de:busyfailedunansweredringingon-call
to
string
ejemplo1234567890
current_page
string
first_page_uri
string
ejemplo/cc/accounts/1234/calls?page_size=0&order=desc
next_page
string
ejemplo1
next_page_uri
string
ejemplo/cc/accounts/1234/calls?page_size=0&order=desc
order
string
ejemplodesc
page_size
string
ejemplo1
pages
string
ejemplo1
previous_page_uri
string
ejemplo/cc/accounts/1234/calls?page_size=0&order=desc

Ejemplo Respuesta

{
   "calls": [
      {
         "account_id": 1234,
         "call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
         "direction": "inbound",
         "end_time": 1595959736,
         "from": 1235551111,
         "legs": [
            {
               "account_id": 1234,
               "call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
               "direction": "inbound",
               "end_time": 1595959736,
               "from": 1231112222,
               "leg_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
               "start_time": 1595959736,
               "status": "busy",
               "to": 1234567890
            }
         ],
         "start_time": 1595959736,
         "status": "busy",
         "to": 1234567890
      }
   ],
   "current_page": 0,
   "first_page_uri": "/cc/accounts/1234/calls?page_size=0&order=desc",
   "next_page": 1,
   "next_page_uri": "/cc/accounts/1234/calls?page_size=0&order=desc",
   "order": "desc",
   "page_size": 1,
   "pages": 1,
   "previous_page_uri": "/cc/accounts/1234/calls?page_size=0&order=desc"
}

Create a new call

posthttps://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/:account_id/calls

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Ruta Parámetros

account_id
string
Requerido
ejemplo1234

Cuerpo de la solicitud
Tipo de contenido
application/json

from
object
destination
string
ejemplo1234
type
string
ejemploextension
Debe ser uno de:deviceextensionfeature_code
to
object
destination
string
ejemplo1234567890
type
string
ejemplopstn
Debe ser uno de:deviceextensionpstnfeature_code
type
string
ejemploclick2dial
Debe ser uno de:click2dialclick2dialmeodrdefault

Ejemplo Solicitar

{
   "from": {
      "destination": 1234,
      "type": "extension"
   },
   "to": {
      "destination": 1234567890,
      "type": "pstn"
   },
   "type": "click2dial"
}

Respuestas
Tipo de contenido

200 response

Ejemplo Respuesta

La vista previa de ejemplo no es compatible actualmente con el tipo de contenido: text/plain

Get details for a specific active call.

gethttps://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/:account_id/calls/:call_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Ruta Parámetros

account_id
string
Requerido
ejemplo1234
call_id
string
Requerido
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Respuestas
Tipo de contenido

200 response

account_id
string
ejemplo1234
call_id
string
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6
direction
string
ejemploinbound
Debe ser uno de:inboundoutbound
end_time
string(date-time)
ejemplo1595959736
from
string
ejemplo1235551111
legs
array
account_id
string
ejemplo1234

Account that this call leg belongs to

call_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Call Id this call belongs to

direction
string
ejemploinbound

Leg direction - either "inbound" or "outbound"

Debe ser uno de:inboundoutbound
end_time
string(date-time)
ejemplo1595959736

Call end time (if applicable)

from
string
ejemplo1231112222

The "from" DID or extension

leg_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Globally unique leg Id

start_time
string(date-time)
ejemplo1595959736

Call start time

status
string
ejemplobusy

current leg status

Debe ser uno de:busyfailedunansweredringingon-call
to
string
ejemplo1234567890

The "to" DID or extension

start_time
string(date-time)
ejemplo1595959736
status
string
ejemplobusy
Debe ser uno de:busyfailedunansweredringingon-call
to
string
ejemplo1234567890

Ejemplo Respuesta

{
   "account_id": 1234,
   "call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
   "direction": "inbound",
   "end_time": 1595959736,
   "from": 1235551111,
   "legs": [
      {
         "account_id": 1234,
         "call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
         "direction": "inbound",
         "end_time": 1595959736,
         "from": 1231112222,
         "leg_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
         "start_time": 1595959736,
         "status": "busy",
         "to": 1234567890
      }
   ],
   "start_time": 1595959736,
   "status": "busy",
   "to": 1234567890
}

Update an existing call

puthttps://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/:account_id/calls/:call_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Ruta Parámetros

account_id
string
Requerido
ejemplo12345
call_id
string
Requerido
ejemploc91150a6-8cc4-4e73-9fef-17fd925c6448

Cuerpo de la solicitud
Tipo de contenido
application/json

from
object
destination
string
ejemplo1234567890
type
string
ejemplopstn
Debe ser uno de:deviceextensionpstn
state
string
Debe ser uno de:activeparked
to
object
destination
string
ejemplo1234567890
type
string
ejemplopstn
Debe ser uno de:deviceextensionpstn

Ejemplo Solicitar

{
   "from": {
      "destination": 1234567890,
      "type": "pstn"
   },
   "state": "active",
   "to": {
      "destination": 1234567890,
      "type": "pstn"
   }
}

Respuestas
Tipo de contenido
application/json

200 response

account_id
string(integer)
ejemplo1234
call_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6
call_state
string
destination
string

Ejemplo Respuesta

{
   "account_id": 1234,
   "call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
   "call_state": "string",
   "destination": "string"
}

Delete a call resource

deletehttps://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/:account_id/calls/:call_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Ruta Parámetros

account_id
string
Requerido
ejemplo1234
call_id
string
Requerido
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Respuestas
Tipo de contenido

200 response

account_id
string(integer)
ejemplo1234
call_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6
call_state
string
destination
string

Ejemplo Respuesta

{
   "account_id": 1234,
   "call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
   "call_state": "string",
   "destination": "string"
}

Get list of legs for a given active call

gethttps://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/:account_id/calls/:call_id/legs

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Ruta Parámetros

account_id
string
Requerido
ejemplo1234
call_id
string
Requerido
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Respuestas
Tipo de contenido

200 response

array
account_id
string
ejemplo1234

Account that this call leg belongs to

call_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Call Id this call belongs to

direction
string
ejemploinbound

Leg direction - either "inbound" or "outbound"

Debe ser uno de:inboundoutbound
end_time
string(date-time)
ejemplo1595959736

Call end time (if applicable)

from
string
ejemplo1231112222

The "from" DID or extension

leg_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Globally unique leg Id

start_time
string(date-time)
ejemplo1595959736

Call start time

status
string
ejemplobusy

current leg status

Debe ser uno de:busyfailedunansweredringingon-call
to
string
ejemplo1234567890

The "to" DID or extension

Ejemplo Respuesta

[
   {
      "account_id": 1234,
      "call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "direction": "inbound",
      "end_time": 1595959736,
      "from": 1231112222,
      "leg_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "start_time": 1595959736,
      "status": "busy",
      "to": 1234567890
   }
]

Get details for a specific active call leg

gethttps://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/:account_id/calls/:call_id/legs/:leg_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Ruta Parámetros

leg_id
string
Requerido
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6
account_id
string
Requerido
ejemplo1234
call_id
string
Requerido
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Respuestas
Tipo de contenido

200 response

account_id
string
ejemplo1234

Account that this call leg belongs to

call_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Call Id this call belongs to

direction
string
ejemploinbound

Leg direction - either "inbound" or "outbound"

Debe ser uno de:inboundoutbound
end_time
string(date-time)
ejemplo1595959736

Call end time (if applicable)

from
string
ejemplo1231112222

The "from" DID or extension

leg_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Globally unique leg Id

start_time
string(date-time)
ejemplo1595959736

Call start time

status
string
ejemplobusy

current leg status

Debe ser uno de:busyfailedunansweredringingon-call
to
string
ejemplo1234567890

The "to" DID or extension

Ejemplo Respuesta

{
   "account_id": 1234,
   "call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
   "direction": "inbound",
   "end_time": 1595959736,
   "from": 1231112222,
   "leg_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
   "start_time": 1595959736,
   "status": "busy",
   "to": 1234567890
}

Modify a call leg.

puthttps://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/:account_id/calls/:call_id/legs/:leg_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Ruta Parámetros

account_id
string
Requerido
ejemplo1234
call_id
string
Requerido
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6
leg_id
string
Requerido
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Cuerpo de la solicitud
Tipo de contenido
application/json

Uno de
Uno de
state
string
ejemploheld

Ejemplo Solicitar

{
   "state": "held"
}

Respuestas
Tipo de contenido
application/json

200 response

account_id
string(integer)
ejemplo1234
call_id
string(uuid)
call_state
string
destination
string
leg_id
string(uuid)
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Ejemplo Respuesta

{
   "account_id": 1234,
   "call_id": "0d0a16ab-a508-4d58-bf24-5dc3cb248f3e",
   "call_state": "string",
   "destination": "string",
   "leg_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Delete a call leg.

deletehttps://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/:account_id/calls/:call_id/legs/:leg_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Ruta Parámetros

account_id
string
Requerido
ejemplo1234
call_id
string
Requerido
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6
leg_id
string
Requerido
ejemplo3fa85f64-5717-4562-b3fc-2c963f66afa6

Respuestas
Tipo de contenido

204 response

Get account device's registration info

gethttps://api.vonage.com/t/vbc.prod/telephony/v3/registration/accounts/:account_id/devices

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Consulta Parámetros

page_size
string
Por defecto100
ejemplo10

Return max this number of devices in the response.

order
string
ejemploasc

Either ascending or descending order.
Must be one of asc or desc.

start_time
string
ejemplo1595955770

Return the devices that were registered after this point in time.
Should be of type epoch with seconds precision.

end_time
integer
ejemplo1595955770

Return the devices that were registered before this point in time.
Should be of type epoch with seconds precision.

Ruta Parámetros

account_id
string
Requerido
ejemplo1234

Respuestas
Tipo de contenido

200 response

current_page
string
ejemplo1
devices
array
account_id
string
ejemplo1234
device_ip
string
ejemplo150.24.83.17
last_request
string
ejemplo1595937421
last_success
string
ejemplo1595937421
mac_address
string
ejemplo79-5C-7D-28-1B-B3
registration
object
last_success
string
ejemplo1595937421
provisioned
object
last_success
string
ejemplo1595937421
last_request
string
ejemplo1595937421
first_page_uri
string
ejemplo/registration/accounts/1234/devices?page_size=100&order=desc
next_page
string
next_page_uri
string
ejemplo/registration/accounts/1234/devices?page_size=100&order=desc
order
string
ejemplodesc
page_size
string
ejemplo10
pages
string
ejemplo2
previous_page_uri
string
ejemplo/registration/accounts/1234/devices?page_size=100&order=desc

Ejemplo Respuesta

{
   "current_page": 1,
   "devices": [
      {
         "account_id": 1234,
         "device_ip": "150.24.83.17",
         "last_request": 1595937421,
         "last_success": 1595937421,
         "mac_address": "79-5C-7D-28-1B-B3",
         "registration": {
            "last_success": 1595937421
         },
         "provisioned": {
            "last_success": 1595937421,
            "last_request": 1595937421
         }
      }
   ],
   "first_page_uri": "/registration/accounts/1234/devices?page_size=100&order=desc",
   "next_page": "string",
   "next_page_uri": "/registration/accounts/1234/devices?page_size=100&order=desc",
   "order": "desc",
   "page_size": 10,
   "pages": 2,
   "previous_page_uri": "/registration/accounts/1234/devices?page_size=100&order=desc"
}

Get device registration info

gethttps://api.vonage.com/t/vbc.prod/telephony/v3/registration/accounts/:account_id/devices/:device_id

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Tu token OAuth.
Más información sobre los tokens OAuth

Headers

Bearer <access_token>

Ruta Parámetros

account_id
string
Requerido
ejemplo1234
device_id
string
Requerido
ejemplo38-99-62-93-E2-A9

Mac address of device

Respuestas
Tipo de contenido

200 response

account_id
string
ejemplo1234
device_ip
string
ejemplo150.24.83.17
last_request
string
ejemplo1595937421
last_success
string
ejemplo1595937421
mac_address
string
ejemplo79-5C-7D-28-1B-B3
registration
object
last_success
string
ejemplo1595937421
provisioned
object
last_success
string
ejemplo1595937421
last_request
string
ejemplo1595937421

Ejemplo Respuesta

{
   "account_id": 1234,
   "device_ip": "150.24.83.17",
   "last_request": 1595937421,
   "last_success": 1595937421,
   "mac_address": "79-5C-7D-28-1B-B3",
   "registration": {
      "last_success": 1595937421
   },
   "provisioned": {
      "last_success": 1595937421,
      "last_request": 1595937421
   }
}