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 via Application API or use regional URLs as described in the Regions guide.

Télécharger la spécification OpenAPI

Calls

Fetch, Create and Modify voice calls

Get details of your calls

Get details of your calls

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Demande de renseignements Paramètres

status
string
exemplestarted

Filter by call status

Il doit s'agir de l'un d'entre eux :startedringingansweredmachinecompletedbusycancelledfailedrejectedtimeoutunanswered
date_start
string(date-time)
exemple2016-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)
exemple2016-11-14T07:45:14Z

Return the records that occurred before this point in time

page_size
integer
Min1
Max100
Défaut10

Return this amount of records in the response

record_index
integer

Return calls from this index in the response

order
string
Défautasc

Either ascending or descending order.

Il doit s'agir de l'un d'entre eux :ascdesc
conversation_uuid
string(uuid)
exempleCON-f972836a-550f-45fa-956c-12a2ab5b7d22

Return all the records associated with a specific conversation.

Réponses
Type de contenu
application/json

OK

count
integer
exemple100
page_size
integer
exemple10
record_index
integer
_links
object
self
object
href
string
exemple/calls?page_size=10&record_index=20&order=asc
first
object
href
string
exemple/calls?page_size=10&record_index=20&order=asc
last
object
href
string
exemple/calls?page_size=10&record_index=20&order=asc
next
object
href
string
exemple/calls?page_size=10&record_index=20&order=asc
prev
object
href
string
exemple/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
exemple/calls/63f61863-4a51-4f6b-86e1-46edebcf9356
uuid
string(uuid)
exemple63f61863-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)
exempleCON-f972836a-550f-45fa-956c-12a2ab5b7d22

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

to
L'un des
type
string
Exigée
exemplephone

The type of connection. Must be phone

number
string
Exigée
Min7
Max15
exemple14155550100

The phone number to connect to

dtmfAnswer
string
exemplep*123#

Provide DTMF digits to send when the call is answered

shaken
string
exempleeyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.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
exemplephone
number
string
exemple447700900001
status
string
exemplecompleted

The status of the call. See possible values

direction
string
exempleoutbound

Possible values are outbound or inbound

Il doit s'agir de l'un d'entre eux :outboundinbound
rate
string
exemple0.39

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

price
string
exemple23.40

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

duration
string
exemple60

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

start_time
string(date-time)
exemple2020-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)
exemple2020-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
exemple65512

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.

Exemple Réponse

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Corps de la demande
Type de contenu
application/json

L'un des
to
array
Exigée
L'un des
type
string
Exigée
exemplephone

The type of connection. Must be phone

number
string
Exigée
Min7
Max15
exemple14155550100

The phone number to connect to

dtmfAnswer
string
exemplep*123#

Provide DTMF digits to send when the call is answered

shaken
string
exempleeyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.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
Exigée
exemplephone

The type of connection. Must be phone.

number
string
Exigée
exemple14155550100

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
DéfautPOST

The HTTP method used to send event information to event_url.

Il doit s'agir de l'un d'entre eux :POSTGET
machine_detection
string
exemplecontinue

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.

Il doit s'agir de l'un d'entre eux :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.

Il doit s'agir de l'un d'entre eux :continuehangup
mode
string
Défautdetect

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.

Il doit s'agir de l'un d'entre eux :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
Défaut7200

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

ringing_timer
integer
Min1
Max120
Défaut60

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

ncco
array
Exigée

The Nexmo Call Control Object to use for this call.

Exemple Demande

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

Réponses
Type de contenu
application/json

Created

uuid
string(uuid)
exemple63f61863-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
exemplecompleted

The status of the call. See possible values

direction
string
exempleoutbound

Possible values are outbound or inbound

Il doit s'agir de l'un d'entre eux :outboundinbound
conversation_uuid
string(uuid)
exempleCON-f972836a-550f-45fa-956c-12a2ab5b7d22

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

Exemple Réponse

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

uuid
string
Exigée

UUID of the Call

Réponses
Type de contenu
application/json

Ok

_links
object
self
object
href
string
exemple/calls/63f61863-4a51-4f6b-86e1-46edebcf9356
uuid
string(uuid)
exemple63f61863-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)
exempleCON-f972836a-550f-45fa-956c-12a2ab5b7d22

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

to
L'un des
type
string
Exigée
exemplephone

The type of connection. Must be phone

number
string
Exigée
Min7
Max15
exemple14155550100

The phone number to connect to

dtmfAnswer
string
exemplep*123#

Provide DTMF digits to send when the call is answered

shaken
string
exempleeyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.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
exemplephone
number
string
exemple447700900001
status
string
exemplecompleted

The status of the call. See possible values

direction
string
exempleoutbound

Possible values are outbound or inbound

Il doit s'agir de l'un d'entre eux :outboundinbound
rate
string
exemple0.39

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

price
string
exemple23.40

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

duration
string
exemple60

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

start_time
string(date-time)
exemple2020-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)
exemple2020-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
exemple65512

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.

Exemple Réponse

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

uuid
string
Exigée

UUID of the Call

Corps de la demande
Type de contenu
application/json

L'un des
action
string
Exigée
exempletransfer

Transfer the call to a new NCCO

Il doit s'agir de l'un d'entre eux :transfer
destination
object
Exigée
type
string
Exigée
exemplencco

Always ncco

ncco
array
Exigée

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

Exemple Demande

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

Réponses

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

uuid
string
Exigée

UUID of the Call Leg

Corps de la demande
Type de contenu
application/json

stream_url
array
Exigée
loop
integer
Défaut1

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

level
string
Défaut0
exemple0.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.

Exemple Demande

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

Réponses
Type de contenu
application/json

Ok

message
string
exempleStream started

Description of the action taken

uuid
string(uuid)
exemple63f61863-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

Exemple Réponse

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

uuid
string
Exigée

UUID of the Call Leg

Réponses
Type de contenu
application/json

Ok

message
string
exempleStream stopped

Description of the action taken

uuid
string(uuid)
exemple63f61863-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

Exemple Réponse

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

uuid
string
Exigée

UUID of the Call Leg

Corps de la demande
Type de contenu
application/json

text
string
Exigée
exempleHello. How are you today?

The text to read

language
string
Défauten-US

The language to use

Il doit s'agir de l'un d'entre eux :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
Défautfalse
exempletrue

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
DéfautKimberly

DEPRECATED The voice & language to use

Il doit s'agir de l'un d'entre eux :AditiAgnieszkaAlvaAmyAstridBiancaBrianCarlaCarmenCarmitCatarinaCelineCemChantalChipmunkConchitaCristianoDamayantiDoraEmmaEmparEnriqueEricEwaFelipeFilizGeraintGiorgioGwynethHansHenrikInesIoanaIvetaIvyJacekJanJenniferJoanaJoannaJoeyJordiJustinKanyaKarlKendraKimberlyLailaLauraLeaLekhaLivLotteLuciaLucianaMadsMagedMajaMariskaMarleneMathieuMatthewMaximMei-JiaMelinaMiaMiguelMirenMizukiMontserratNajaNicoleNikosNoraOskarPenelopeRaveenaRicardoRubenRussellSalliSatuSeoyeonSin-JiSoraTakumiTarikTatyanaTessaTian-TianVickiVitoriaYeldaZeinaZhiyuZuzana
loop
integer
Défaut1

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

level
string
Défaut0
exemple0.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.

Exemple Demande

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

Réponses
Type de contenu
application/json

Ok

message
string
exempleTalk started

Description of the action taken

uuid
string(uuid)
exemple63f61863-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

Exemple Réponse

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

uuid
string
Exigée

UUID of the Call Leg

Réponses
Type de contenu
application/json

Ok

message
string
exempleTalk stopped

Description of the action taken

uuid
string(uuid)
exemple63f61863-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

Exemple Réponse

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

uuid
string
Exigée

UUID of the Call Leg

Corps de la demande
Type de contenu
application/json

digits
string
exemple1713

The digits to send

Exemple Demande

{
   "digits": "1713"
}

Réponses
Type de contenu
application/json

Ok

message
string
exempleDTMF sent

Description of the action taken

uuid
string(uuid)
exemple63f61863-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

Exemple Réponse

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

uuid
string
Exigée

UUID of the Call Leg

Corps de la demande
Type de contenu
application/json

event_url
array

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

Exemple Demande

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

Réponses

OK

Stop receiving real-time DTMF events

Removes the registered DTMF listener.

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

uuid
string
Exigée

UUID of the Call Leg

Réponses

OK