Skip to main content
POST
/
agents
Create Agent
curl --request POST \
  --url https://api.vogent.ai/api/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "defaultVoiceId": "<string>",
  "defaultVersionedPrompt": {
    "aiModelId": "<string>",
    "agentType": "STANDARD",
    "prompt": "<string>",
    "flowDefinition": {
      "nodes": [
        {
          "id": "<string>",
          "name": "<string>",
          "type": "<string>",
          "transitionRules": [
            {
              "conditionType": "always",
              "arrayConditionType": "any",
              "field": "<string>",
              "value": "<string>",
              "values": [
                "<string>"
              ],
              "transitionNodeId": "<string>"
            }
          ],
          "nodeData": {}
        }
      ],
      "globalContext": "<string>",
      "aiOpen": true,
      "openingLineType": "INBOUND_ONLY"
    },
    "name": "<string>",
    "modelOptionValues": [
      {
        "optionId": "<string>",
        "value": "<string>"
      }
    ]
  },
  "defaultExtractor": {
    "name": "<string>",
    "extractorFieldsJsonSchema": "<string>"
  },
  "inboundWebhookResponse": true,
  "inboundWebhookUrl": "<string>",
  "maxDurationSeconds": 10800,
  "openingLine": {
    "lineType": "INBOUND_ONLY",
    "content": "<string>"
  },
  "voiceVolumeLevel": -100,
  "backgroundNoiseType": "office",
  "linkedFunctionDefinitionIds": [
    "<string>"
  ],
  "linkedFunctionDefinitionInputs": [
    {
      "functionDefinitionId": "<string>",
      "lifecycleMessagesOverride": {
        "started": [
          "<string>"
        ]
      }
    }
  ],
  "metadata": {},
  "transcriberParams": {
    "type": "deepgram",
    "keywords": [
      "<string>"
    ]
  },
  "idleMessageConfig": {
    "enabled": true,
    "messages": [
      "<string>"
    ],
    "idleDurationMilliseconds": 5001,
    "maxIdleMessages": 2
  },
  "utteranceDetectorConfig": {
    "sensitivity": "ULTRA_FAST"
  },
  "language": "en"
}'
{
  "id": "<string>",
  "name": "<string>",
  "transcriberParams": {
    "type": "deepgram",
    "keywords": [
      "<string>"
    ]
  },
  "metadata": {},
  "utteranceDetectorConfig": {
    "sensitivity": "ULTRA_FAST"
  },
  "idleMessageConfig": {
    "enabled": true,
    "messages": [
      "<string>"
    ],
    "idleDurationMilliseconds": 5001,
    "maxIdleMessages": 2
  },
  "language": "<string>",
  "maxDurationSeconds": 10800,
  "defaultVoiceId": "<string>",
  "defaultVersionedPromptId": "<string>",
  "defaultExtractorId": "<string>",
  "linkedFunctionDefinitions": [
    {
      "functionDefinitionId": "<string>",
      "lifecycleMessagesOverride": {
        "started": [
          "<string>"
        ]
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

In the form Bearer <api_key_here>. You can find your api key in your dashboard.

Body

application/json

Create a new agent

name
string
required

The name of the agent.

defaultVoiceId
string
required

The ID of the voice to use.

defaultVersionedPrompt
object
required

The default versioned prompt to use for this agent.

defaultExtractor
object

The default extractor to use for this agent.

inboundWebhookResponse
boolean
inboundWebhookUrl
string
maxDurationSeconds
integer
default:10800

The maximum duration of the call in seconds.

openingLine
object | null

Details about the Agent's opening line. If unspecified, or null no opening line will be created.

voiceVolumeLevel
integer | null
default:-100

A value, generally between -300 and 300, indicating the volume level to use for the voice. The default is -100.

backgroundNoiseType
enum<string>
default:office

The background audio that's used by the agent.

Available options:
noise,
office,
silence
linkedFunctionDefinitionIds
string[]

The function definitions that should be available to this agent (deprecated, use linkedFunctionDefinitionInputs instead)

linkedFunctionDefinitionInputs
object[]

The function definitions that should be available to this agent with optional lifecycle message overrides

metadata
object
transcriberParams
object
idleMessageConfig
object
utteranceDetectorConfig
object
language
string
default:en

The language to use for the agent.

Response

Successful operation

id
string
required
name
string
required
language
string
required

The language to use for the agent.

transcriberParams
object
metadata
object
utteranceDetectorConfig
object
idleMessageConfig
object

Configuration for idle messages that the agent can say when the user is silent.

maxDurationSeconds
integer
default:10800

The maximum duration of the call in seconds.

defaultVoiceId
string

The default voice ID to use for the agent.

defaultVersionedPromptId
string

The default versioned prompt ID to use for the agent.

defaultExtractorId
string | null

The default extractor ID to use for the agent.

linkedFunctionDefinitions
object[]

The function definitions that should be available to this agent.

I