Telephony

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

OpenAPI-Spezifikation herunterladen

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Abfrage Parameter

extension
string
Beispiel1234
page_size
string
Standard100
Beispiel100

Return max this amount of calls in the response.

order
string
Beispielasc

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

start_time
string
Beispiel1595955770

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

end_time
integer
Beispiel1595955770

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

Pfad Parameter

account_id
string
Erforderlich
Beispiel1234

Antworten
Inhalt Typ

200 response

calls
array
account_id
string
Beispiel1234
call_id
string
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6
direction
string
Beispielinbound
Muss eines der folgenden sein:inboundoutbound
end_time
string(date-time)
Beispiel1595959736
from
string
Beispiel1235551111
legs
array
account_id
string
Beispiel1234

Account that this call leg belongs to

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

Call Id this call belongs to

direction
string
Beispielinbound

Leg direction - either "inbound" or "outbound"

Muss eines der folgenden sein:inboundoutbound
end_time
string(date-time)
Beispiel1595959736

Call end time (if applicable)

from
string
Beispiel1231112222

The "from" DID or extension

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

Globally unique leg Id

start_time
string(date-time)
Beispiel1595959736

Call start time

status
string
Beispielbusy

current leg status

Muss eines der folgenden sein:busyfailedunansweredringingon-call
to
string
Beispiel1234567890

The "to" DID or extension

start_time
string(date-time)
Beispiel1595959736
status
string
Beispielbusy
Muss eines der folgenden sein:busyfailedunansweredringingon-call
to
string
Beispiel1234567890
current_page
string
first_page_uri
string
Beispiel/cc/accounts/1234/calls?page_size=0&order=desc
next_page
string
Beispiel1
next_page_uri
string
Beispiel/cc/accounts/1234/calls?page_size=0&order=desc
order
string
Beispieldesc
page_size
string
Beispiel1
pages
string
Beispiel1
previous_page_uri
string
Beispiel/cc/accounts/1234/calls?page_size=0&order=desc

Beispiel Antwort

{
   "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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Pfad Parameter

account_id
string
Erforderlich
Beispiel1234

Anfrage Körper
Inhalt Typ
application/json

from
object
destination
string
Beispiel1234
type
string
Beispielextension
Muss eines der folgenden sein:deviceextensionfeature_code
to
object
destination
string
Beispiel1234567890
type
string
Beispielpstn
Muss eines der folgenden sein:deviceextensionpstnfeature_code
type
string
Beispielclick2dial
Muss eines der folgenden sein:click2dialclick2dialmeodrdefault

Beispiel Anfrage

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

Antworten
Inhalt Typ

200 response

Beispiel Antwort

Die Beispielvorschau wird derzeit für den Inhaltstyp nicht unterstützt: 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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Pfad Parameter

account_id
string
Erforderlich
Beispiel1234
call_id
string
Erforderlich
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6

Antworten
Inhalt Typ

200 response

account_id
string
Beispiel1234
call_id
string
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6
direction
string
Beispielinbound
Muss eines der folgenden sein:inboundoutbound
end_time
string(date-time)
Beispiel1595959736
from
string
Beispiel1235551111
legs
array
account_id
string
Beispiel1234

Account that this call leg belongs to

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

Call Id this call belongs to

direction
string
Beispielinbound

Leg direction - either "inbound" or "outbound"

Muss eines der folgenden sein:inboundoutbound
end_time
string(date-time)
Beispiel1595959736

Call end time (if applicable)

from
string
Beispiel1231112222

The "from" DID or extension

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

Globally unique leg Id

start_time
string(date-time)
Beispiel1595959736

Call start time

status
string
Beispielbusy

current leg status

Muss eines der folgenden sein:busyfailedunansweredringingon-call
to
string
Beispiel1234567890

The "to" DID or extension

start_time
string(date-time)
Beispiel1595959736
status
string
Beispielbusy
Muss eines der folgenden sein:busyfailedunansweredringingon-call
to
string
Beispiel1234567890

Beispiel Antwort

{
   "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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Pfad Parameter

account_id
string
Erforderlich
Beispiel12345
call_id
string
Erforderlich
Beispielc91150a6-8cc4-4e73-9fef-17fd925c6448

Anfrage Körper
Inhalt Typ
application/json

from
object
destination
string
Beispiel1234567890
type
string
Beispielpstn
Muss eines der folgenden sein:deviceextensionpstn
state
string
Muss eines der folgenden sein:activeparked
to
object
destination
string
Beispiel1234567890
type
string
Beispielpstn
Muss eines der folgenden sein:deviceextensionpstn

Beispiel Anfrage

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

Antworten
Inhalt Typ
application/json

200 response

account_id
string(integer)
Beispiel1234
call_id
string(uuid)
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6
call_state
string
destination
string

Beispiel Antwort

{
   "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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Pfad Parameter

account_id
string
Erforderlich
Beispiel1234
call_id
string
Erforderlich
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6

Antworten
Inhalt Typ

200 response

account_id
string(integer)
Beispiel1234
call_id
string(uuid)
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6
call_state
string
destination
string

Beispiel Antwort

{
   "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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Pfad Parameter

account_id
string
Erforderlich
Beispiel1234
call_id
string
Erforderlich
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6

Antworten
Inhalt Typ

200 response

array
account_id
string
Beispiel1234

Account that this call leg belongs to

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

Call Id this call belongs to

direction
string
Beispielinbound

Leg direction - either "inbound" or "outbound"

Muss eines der folgenden sein:inboundoutbound
end_time
string(date-time)
Beispiel1595959736

Call end time (if applicable)

from
string
Beispiel1231112222

The "from" DID or extension

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

Globally unique leg Id

start_time
string(date-time)
Beispiel1595959736

Call start time

status
string
Beispielbusy

current leg status

Muss eines der folgenden sein:busyfailedunansweredringingon-call
to
string
Beispiel1234567890

The "to" DID or extension

Beispiel Antwort

[
   {
      "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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Pfad Parameter

leg_id
string
Erforderlich
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6
account_id
string
Erforderlich
Beispiel1234
call_id
string
Erforderlich
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6

Antworten
Inhalt Typ

200 response

account_id
string
Beispiel1234

Account that this call leg belongs to

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

Call Id this call belongs to

direction
string
Beispielinbound

Leg direction - either "inbound" or "outbound"

Muss eines der folgenden sein:inboundoutbound
end_time
string(date-time)
Beispiel1595959736

Call end time (if applicable)

from
string
Beispiel1231112222

The "from" DID or extension

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

Globally unique leg Id

start_time
string(date-time)
Beispiel1595959736

Call start time

status
string
Beispielbusy

current leg status

Muss eines der folgenden sein:busyfailedunansweredringingon-call
to
string
Beispiel1234567890

The "to" DID or extension

Beispiel Antwort

{
   "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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Pfad Parameter

account_id
string
Erforderlich
Beispiel1234
call_id
string
Erforderlich
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6
leg_id
string
Erforderlich
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6

Anfrage Körper
Inhalt Typ
application/json

Einer der
Einer der
state
string
Beispielheld

Beispiel Anfrage

{
   "state": "held"
}

Antworten
Inhalt Typ
application/json

200 response

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

Beispiel Antwort

{
   "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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Pfad Parameter

account_id
string
Erforderlich
Beispiel1234
call_id
string
Erforderlich
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6
leg_id
string
Erforderlich
Beispiel3fa85f64-5717-4562-b3fc-2c963f66afa6

Antworten
Inhalt Typ

204 response

Get account device's registration info

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Abfrage Parameter

page_size
string
Standard100
Beispiel10

Return max this number of devices in the response.

order
string
Beispielasc

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

start_time
string
Beispiel1595955770

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

end_time
integer
Beispiel1595955770

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

Pfad Parameter

account_id
string
Erforderlich
Beispiel1234

Antworten
Inhalt Typ

200 response

current_page
string
Beispiel1
devices
array
account_id
string
Beispiel1234
device_ip
string
Beispiel150.24.83.17
last_request
string
Beispiel1595937421
last_success
string
Beispiel1595937421
mac_address
string
Beispiel79-5C-7D-28-1B-B3
registration
object
last_success
string
Beispiel1595937421
provisioned
object
last_success
string
Beispiel1595937421
last_request
string
Beispiel1595937421
first_page_uri
string
Beispiel/registration/accounts/1234/devices?page_size=100&order=desc
next_page
string
next_page_uri
string
Beispiel/registration/accounts/1234/devices?page_size=100&order=desc
order
string
Beispieldesc
page_size
string
Beispiel10
pages
string
Beispiel2
previous_page_uri
string
Beispiel/registration/accounts/1234/devices?page_size=100&order=desc

Beispiel Antwort

{
   "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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr OAuth-Token.
Lesen Sie mehr über OAuth-Tokens

Headers

Bearer <access_token>

Pfad Parameter

account_id
string
Erforderlich
Beispiel1234
device_id
string
Erforderlich
Beispiel38-99-62-93-E2-A9

Mac address of device

Antworten
Inhalt Typ

200 response

account_id
string
Beispiel1234
device_ip
string
Beispiel150.24.83.17
last_request
string
Beispiel1595937421
last_success
string
Beispiel1595937421
mac_address
string
Beispiel79-5C-7D-28-1B-B3
registration
object
last_success
string
Beispiel1595937421
provisioned
object
last_success
string
Beispiel1595937421
last_request
string
Beispiel1595937421

Beispiel Antwort

{
   "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
   }
}