DocumentationAPI ReferenceRelease Notes
ScaleAI
API OverviewAPI Authentication
Create agent from template POSTClone an agent POSTGet dynamic prompt variables for an agent GETList all agents GETCreate a new agent POSTGet agent by ID GETUpdate agent PATCHGet All Event Types GETAI generate or update agent prompt POSTList agent versions GETGet agent version detail GETUpdate agent version metadata PATCHRestore agent version POST
Get Batch Template Url GETGet Batches GETCreate Batch POSTUpdate Batch PATCHDelete Batch DELETE
Get Call Logs GETGet Call Log Detail GETGet Call Recording POSTStream Call Recording GETRecall Call Session POSTGet Call Recording Url POSTGet Call Recording Url By Action POST
Discover Urls POSTList Knowledge Bases GETCreate Knowledge Base POSTGet Knowledge Base GETPatch Knowledge Base PATCHCancel Knowledge Base Ingestion POSTRetry Knowledge Base Ingestion POSTRefresh Knowledge Base POST
List Phone Numbers GETCreate Phone Number POSTSync Phone Numbers POSTList Phone Numbers By Provider GETDelete Phone Number DELETEUpdate Phone Number PUT
Originate Call POST
Initiate Call POST
List Event Types GETList Webhook Subscriptions GETCreate Webhook Subscription POSTList Delivery Logs GETGet Webhook Subscription GETUpdate Webhook Subscription PATCHDelete Webhook Subscription DELETE
List Function Logs GET
List function tools GETCreate function tool POSTGet function tool GETUpdate function tool PATCH
List Credentials GET
Create Credential POSTGet Credential GETUpdate Credential PATCHDelete Credential DELETE
Go to platform
Agents

Create a new agent

Create a new agent using a secret key

POST/api/v1/service/projects/{project_id}/agents

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

project_id*Project Id
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/service/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/agents" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "agent_type": "single_prompt"  }'
{  "name": "string",  "prompt": "string",  "hangup_prompt": "string",  "is_hangup_prompt_enabled": false,  "welcome_message": "string",  "agent_type": "single_prompt",  "workflow_id": "03e70e31-d7a4-4401-a629-6a4b6096cdfe",  "config": {},  "call_configuration": {    "call_provider": "exotel",    "final_message": "string",    "final_message_language_id": "de48a4d4-8ae3-4265-98cd-d24b3b656723",    "hangup_on_user_silence": 7,    "total_call_timeout": 1800,    "ambient_sound": {      "enabled": false,      "sound_type": "light_rain",      "volume": 0.5    },    "filler_phrases": {      "enabled": false,      "confidence_threshold": 0.6    },    "voicemail_detection": false,    "voicemail_message_enabled": false,    "voicemail_message": "string",    "keypad_input_detection": {      "enabled": false,      "timeout_secs": 2,      "termination_key_enabled": false,      "termination_key": "#",      "digit_limit_enabled": false,      "digit_limit": 5    },    "ivr_navigation": {      "enabled": false,      "goal": "string"    },    "timezone": "UTC",    "availability": {      "inbound": {        "enabled": false,        "days": [          {            "day": "monday",            "enabled": false,            "start": "09:00",            "end": "17:00"          }        ]      },      "outbound": {        "enabled": false,        "days": [          {            "day": "monday",            "enabled": false,            "start": "09:00",            "end": "17:00"          }        ]      }    },    "unavailable_message": "string",    "is_noise_cancellation_enabled": false,    "noise_cancellation_filter": "RNN",    "strategies": {}  },  "status": "draft",  "version_title": "string",  "version_description": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "is_active": true,  "base_agent_id": "2ef2cccb-4054-40a0-b716-c02db51af7b2",  "parent_agent_id": "78abc826-0a96-4a60-a1ec-63825bf114a6",  "version": 0,  "is_current": true,  "knowledge_bases": [],  "function_tools": [],  "guardrails": [    {      "name": "string",      "response": "string",      "threshold": 0,      "utterances": [        {          "text": "string"        }      ]    }  ],  "structured_output": [    {      "name": "string",      "description": "",      "method": "ai_extraction",      "structured_schema": {        "type": "boolean",        "description": "string",        "properties": {          "property1": {},          "property2": {}        },        "required": [          "string"        ],        "items": {},        "minimum": 0,        "maximum": 0      }    }  ],  "estimated_cost": {},  "language": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "code": "string"  }}

List all agents GET

Get a paginated list of agents for the project

Get agent by ID GET

Retrieve a specific agent by ID

name*Name

Agent name

Length1 <= length <= 255
agent_type*AgentType

single_prompt | workflow

Value in

  • "single_prompt"
  • "workflow"