Skip to main content
POST
/
agents
Create Agent (with optional Function Calling)
curl --request POST \
  --url https://call.aivoco.on.cloud.vispark.in/agents \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "id": "<string>",
  "name": "<string>",
  "system_message": "<string>",
  "voice": "boy",
  "functions": {
    "functions": [
      {
        "name": "<string>",
        "description": "<string>",
        "api_url": "<string>",
        "method": "GET",
        "parameters": {
          "type": "<string>",
          "properties": {},
          "required": [
            "<string>"
          ]
        }
      }
    ]
  }
}'
{
  "id": "<string>",
  "name": "<string>",
  "system_message": "<string>",
  "voice": "boy",
  "functions": {
    "functions": [
      {
        "name": "<string>",
        "description": "<string>",
        "api_url": "<string>",
        "method": "GET",
        "parameters": {
          "type": "<string>",
          "properties": {},
          "required": [
            "<string>"
          ]
        }
      }
    ]
  }
}
You can now extend your AI agents with function calling enabling them to call external APIs (like weather, calendar, or CRM systems) during live conversations.

Example Request

curl -X POST "https://call.aivoco.on.cloud.vispark.in/agents" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "name": "Weather Assistant",
    "system_message": "You are a helpful weather assistant. When users ask about weather, use the get_weather function.",
    "voice": "girl",
    "functions": {
      "functions": [
        {
          "name": "get_weather",
          "description": "Get current weather for a location",
          "api_url": "https://api.weatherapi.com/v1/current.json",
          "method": "GET",
          "parameters": {
            "type": "object",
            "properties": {
              "location": { "type": "string", "description": "City name" }
            },
            "required": ["location"]
          }
        }
      ]
    }
  }'

Authorizations

X-API-Key
string
header
required

Body

application/json
id
string
name
string
system_message
string
voice
enum<string>
Available options:
boy,
girl
functions
object

Response

201 - application/json
id
string
name
string
system_message
string
voice
enum<string>
Available options:
boy,
girl
functions
object