POST
/
agents
curl --request POST \
  --url https://svalync.com/api/agents \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "name": "<string>",
  "welcomeMessage": "<string>",
  "task": "<string>",
  "voice": "<string>",
  "language": "<string>",
  "telephonyProvider": "<string>",
  "callTermination": 123,
  "hangupMessage": "<string>",
  "apiTool": "<any>",
  "knowledgeBase": "<string>",
  "workflow": "<string>"
}'
{
  "response": [
    {
      "success": true,
      "data": {
        "id": "<string>",
        "name": "<string>",
        "welcomeMessage": "<string>",
        "task": "<string>",
        "voice": "<string>",
        "language": "<string>",
        "telephonyProvider": "<string>",
        "callTermination": 123,
        "hangupMessage": "<string>",
        "apiTool": "<any>",
        "knowledgeBase": "<string>",
        "workflow": "<string>"
      }
    }
  ]
}

Authorization

x-api-key
string
required

Your Api Key

Body

name
string
required

The name of the agent to be created.

welcomeMessage
string

The welcome message to be delivered by the agent.

task
string
required

The task or purpose of the agent, stored as long text.

voice
string
required

The voice setting for the agent.

language
string
required

The language in which the agent communicates.

telephonyProvider
string

The telephony provider used for handling calls, defaulting to “twilio”.

callTermination
integer

The duration or condition under which the call terminates, if applicable.

hangupMessage
string

The message delivered when the agent hangs up.

apiTool
json

The API tool configuration for the agent, if applicable.

knowledgeBase
string

The knowledge base reference for the agent, if applicable.

workflow
string

The workflow to run after call is ended. Here the value will be workflow id.

Response

response
array