Voice API

Versión 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.

Descargar la especificación OpenAPI

Calls

Fetch, Create and Modify voice calls

Get details of your calls

Get details of your calls

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Consulta Parámetros

status
string
ejemplostarted

Filter by call status

Debe ser uno de:startedringingansweredmachinecompletedbusycancelledfailedrejectedtimeoutunanswered
date_start
string(date-time)
ejemplo2016-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)
ejemplo2016-11-14T07:45:14Z

Return the records that occurred before this point in time

page_size
integer
Min1
Max100
Por defecto10

Return this amount of records in the response

record_index
integer

Return calls from this index in the response

order
string
Por defectoasc

Either ascending or descending order.

Debe ser uno de:ascdesc
conversation_uuid
string(uuid)
ejemploCON-f972836a-550f-45fa-956c-12a2ab5b7d22

Return all the records associated with a specific conversation.

Respuestas
Tipo de contenido
application/json

OK

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

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

to
Uno de
type
string
Requerido
ejemplophone

The type of connection. Must be phone

number
string
Requerido
Min7
Max15
ejemplo14155550100

The phone number to connect to

dtmfAnswer
string
ejemplop*123#

Provide DTMF digits to send when the call is answered

shaken
string
ejemploeyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.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
ejemplophone
number
string
ejemplo447700900001
status
string
ejemplocompleted

The status of the call. See possible values

direction
string
ejemplooutbound

Possible values are outbound or inbound

Debe ser uno de:outboundinbound
rate
string
ejemplo0.39

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

price
string
ejemplo23.40

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

duration
string
ejemplo60

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

start_time
string(date-time)
ejemplo2020-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)
ejemplo2020-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
ejemplo65512

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.

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Cuerpo de la solicitud
Tipo de contenido
application/json

Uno de
to
array
Requerido
Uno de
type
string
Requerido
ejemplophone

The type of connection. Must be phone

number
string
Requerido
Min7
Max15
ejemplo14155550100

The phone number to connect to

dtmfAnswer
string
ejemplop*123#

Provide DTMF digits to send when the call is answered

shaken
string
ejemploeyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.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
Requerido
ejemplophone

The type of connection. Must be phone.

number
string
Requerido
ejemplo14155550100

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
Por defectoPOST

The HTTP method used to send event information to event_url.

Debe ser uno de:POSTGET
machine_detection
string
ejemplocontinue

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.

Debe ser uno de: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.

Debe ser uno de:continuehangup
mode
string
Por defectodetect

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.

Debe ser uno de: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
Por defecto7200

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

ringing_timer
integer
Min1
Max120
Por defecto60

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

ncco
array
Requerido

The Nexmo Call Control Object to use for this call.

Ejemplo Solicitar

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

Respuestas
Tipo de contenido
application/json

Created

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

The status of the call. See possible values

direction
string
ejemplooutbound

Possible values are outbound or inbound

Debe ser uno de:outboundinbound
conversation_uuid
string(uuid)
ejemploCON-f972836a-550f-45fa-956c-12a2ab5b7d22

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

uuid
string
Requerido

UUID of the Call

Respuestas
Tipo de contenido
application/json

Ok

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

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

to
Uno de
type
string
Requerido
ejemplophone

The type of connection. Must be phone

number
string
Requerido
Min7
Max15
ejemplo14155550100

The phone number to connect to

dtmfAnswer
string
ejemplop*123#

Provide DTMF digits to send when the call is answered

shaken
string
ejemploeyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUuY29tL3Bhc3Nwb3J0LnBlbSJ9.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
ejemplophone
number
string
ejemplo447700900001
status
string
ejemplocompleted

The status of the call. See possible values

direction
string
ejemplooutbound

Possible values are outbound or inbound

Debe ser uno de:outboundinbound
rate
string
ejemplo0.39

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

price
string
ejemplo23.40

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

duration
string
ejemplo60

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

start_time
string(date-time)
ejemplo2020-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)
ejemplo2020-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
ejemplo65512

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.

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

uuid
string
Requerido

UUID of the Call

Cuerpo de la solicitud
Tipo de contenido
application/json

Uno de
action
string
Requerido
ejemplotransfer

Transfer the call to a new NCCO

Debe ser uno de:transfer
destination
object
Requerido
type
string
Requerido
ejemploncco

Always ncco

ncco
array
Requerido

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

Ejemplo Solicitar

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

Respuestas

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

uuid
string
Requerido

UUID of the Call Leg

Cuerpo de la solicitud
Tipo de contenido
application/json

stream_url
array
Requerido
loop
integer
Por defecto1

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

level
string
Por defecto0
ejemplo0.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.

Ejemplo Solicitar

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

Respuestas
Tipo de contenido
application/json

Ok

message
string
ejemploStream started

Description of the action taken

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

uuid
string
Requerido

UUID of the Call Leg

Respuestas
Tipo de contenido
application/json

Ok

message
string
ejemploStream stopped

Description of the action taken

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

uuid
string
Requerido

UUID of the Call Leg

Cuerpo de la solicitud
Tipo de contenido
application/json

text
string
Requerido
ejemploHello. How are you today?

The text to read

language
string
Por defectoen-US

The language to use

Debe ser uno de: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
Por defectofalse
ejemplotrue

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
Por defectoKimberly

DEPRECATED The voice & language to use

Debe ser uno de:AditiAgnieszkaAlvaAmyAstridBiancaBrianCarlaCarmenCarmitCatarinaCelineCemChantalChipmunkConchitaCristianoDamayantiDoraEmmaEmparEnriqueEricEwaFelipeFilizGeraintGiorgioGwynethHansHenrikInesIoanaIvetaIvyJacekJanJenniferJoanaJoannaJoeyJordiJustinKanyaKarlKendraKimberlyLailaLauraLeaLekhaLivLotteLuciaLucianaMadsMagedMajaMariskaMarleneMathieuMatthewMaximMei-JiaMelinaMiaMiguelMirenMizukiMontserratNajaNicoleNikosNoraOskarPenelopeRaveenaRicardoRubenRussellSalliSatuSeoyeonSin-JiSoraTakumiTarikTatyanaTessaTian-TianVickiVitoriaYeldaZeinaZhiyuZuzana
loop
integer
Por defecto1

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

level
string
Por defecto0
ejemplo0.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.

Ejemplo Solicitar

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

Respuestas
Tipo de contenido
application/json

Ok

message
string
ejemploTalk started

Description of the action taken

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

uuid
string
Requerido

UUID of the Call Leg

Respuestas
Tipo de contenido
application/json

Ok

message
string
ejemploTalk stopped

Description of the action taken

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

uuid
string
Requerido

UUID of the Call Leg

Cuerpo de la solicitud
Tipo de contenido
application/json

digits
string
ejemplo1713

The digits to send

Ejemplo Solicitar

{
   "digits": "1713"
}

Respuestas
Tipo de contenido
application/json

Ok

message
string
ejemploDTMF sent

Description of the action taken

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

uuid
string
Requerido

UUID of the Call Leg

Cuerpo de la solicitud
Tipo de contenido
application/json

event_url
array

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

Ejemplo Solicitar

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

Respuestas

OK

Stop receiving real-time DTMF events

Removes the registered DTMF listener.

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

uuid
string
Requerido

UUID of the Call Leg

Respuestas

OK