POST
/api/v1/voice-agents/{id}/webhookObtener una llamada de agente de voz por ID
Devuelve los detalles de una llamada de agente de voz. Requiere una clave API con el ámbito 'voice-agents:read'.
Autenticación
Envía tu API key en el header x-api-key header.
x-api-keybearer
Parámetros
idobligatoriopath · string
ID de llamada de agente de voz
Cuerpo de la petición
obligatorioPublicApiStartCallWebhookDto
namerequiredstring
Full name of the contact
emailstring
Email address of the contact (optional if phone is provided)
phonerequiredstring
Phone in E.164 format (e.g., +1234567890)
dynamicVariablesobject
Dynamic variables to be used in the voice agent prompt. Must match the variables configured in the agent.
Ejemplo de petición
json
{
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"dynamicVariables": {
"company.name": "Acme Inc",
"contact.jobTitle": "CEO"
}
}
Respuestas
201Call successfully initiated
PublicApiStartCallWebhookResponseDto
callIdrequiredstring
ID of the created voice agent call
statusrequiredstring
Status of the call
queuedringingin_progresscompletedfailedcancelledcontactIdrequiredstring
ID of the contact associated with the call
phoneNumberrequiredstring
Phone number being called
createdAtrequiredstring (date-time)
Timestamp when the call was created
Ejemplo de respuesta
json
{
"callId": "123e4567-e89b-12d3-a456-426614174000",
"status": "queued",
"contactId": "123e4567-e89b-12d3-a456-426614174001",
"phoneNumber": "+1234567890",
"createdAt": "2024-01-20T10:30:00Z"
}
400Invalid request payload or voice agent is not active
401No autorizado - clave API o token Bearer faltante o inválido
403La clave API no tiene el ámbito requerido
404Llamada de agente de voz no encontrada