POST
/
api
/
v1
/
calls
cURL
curl --request POST \
  --url https://api.useovia.com/api/v1/calls \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "<string>",
  "from_number": "<string>",
  "to_number": "<string>",
  "phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "<string>",
  "from_number": "<string>",
  "to_number": "<string>",
  "phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "started_at": "2023-11-07T05:31:56Z",
  "ended_at": "2023-11-07T05:31:56Z",
  "recording_url": "<string>",
  "transcript": "<string>",
  "duration": 123,
  "analysis": "<string>",
  "latency_metrics": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "agent": {
    "name": "<string>"
  },
  "metadata": {
    "rule_id": "<string>",
    "call_tag": "<string>",
    "call_id_full": "<string>",
    "sip_trunk_id": "<string>"
  },
  "costs": {
    "llm": 123,
    "stt": 123,
    "tts": 123,
    "total": 123,
    "details": {
      "tts_characters": 123,
      "llm_prompt_tokens": 123,
      "llm_completion_tokens": 123,
      "stt_audio_duration_seconds": 123
    }
  },
  "transcript_objects": [
    {
      "content": "<string>",
      "timestamp": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Call to add to the store

user_id
string<uuid>
required

Identifiant de l'utilisateur

agent_id
string<uuid>
required

Identifiant de l'agent

type
string
required

Type d'appel (ex: phone_call)

direction
enum<string>
required

Direction de l'appel (entrant ou sortant)

Available options:
inbound,
outbound
from_number
string
required

Numéro de téléphone de l'appelant

to_number
string
required

Numéro de téléphone du destinataire

phone_number_id
string<uuid>
required

Identifiant du numéro de téléphone associé

Response

Call response

user_id
string<uuid>
required

Identifiant de l'utilisateur

agent_id
string<uuid>
required

Identifiant de l'agent

type
string
required

Type d'appel (ex: phone_call)

direction
enum<string>
required

Direction de l'appel (entrant ou sortant)

Available options:
inbound,
outbound
from_number
string
required

Numéro de téléphone de l'appelant

to_number
string
required

Numéro de téléphone du destinataire

phone_number_id
string<uuid>
required

Identifiant du numéro de téléphone associé

id
string<uuid>

Identifiant unique de l'appel

status
string

Statut de l'appel (ex: completed)

started_at
string<date-time>

Date et heure de début de l'appel

ended_at
string<date-time>

Date et heure de fin de l'appel

recording_url
string

URL de l'enregistrement de l'appel

transcript
string

Transcription complète de l'appel

duration
integer

Durée de l'appel en secondes

analysis
string

Analyse des appels (optionnel)

latency_metrics
string

Données de latence (optionnel)

created_at
string<date-time>

Date de création de l'appel

updated_at
string<date-time>

Dernière mise à jour de l'appel

agent
object
metadata
object
costs
object
transcript_objects
object[]

Liste des messages échangés