Voice API

Version 1

The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls. More information about the Voice API can be found at https://developer.nexmo.com/voice/voice-api/overview. To create IP calls please check the following page: https://developer.vonage.com/en/api/voice.v2. To create and manage calls within specific region, set the application region or use regional URLs as described in the Regions guide.

OpenAPI-Spezifikation herunterladen

Calls

Fetch, Create and Modify voice calls

Get details of your calls

Get details of your calls

gethttps://api.nexmo.com/v1/calls/

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Abfrage Parameter

status
string
Beispielstarted

Filter by call status

Muss eines der folgenden sein:startedringingansweredmachinecompletedbusycancelledfailedrejectedtimeoutunanswered
date_start
string(date-time)
Beispiel2016-11-14T07:45:14Z

Return the records available after this point in time. Please use Reports API for older call information.

date_end
string(date-time)
Beispiel2016-11-14T07:45:14Z

Return the records that occurred before this point in time

page_size
integer
Min1
Max100
Standard10

Return this amount of records in the response

record_index
integer

Return calls from this index in the response

order
string
Standardasc

Either ascending or descending order.

Muss eines der folgenden sein:ascdesc
conversation_uuid
string(uuid)
BeispielCON-f972836a-550f-45fa-956c-12a2ab5b7d22

Return all the records associated with a specific conversation.

Antworten
Inhalt Typ
application/json

OK

count
integer
Beispiel100
page_size
integer
Beispiel10
record_index
integer
_links
object
self
object
href
string
Beispiel/calls?page_size=10&record_index=20&order=asc
first
object
href
string
Beispiel/calls?page_size=10&record_index=20&order=asc
last
object
href
string
Beispiel/calls?page_size=10&record_index=20&order=asc
next
object
href
string
Beispiel/calls?page_size=10&record_index=20&order=asc
prev
object
href
string
Beispiel/calls?page_size=10&record_index=20&order=asc
_embedded
object

A list of call objects. See the get details of a specific call response fields for a description of the nested objects

calls
array
_links
object
self
object
href
string
Beispiel/calls/63f61863-4a51-4f6b-86e1-46edebcf9356
uuid
string(uuid)
Beispiel63f61863-4a51-4f6b-86e1-46edebcf9356

The unique identifier for this call leg. The UUID is created when your call request is accepted by Vonage. You use the UUID in all requests for individual live calls

conversation_uuid
string(uuid)
BeispielCON-f972836a-550f-45fa-956c-12a2ab5b7d22

The unique identifier for the conversation this call leg is part of.

to
Einer der
type
string
Erforderlich
Beispielphone

The type of connection. Must be phone

number
string
Erforderlich
Min7
Max15
Beispiel14155550100

The phone number to connect to

dtmfAnswer
string
Beispielp*123#

Provide DTMF digits to send when the call is answered

shaken
string
BeispieleyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMjEyNTU1MTIxMiJdfSwiaWF0IjoxNjk0ODcwNDAwLCJvcmlnIjp7InRuIjoiMTQxNTU1NTEyMzQifSwib3JpZ2lkIjoiMTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDAwIn0.MEUCIQCrfKeMtvn9I6zXjE2VfGEcdjC2sm5M6cPqBvFyV9XkpQIgLxlvLNmC8DJEKexXZqTZ;info=<https://stir-provider.example.net/cert.cer>;alg=ES256;ppt="shaken"

For Vonage customers who are required by the FCC to sign their own calls to the USA, we allow you to place Voice API calls with your own signature. This feature is available by request only. Please be aware calls with an invalid signature will be rejected. For more information please contact us. In this option, you must place the STIR/SHAKEN Identity Header content that Vonage must use for this call. Expected format is composed of the JWT with the header, payload and signature, an info parameter with a link for the certificate, the algorithm (alg) parameter indicating which encryption type was used and the passport type (ppt) which should be shaken.

from
object

The endpoint you called from. Possible values are the same as to.

type
string
Beispielphone
number
string
Beispiel447700900001
status
string
Beispielcompleted

The status of the call. See possible values

direction
string
Beispieloutbound

Possible values are outbound or inbound

Muss eines der folgenden sein:outboundinbound
rate
string
Beispiel0.39

The price per minute for this call. This is only sent if status is completed.

price
string
Beispiel23.40

The total price charged for this call. This is only sent if status is completed.

duration
string
Beispiel60

The time elapsed for the call to take place in seconds. This is only sent if status is completed.

start_time
string(date-time)
Beispiel2020-01-01 12:00:00

The time the call started in the following format: YYYY-MM-DD HH:MM:SS. For example, 2020-01-01 12:00:00. This is only sent if status is completed.

end_time
string(date-time)
Beispiel2020-01-01 12:00:00

The time the call started in the following format: YYYY-MM-DD HH:MM:SS. For xample, 2020-01-01 12:00:00. This is only sent if status is completed.

network
string
Beispiel65512

The Mobile Country Code Mobile Network Code (MCCMNC) for the carrier network used to make this call. This is only sent if status is completed.

Beispiel Antwort

{
   "count": 100,
   "page_size": 10,
   "record_index": 0,
   "_links": {
      "self": {
         "href": "/calls?page_size=10&record_index=20&order=asc"
      },
      "first": {
         "href": "/calls?page_size=10&record_index=20&order=asc"
      },
      "last": {
         "href": "/calls?page_size=10&record_index=20&order=asc"
      },
      "next": {
         "href": "/calls?page_size=10&record_index=20&order=asc"
      },
      "prev": {
         "href": "/calls?page_size=10&record_index=20&order=asc"
      }
   },
   "_embedded": {
      "calls": [
         {
            "_links": {
               "self": {
                  "href": "/calls/63f61863-4a51-4f6b-86e1-46edebcf9356"
               }
            },
            "uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356",
            "conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22",
            "to": {
               "type": "phone",
               "number": "14155550100",
               "dtmfAnswer": "p*123#",
               "shaken": "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMjEyNTU1MTIxMiJdfSwiaWF0IjoxNjk0ODcwNDAwLCJvcmlnIjp7InRuIjoiMTQxNTU1NTEyMzQifSwib3JpZ2lkIjoiMTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDAwIn0.MEUCIQCrfKeMtvn9I6zXjE2VfGEcdjC2sm5M6cPqBvFyV9XkpQIgLxlvLNmC8DJEKexXZqTZ;info=<https://stir-provider.example.net/cert.cer>;alg=ES256;ppt=\"shaken\""
            },
            "from": {
               "type": "phone",
               "number": "447700900001"
            },
            "status": "completed",
            "direction": "outbound",
            "rate": "0.39",
            "price": "23.40",
            "duration": "60",
            "start_time": "2020-01-01 12:00:00",
            "end_time": "2020-01-01 12:00:00",
            "network": "65512"
         }
      ]
   }
}

Create an outbound call

Create an outbound Call

posthttps://api.nexmo.com/v1/calls/

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Anfrage Körper
Inhalt Typ
application/json

Einer der
to
array
Erforderlich
Einer der
type
string
Erforderlich
Beispielphone

The type of connection. Must be phone

number
string
Erforderlich
Min7
Max15
Beispiel14155550100

The phone number to connect to

dtmfAnswer
string
Beispielp*123#

Provide DTMF digits to send when the call is answered

shaken
string
BeispieleyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMjEyNTU1MTIxMiJdfSwiaWF0IjoxNjk0ODcwNDAwLCJvcmlnIjp7InRuIjoiMTQxNTU1NTEyMzQifSwib3JpZ2lkIjoiMTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDAwIn0.MEUCIQCrfKeMtvn9I6zXjE2VfGEcdjC2sm5M6cPqBvFyV9XkpQIgLxlvLNmC8DJEKexXZqTZ;info=<https://stir-provider.example.net/cert.cer>;alg=ES256;ppt="shaken"

For Vonage customers who are required by the FCC to sign their own calls to the USA, we allow you to place Voice API calls with your own signature. This feature is available by request only. Please be aware calls with an invalid signature will be rejected. For more information please contact us. In this option, you must place the STIR/SHAKEN Identity Header content that Vonage must use for this call. Expected format is composed of the JWT with the header, payload and signature, an info parameter with a link for the certificate, the algorithm (alg) parameter indicating which encryption type was used and the passport type (ppt) which should be shaken.

from
object

Connect to a Phone (PSTN) number. This property is mutually exclusive with random_from_number: you must specify one (from) or the other (random_from_number: true).

type
string
Erforderlich
Beispielphone

The type of connection. Must be phone.

number
string
Erforderlich
Beispiel14155550100

The phone number to connect to. It can be either an E.164 formatted number or a SIP URI.

random_from_number
boolean

Set to true to use random phone number as from. The number will be selected from the list of the numbers assigned to the current application. This property is mutually exclusive with from: you must specify one (random_from_number: true) or the other (from).

event_url
array

Required unless event_url is configured at the application level, see Create an Application

The webhook endpoint where call progress events are sent to. For more information about the values sent, see Event webhook.

event_method
string
StandardPOST

The HTTP method used to send event information to event_url.

Muss eines der folgenden sein:POSTGET
machine_detection
string
Beispielcontinue

Configure the behavior when Vonage detects that the call is answered by voicemail. If continue, Vonage sends an HTTP request to event_url with the Call event machine. If hangup, Vonage ends the call.

Muss eines der folgenden sein:continuehangup
advanced_machine_detection
object

Configure the behavior of Vonage's advanced machine detection. Overrides machine_detection if both are set. Note that this is a beta feature which will be chargeable; exact rates can be found on the Voice API Pricing page under 'Programmable Features'.

behavior
string

When hangup is used, the call will be terminated if a machine is detected. When continue is used, the call will continue even if a machine is detected.

Muss eines der folgenden sein:continuehangup
mode
string
Standarddetect

Detect if machine answered and sends a human or machine status in the webhook payload. The modes are as follows:

  • default - async mode, the next NCCO action will be processed immediately in parallel with machine detection, the application will receive both machine detection status and beep events and can reply with new NCCO to any of them;

  • detect - sync mode, the next NCCO action will be processed only when machine detection is finished, the application will receive only machine detection status event;

  • detect_beep - sync mode, the next NCCO action will be processed only when machine detection is finished, the application will receive only a beep event.

Muss eines der folgenden sein:defaultdetectdetect_beep
beep_timeout
integer
Min30
Max120

Maximum time in seconds Vonage should wait for a machine beep to be detected. A machine event with sub_state set to beep_timeout will be sent if the timeout is exceeded.

length_timer
integer
Min1
Max86400
Standard7200

Set the number of seconds that elapse before Vonage hangs up after the call state changes to answered.

ringing_timer
integer
Min1
Max120
Standard60

Set the number of seconds that elapse before Vonage hangs up after the call state changes to ‘ringing’.

ncco
array
Erforderlich

The Nexmo Call Control Object to use for this call.

Beispiel Anfrage

{
   "to": [
      {
         "type": "phone",
         "number": "14155550100",
         "dtmfAnswer": "p*123#",
         "shaken": "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMjEyNTU1MTIxMiJdfSwiaWF0IjoxNjk0ODcwNDAwLCJvcmlnIjp7InRuIjoiMTQxNTU1NTEyMzQifSwib3JpZ2lkIjoiMTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDAwIn0.MEUCIQCrfKeMtvn9I6zXjE2VfGEcdjC2sm5M6cPqBvFyV9XkpQIgLxlvLNmC8DJEKexXZqTZ;info=<https://stir-provider.example.net/cert.cer>;alg=ES256;ppt=\"shaken\""
      }
   ],
   "from": {
      "type": "phone",
      "number": "14155550100"
   },
   "random_from_number": false,
   "event_url": [
      "https://example.com/event"
   ],
   "event_method": "POST",
   "machine_detection": "continue",
   "advanced_machine_detection": {
      "behavior": "continue",
      "mode": "default",
      "beep_timeout": 30
   },
   "length_timer": 7200,
   "ringing_timer": 60,
   "ncco": [
      {
         "action": "talk",
         "text": "Hello World"
      }
   ]
}

Antworten
Inhalt Typ
application/json

Created

uuid
string(uuid)
Beispiel63f61863-4a51-4f6b-86e1-46edebcf9356

The unique identifier for this call leg. The UUID is created when your call request is accepted by Vonage. You use the UUID in all requests for individual live calls

status
string
Beispielcompleted

The status of the call. See possible values

direction
string
Beispieloutbound

Possible values are outbound or inbound

Muss eines der folgenden sein:outboundinbound
conversation_uuid
string(uuid)
BeispielCON-f972836a-550f-45fa-956c-12a2ab5b7d22

The unique identifier for the conversation this call leg is part of.

Beispiel Antwort

{
   "uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356",
   "status": "completed",
   "direction": "outbound",
   "conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22"
}

Get detail of a specific call

Get detail of a specific call

gethttps://api.nexmo.com/v1/calls/:uuid

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

uuid
string
Erforderlich

UUID of the Call

Antworten
Inhalt Typ
application/json

Ok

_links
object
self
object
href
string
Beispiel/calls/63f61863-4a51-4f6b-86e1-46edebcf9356
uuid
string(uuid)
Beispiel63f61863-4a51-4f6b-86e1-46edebcf9356

The unique identifier for this call leg. The UUID is created when your call request is accepted by Vonage. You use the UUID in all requests for individual live calls

conversation_uuid
string(uuid)
BeispielCON-f972836a-550f-45fa-956c-12a2ab5b7d22

The unique identifier for the conversation this call leg is part of.

to
Einer der
type
string
Erforderlich
Beispielphone

The type of connection. Must be phone

number
string
Erforderlich
Min7
Max15
Beispiel14155550100

The phone number to connect to

dtmfAnswer
string
Beispielp*123#

Provide DTMF digits to send when the call is answered

shaken
string
BeispieleyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMjEyNTU1MTIxMiJdfSwiaWF0IjoxNjk0ODcwNDAwLCJvcmlnIjp7InRuIjoiMTQxNTU1NTEyMzQifSwib3JpZ2lkIjoiMTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDAwIn0.MEUCIQCrfKeMtvn9I6zXjE2VfGEcdjC2sm5M6cPqBvFyV9XkpQIgLxlvLNmC8DJEKexXZqTZ;info=<https://stir-provider.example.net/cert.cer>;alg=ES256;ppt="shaken"

For Vonage customers who are required by the FCC to sign their own calls to the USA, we allow you to place Voice API calls with your own signature. This feature is available by request only. Please be aware calls with an invalid signature will be rejected. For more information please contact us. In this option, you must place the STIR/SHAKEN Identity Header content that Vonage must use for this call. Expected format is composed of the JWT with the header, payload and signature, an info parameter with a link for the certificate, the algorithm (alg) parameter indicating which encryption type was used and the passport type (ppt) which should be shaken.

from
object

The endpoint you called from. Possible values are the same as to.

type
string
Beispielphone
number
string
Beispiel447700900001
status
string
Beispielcompleted

The status of the call. See possible values

direction
string
Beispieloutbound

Possible values are outbound or inbound

Muss eines der folgenden sein:outboundinbound
rate
string
Beispiel0.39

The price per minute for this call. This is only sent if status is completed.

price
string
Beispiel23.40

The total price charged for this call. This is only sent if status is completed.

duration
string
Beispiel60

The time elapsed for the call to take place in seconds. This is only sent if status is completed.

start_time
string(date-time)
Beispiel2020-01-01 12:00:00

The time the call started in the following format: YYYY-MM-DD HH:MM:SS. For example, 2020-01-01 12:00:00. This is only sent if status is completed.

end_time
string(date-time)
Beispiel2020-01-01 12:00:00

The time the call started in the following format: YYYY-MM-DD HH:MM:SS. For xample, 2020-01-01 12:00:00. This is only sent if status is completed.

network
string
Beispiel65512

The Mobile Country Code Mobile Network Code (MCCMNC) for the carrier network used to make this call. This is only sent if status is completed.

Beispiel Antwort

{
   "_links": {
      "self": {
         "href": "/calls/63f61863-4a51-4f6b-86e1-46edebcf9356"
      }
   },
   "uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356",
   "conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22",
   "to": {
      "type": "phone",
      "number": "14155550100",
      "dtmfAnswer": "p*123#",
      "shaken": "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMjEyNTU1MTIxMiJdfSwiaWF0IjoxNjk0ODcwNDAwLCJvcmlnIjp7InRuIjoiMTQxNTU1NTEyMzQifSwib3JpZ2lkIjoiMTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDAwIn0.MEUCIQCrfKeMtvn9I6zXjE2VfGEcdjC2sm5M6cPqBvFyV9XkpQIgLxlvLNmC8DJEKexXZqTZ;info=<https://stir-provider.example.net/cert.cer>;alg=ES256;ppt=\"shaken\""
   },
   "from": {
      "type": "phone",
      "number": "447700900001"
   },
   "status": "completed",
   "direction": "outbound",
   "rate": "0.39",
   "price": "23.40",
   "duration": "60",
   "start_time": "2020-01-01 12:00:00",
   "end_time": "2020-01-01 12:00:00",
   "network": "65512"
}

Modify an in progress call

Modify an in progress call

puthttps://api.nexmo.com/v1/calls/:uuid

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

uuid
string
Erforderlich

UUID of the Call

Anfrage Körper
Inhalt Typ
application/json

Einer der
action
string
Erforderlich
Beispieltransfer

Transfer the call to a new NCCO

Muss eines der folgenden sein:transfer
destination
object
Erforderlich
type
string
Erforderlich
Beispielncco

Always ncco

ncco
array
Erforderlich

Refer to the NCCO Guide for a description of possible NCCO parameters.

Beispiel Anfrage

{
   "action": "transfer",
   "destination": {
      "type": "ncco",
      "ncco": [
         {
            "action": "talk",
            "text": "Hello World"
         }
      ]
   }
}

Antworten

No Content

Stream Audio

Start or stop streaming audio in to an active call

Play an audio file into a call

Play an audio file into a call

puthttps://api.nexmo.com/v1/calls/:uuid/stream

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

uuid
string
Erforderlich

UUID of the Call Leg

Anfrage Körper
Inhalt Typ
application/json

stream_url
array
Erforderlich
loop
integer
Standard1

the number of times to play the file, 0 for infinite

level
string
Standard0
Beispiel0.4

Set the audio level of the stream in the range -1 >= level <= 1 with a precision of 0.1. The default value is 0.

Beispiel Anfrage

{
   "stream_url": [
      "https://example.com/waiting.mp3"
   ],
   "loop": 1,
   "level": "0.4"
}

Antworten
Inhalt Typ
application/json

Ok

message
string
BeispielStream started

Description of the action taken

uuid
string(uuid)
Beispiel63f61863-4a51-4f6b-86e1-46edebcf9356

The unique identifier for this call leg. The UUID is created when your call request is accepted by Vonage. You use the UUID in all requests for individual live calls

Beispiel Antwort

{
   "message": "Stream started",
   "uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356"
}

Stop playing an audio file into a call

Stop playing an audio file into a call

deletehttps://api.nexmo.com/v1/calls/:uuid/stream

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

uuid
string
Erforderlich

UUID of the Call Leg

Antworten
Inhalt Typ
application/json

Ok

message
string
BeispielStream stopped

Description of the action taken

uuid
string(uuid)
Beispiel63f61863-4a51-4f6b-86e1-46edebcf9356

The unique identifier for this call leg. The UUID is created when your call request is accepted by Vonage. You use the UUID in all requests for individual live calls

Beispiel Antwort

{
   "message": "Stream stopped",
   "uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356"
}

Play TTS

Start or stop playing Text to Speech in to an active call

Play text to speech into a call

Play text to speech into a call

puthttps://api.nexmo.com/v1/calls/:uuid/talk

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

uuid
string
Erforderlich

UUID of the Call Leg

Anfrage Körper
Inhalt Typ
application/json

text
string
Erforderlich
BeispielHello. How are you today?

The text to read

language
string
Standarden-US

The language to use

Muss eines der folgenden sein:arca-EScmn-CNcmn-TWcs-CZcy-GBda-DKde-DEel-GRen-AUen-GBen-GB-WLSen-INen-USen-ZAes-ESes-MXes-USeu-ESfi-FIfil-PHfr-CAfr-FRhe-ILhi-INhu-HUid-IDis-ISit-ITja-JPko-KRnb-NOnl-NLno-NOpl-PLpt-BRpt-PTro-ROru-RUsk-SKsv-SEth-THtr-TRuk-UAvi-VNyue-CN
style
integer

The vocal style (vocal range, tessitura, and timbre) to use

premium
boolean
Standardfalse
Beispieltrue

Set to true to use the premium version of the specified style if available, otherwise the standard version will be used. You can find more information about Premium Voices in the Text-To-Speech guide.

voice_name
string
StandardKimberly

DEPRECATED The voice & language to use

Muss eines der folgenden sein:AditiAgnieszkaAlvaAmyAstridBiancaBrianCarlaCarmenCarmitCatarinaCelineCemChantalChipmunkConchitaCristianoDamayantiDoraEmmaEmparEnriqueEricEwaFelipeFilizGeraintGiorgioGwynethHansHenrikInesIoanaIvetaIvyJacekJanJenniferJoanaJoannaJoeyJordiJustinKanyaKarlKendraKimberlyLailaLauraLeaLekhaLivLotteLuciaLucianaMadsMagedMajaMariskaMarleneMathieuMatthewMaximMei-JiaMelinaMiaMiguelMirenMizukiMontserratNajaNicoleNikosNoraOskarPenelopeRaveenaRicardoRubenRussellSalliSatuSeoyeonSin-JiSoraTakumiTarikTatyanaTessaTian-TianVickiVitoriaYeldaZeinaZhiyuZuzana
loop
integer
Standard1

The number of times to repeat the text the file, 0 for infinite

level
string
Standard0
Beispiel0.4

The volume level that the speech is played. This can be any value between -1 to 1 in 0.1 increments, with 0 being the default.

Beispiel Anfrage

{
   "text": "Hello. How are you today?",
   "language": "ar",
   "style": 0,
   "premium": true,
   "voice_name": "Aditi",
   "loop": 1,
   "level": "0.4"
}

Antworten
Inhalt Typ
application/json

Ok

message
string
BeispielTalk started

Description of the action taken

uuid
string(uuid)
Beispiel63f61863-4a51-4f6b-86e1-46edebcf9356

The unique identifier for this call leg. The UUID is created when your call request is accepted by Vonage. You use the UUID in all requests for individual live calls

Beispiel Antwort

{
   "message": "Talk started",
   "uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356"
}

Stop text to speech in a call

Stop text to speech in a call

deletehttps://api.nexmo.com/v1/calls/:uuid/talk

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

uuid
string
Erforderlich

UUID of the Call Leg

Antworten
Inhalt Typ
application/json

Ok

message
string
BeispielTalk stopped

Description of the action taken

uuid
string(uuid)
Beispiel63f61863-4a51-4f6b-86e1-46edebcf9356

The unique identifier for this call leg. The UUID is created when your call request is accepted by Vonage. You use the UUID in all requests for individual live calls

Beispiel Antwort

{
   "message": "Talk stopped",
   "uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356"
}

DTMF

Send and subscribe to DTMF tones in an active call

Play DTMF tones into a call

Play DTMF tones into a call

puthttps://api.nexmo.com/v1/calls/:uuid/dtmf

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

uuid
string
Erforderlich

UUID of the Call Leg

Anfrage Körper
Inhalt Typ
application/json

digits
string
Beispiel1713

The digits to send

Beispiel Anfrage

{
   "digits": "1713"
}

Antworten
Inhalt Typ
application/json

Ok

message
string
BeispielDTMF sent

Description of the action taken

uuid
string(uuid)
Beispiel63f61863-4a51-4f6b-86e1-46edebcf9356

The unique identifier for this call leg. The UUID is created when your call request is accepted by Vonage. You use the UUID in all requests for individual live calls

Beispiel Antwort

{
   "message": "DTMF sent",
   "uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356"
}

Subscribe to real-time DTMF events

Register a listener to receive asynchronous DTMF inputs from a call. This is only applicable to Input NCCO events with the mode set to asynchronous. The payload delivered to this URL will be an Input webhook event with a single DTMF digit every time the callee enters DTMF into the call.

puthttps://api.nexmo.com/v1/calls/:uuid/input/dtmf

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

uuid
string
Erforderlich

UUID of the Call Leg

Anfrage Körper
Inhalt Typ
application/json

event_url
array

The URL (wrapped in an array) to send DTMF events to, as a POST request.

Beispiel Anfrage

{
   "event_url": [
      "https://example.com/ivr"
   ]
}

Antworten

OK

Stop receiving real-time DTMF events

Removes the registered DTMF listener.

deletehttps://api.nexmo.com/v1/calls/:uuid/input/dtmf

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

uuid
string
Erforderlich

UUID of the Call Leg

Antworten

OK