Iniciar ligação
curl --request POST \
--url https://api.notifique.dev/v1/voice/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "+5511987654321",
"to": [
"+5511999887766"
],
"type": "speak",
"payload": {
"text": "Olá! Ligação de teste.",
"voice": "female-natural"
},
"clientState": "campanha-42"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '+5511987654321',
to: ['+5511999887766'],
type: 'speak',
payload: {text: 'Olá! Ligação de teste.', voice: 'female-natural'},
clientState: 'campanha-42'
})
};
fetch('https://api.notifique.dev/v1/voice/calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/voice/calls"
payload = {
"from": "+5511987654321",
"to": ["+5511999887766"],
"type": "speak",
"payload": {
"text": "Olá! Ligação de teste.",
"voice": "female-natural"
},
"clientState": "campanha-42"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/voice/calls"
payload := strings.NewReader("{\n \"from\": \"+5511987654321\",\n \"to\": [\n \"+5511999887766\"\n ],\n \"type\": \"speak\",\n \"payload\": {\n \"text\": \"Olá! Ligação de teste.\",\n \"voice\": \"female-natural\"\n },\n \"clientState\": \"campanha-42\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "<string>",
"workspaceId": "<string>",
"phoneNumberId": "<string>",
"fromE164": "<string>",
"toE164": "<string>",
"callSessionId": "<string>",
"callLegId": "<string>",
"answeredAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"durationSecs": 123,
"hangupCause": "<string>",
"recordingAvailable": true,
"recordingId": "<string>",
"dtmfDigits": "<string>",
"gatherResult": "<string>",
"machineDetectionResult": "<string>",
"speakText": "<string>",
"playAudioUrl": "<string>",
"chargedAs": "<string>",
"chargeAmount": 123,
"clientState": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "Payment Required",
"code": "WORKSPACE_BLOCKED",
"message": "Payment Required"
}{
"success": false,
"error": "Forbidden",
"message": "Missing scope: voice:call",
"code": "FORBIDDEN"
}Voice: Chamadas
Iniciar ligação
Inicia uma ligação de voz para um ou vários números.
POST
/
v1
/
voice
/
calls
Iniciar ligação
curl --request POST \
--url https://api.notifique.dev/v1/voice/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "+5511987654321",
"to": [
"+5511999887766"
],
"type": "speak",
"payload": {
"text": "Olá! Ligação de teste.",
"voice": "female-natural"
},
"clientState": "campanha-42"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '+5511987654321',
to: ['+5511999887766'],
type: 'speak',
payload: {text: 'Olá! Ligação de teste.', voice: 'female-natural'},
clientState: 'campanha-42'
})
};
fetch('https://api.notifique.dev/v1/voice/calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/voice/calls"
payload = {
"from": "+5511987654321",
"to": ["+5511999887766"],
"type": "speak",
"payload": {
"text": "Olá! Ligação de teste.",
"voice": "female-natural"
},
"clientState": "campanha-42"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/voice/calls"
payload := strings.NewReader("{\n \"from\": \"+5511987654321\",\n \"to\": [\n \"+5511999887766\"\n ],\n \"type\": \"speak\",\n \"payload\": {\n \"text\": \"Olá! Ligação de teste.\",\n \"voice\": \"female-natural\"\n },\n \"clientState\": \"campanha-42\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "<string>",
"workspaceId": "<string>",
"phoneNumberId": "<string>",
"fromE164": "<string>",
"toE164": "<string>",
"callSessionId": "<string>",
"callLegId": "<string>",
"answeredAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"durationSecs": 123,
"hangupCause": "<string>",
"recordingAvailable": true,
"recordingId": "<string>",
"dtmfDigits": "<string>",
"gatherResult": "<string>",
"machineDetectionResult": "<string>",
"speakText": "<string>",
"playAudioUrl": "<string>",
"chargedAs": "<string>",
"chargeAmount": 123,
"clientState": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "Payment Required",
"code": "WORKSPACE_BLOCKED",
"message": "Payment Required"
}{
"success": false,
"error": "Forbidden",
"message": "Missing scope: voice:call",
"code": "FORBIDDEN"
}Autorizações
ntfVoiceBearerAuthntfVoiceApiKeyHeader
API Key no formato Bearer (ex.: sk_live_...).
Corpo
application/json
Id do número no workspace ou E.164.
Destino E.164 (+...). Preferencialmente um array (canônico); string aceita por compatibilidade.
Required array length:
1 - 100 elementsTipo da ação inicial: speak (TTS em payload.text), play (payload.audioUrl), gather (payload.gather), template (payload.templateId).
Opções disponíveis:
speak, play, gather, template Conteúdo conforme type. speak: text, opcional voice/language. play: audioUrl. gather: objeto gather. template: templateId + variables opcionais.
Exemplo:
"detect"
Esta página foi útil?
⌘I

