POST
/
api
/
v1
/
calls
curl --request POST \
  --url https://api.elemente.ai/api/v1/calls \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "agentId": "123e4567-e89b-12d3-a456-426614174000",
  "agentOverride": {
    "name": "John Doe",
    "phone": "+12673624524",
    "imageURL": "https://example.com/image.jpg",
    "language": "en-US",
    "voiceStability": 0.5,
    "voiceSpeed": 1.5,
    "prompt": {
      "initialMessage": "Hello {{firstName}}, My name is {{aiName}}. I am calling you about your order ID {{Order ID}}",
      "prompt": "Your sponsibility is to notify the customer: {{firstName}} about his  order ID {{Order ID}} and the total cost  of {{Order Amount}}  with delivery date {{Delivery Date}}. That is all",
      "routingConditions": {
        "priority": "high"
      }
    }
  },
  "channel": "call",
  "skillId": "123e4567-e89b-12d3-a456-426614174000",
  "customerOverride": {
    "firstName": "John",
    "lastName": "Doe",
    "phoneNumber": "+1234567890",
    "email": "admin@email.com",
    "language": "en-US",
    "customFields": [
      {
        "name": "Order ID",
        "value": "12345"
      },
      {
        "name": "Order Date",
        "value": "2025-03-12"
      },
      {
        "name": "Order Amount",
        "value": 150.75
      },
      {
        "name": "Active Status",
        "value": true
      }
    ]
  },
  "customerName": "John Does",
  "customerPhone": "+1234567890",
  "customerEmail": "customer@email.com"
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "in-progress",
  "agentPhone": "+1234567890",
  "agentEmail": "+1234567890",
  "customerPhone": "+1234567890",
  "customerEmail": "+1234567890",
  "agentId": "123e4567-e89b-12d3-a456-426614174000",
  "customerId": "123e4567-e89b-12d3-a456-426614174000",
  "skillId": "123e4567-e89b-12d3-a456-426614174000",
  "customerName": "John Doe",
  "transcription": "Hello, how can I help you?",
  "recordingUrl": "https://example.com/recording.wav",
  "messages": [
    {
      "sid": "SM1234567890abcdef",
      "timestamp": "2025-03-17T14:30:00Z",
      "sender": "agent",
      "content": "Hello, how can I assist you today?",
      "mediaUrl": "https://example.com/image.jpg",
      "status": "delivered"
    }
  ],
  "duration": "7200"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
Input data for creating a new interaction
agentId
string
required

Your agents UUID

Example:

"123e4567-e89b-12d3-a456-426614174000"

channel
enum<string>
required

The interaction channel, you can send your agent to call, sms, whatsapp or webchat

Available options:
call,
sms,
whatsapp,
email,
webchat
Example:

"call"

skillId
string
required

Your skill UUID

Example:

"123e4567-e89b-12d3-a456-426614174000"

customerOverride
object
required

Your agent override settings

Example:
{
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "+1234567890",
  "email": "admin@email.com",
  "language": "en-US",
  "customFields": [
    { "name": "Order ID", "value": "12345" },
    {
      "name": "Order Date",
      "value": "2025-03-12"
    },
    { "name": "Order Amount", "value": 150.75 },
    { "name": "Active Status", "value": true }
  ]
}
agentOverride
object

Your agent override settings

Example:
{
  "name": "John Doe",
  "phone": "+12673624524",
  "imageURL": "https://example.com/image.jpg",
  "language": "en-US",
  "voiceStability": 0.5,
  "voiceSpeed": 1.5,
  "prompt": {
    "initialMessage": "Hello {{firstName}}, My name is {{aiName}}. I am calling you about your order ID {{Order ID}}",
    "prompt": "Your sponsibility is to notify the customer: {{firstName}} about his  order ID {{Order ID}} and the total cost  of {{Order Amount}}  with delivery date {{Delivery Date}}. That is all",
    "routingConditions": { "priority": "high" }
  }
}
customerName
string

The customer's name to create a new customer

Example:

"John Does"

customerPhone
string

The customer's phone number to create a new customer

Example:

"+1234567890"

customerEmail
string

The customer's email to create a new customer

Example:

"customer@email.com"

Response

200
application/json
Initiate call
id
string
required

Interaction ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

status
string
required

Interaction status

Example:

"in-progress"

agentPhone
string
required

Agent phone number

Example:

"+1234567890"

agentEmail
string
required

Agent Email

Example:

"+1234567890"

customerPhone
string
required

Customer phone number

Example:

"+1234567890"

customerEmail
string
required

Customer email

Example:

"+1234567890"

agentId
string
required

Agent ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

customerId
string
required

Customer ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

skillId
string
required

Skill ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

customerName
string
required

Customer name

Example:

"John Doe"

transcription
string
required

Transcription

Example:

"Hello, how can I help you?"

recordingUrl
string
required

Recording URL

Example:

"https://example.com/recording.wav"

messages
string[]
required

conversation messages

Example:
[
  {
    "sid": "SM1234567890abcdef",
    "timestamp": "2025-03-17T14:30:00Z",
    "sender": "agent",
    "content": "Hello, how can I assist you today?",
    "mediaUrl": "https://example.com/image.jpg",
    "status": "delivered"
  }
]
duration
number
required

Session duration in seconds

Example:

"7200"