Skip to main content
POST
/
api
/
v1
/
agents
/
{agentId}
Create agent version
curl --request POST \
  --url https://prod.featherhq.com/api/v1/agents/{agentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "mode": "FLOW",
  "prompt": {
    "system": "<string>",
    "systemUIFormatting": "<any>",
    "variables": [
      {
        "name": "<string>",
        "required": true,
        "defaultValue": "<string>"
      }
    ],
    "tools": [
      "<string>"
    ],
    "preBuiltTools": [
      "<string>"
    ]
  },
  "promptPersonalityId": "<string>",
  "sttConfigId": "<string>",
  "ttsConfigId": "<string>",
  "llmConfigId": "<string>",
  "overrideSTTConfig": {
    "keywords": [
      {
        "keyword": "<string>",
        "intensifier": "INTENSIFY"
      }
    ]
  },
  "overrideTTSConfig": {
    "pronunciations": []
  },
  "overrideLLMConfig": {},
  "voiceId": "<string>",
  "knowledgeBaseCollectionIds": [
    "<string>"
  ],
  "voicemailMessage": "<string>",
  "speakFirst": false,
  "firstMessage": "<string>",
  "useKnowledgeBase": true,
  "enableBackgroundAudio": true,
  "backgroundAudio": 50,
  "voiceVolume": 100,
  "voiceSpeed": 1,
  "postCallPrompt": "<string>",
  "postCallVariables": [
    {
      "variableName": "<string>",
      "type": "STRING",
      "description": "<string>",
      "required": false
    }
  ],
  "agentDelayBeforeFirstMessage": 1250,
  "initialSilenceTimeout": 30000,
  "finalSilenceTimeout": 10000,
  "transferImmediatelyOnInbound": false,
  "maxCallDuration": 900
}'
{
  "version": {
    "id": "<string>",
    "version": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "mode": "FLOW",
    "prompt": {
      "system": "<string>",
      "systemUIFormatting": "<any>",
      "variables": [
        {
          "name": "<string>",
          "required": true,
          "defaultValue": "<string>"
        }
      ],
      "tools": [
        "<string>"
      ],
      "preBuiltTools": [
        "<string>"
      ]
    },
    "promptPersonalityId": "<string>",
    "sttConfigId": "<string>",
    "ttsConfigId": "<string>",
    "llmConfigId": "<string>",
    "overrideSTTConfig": {
      "keywords": [
        {
          "keyword": "<string>",
          "intensifier": "INTENSIFY"
        }
      ]
    },
    "overrideTTSConfig": {
      "pronunciations": []
    },
    "overrideLLMConfig": {},
    "voiceId": "<string>",
    "postCallPrompt": "<string>",
    "postCallVariables": [
      {
        "variableName": "<string>",
        "type": "STRING",
        "description": "<string>",
        "required": false
      }
    ],
    "knowledgeBaseCollectionIds": [
      "<string>"
    ],
    "voicemailMessage": "<string>",
    "speakFirst": false,
    "firstMessage": "<string>",
    "useKnowledgeBase": true,
    "enableBackgroundAudio": false,
    "backgroundAudio": 50,
    "voiceVolume": 100,
    "forwardingPhoneNumber": "<string>",
    "voiceSpeed": 1,
    "agentDelayBeforeFirstMessage": 500,
    "initialSilenceTimeout": 30000,
    "finalSilenceTimeout": 10000,
    "maxCallDuration": 900,
    "language": {
      "languageId": "<string>",
      "languageCode": "EN",
      "languageDisplayName": "<string>"
    },
    "transferImmediatelyOnInbound": false
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

agentId
string
required

Body

application/json
mode
enum<string>
required
Available options:
FLOW,
PROMPT
overrideSTTConfig
object | null
required
overrideTTSConfig
object | null
required
overrideLLMConfig
object | null
required
firstMessage
string | null
required
prompt
object | null
promptPersonalityId
string | null
sttConfigId
string | null
ttsConfigId
string | null
llmConfigId
string | null
voiceId
string | null
knowledgeBaseCollectionIds
string[]
voicemailMessage
string | null
speakFirst
boolean
default:false
useKnowledgeBase
boolean
enableBackgroundAudio
boolean
backgroundAudio
number
Required range: 0 <= x <= 100
voiceVolume
integer
default:100
Required range: 10 <= x <= 120
voiceSpeed
number
Required range: 0.8 <= x <= 1.2
postCallPrompt
string | null
postCallVariables
object[] | null
agentDelayBeforeFirstMessage
integer
Required range: 0 <= x <= 2500
initialSilenceTimeout
integer
default:30000
Required range: 0 <= x <= 60000
finalSilenceTimeout
integer
default:10000
Required range: 0 <= x <= 60000
transferImmediatelyOnInbound
boolean
default:false
maxCallDuration
integer
default:900
Required range: 300 <= x <= 1200

Response

New agent version created successfully

version
object
required