Update AI Agent

View as Markdown

Updates an AI Agent by ID

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.

Learn more about API scopes.

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Path parameters

idstringRequiredformat: "uuid"
Unique ID of an AI Agent.

Request

This endpoint expects an object.
global_dataobjectOptional
A key-value object for storing data that persists throughout the AI session. Can be set initially in the SWML script or modified during the conversation using the set_global_data action. The global_data object is accessible everywhere in the AI session: prompts, AI parameters, and SWML returned from SWAIG functions. Access properties using template strings (e.g. ${global_data.property_name}).
hintslist of strings or objectsOptional
Hints help the AI agent understand certain words or phrases better. Words that can commonly be misinterpreted can be added to the hints to help the AI speak more accurately.
languageslist of objectsOptional
An array of JSON objects defining supported languages in the conversation.
paramsobjectOptional

A JSON object containing parameters as key-value pairs.

post_promptobjectOptional
The final set of instructions and configuration settings to send to the agent.
post_prompt_urlstringOptionalformat: "uri"

The URL to which to send status callbacks and reports. Authentication can also be set in the url in the format of username:password@url.

pronouncelist of objectsOptional
An array of JSON objects to clarify the AI's pronunciation of words or expressions.
promptobjectOptional
Defines the AI agent's personality, goals, behaviors, and instructions for handling conversations. The prompt establishes how the agent should interact with callers, what information it should gather, and how it should respond to various scenarios. It is recommended to write prompts using markdown formatting.
SWAIGobjectOptional

An array of JSON objects to create user-defined functions/endpoints that can be executed during the dialogue.

agent_idstringOptionalformat: "uuid"
Unique ID of an AI Agent.
namestringOptional
Name of the AI Agent.

Response

The request has succeeded.
idstringformat: "uuid"
Unique ID of the AIAgent.
project_idstringformat: "uuid"
Unique ID of the Project.
display_namestring
Display name of the AIAgent Fabric Resource
typeenum
Type of the Fabric Resource
Allowed values:
created_atdatetime
Date and time when the resource was created.
updated_atdatetime
Date and time when the resource was updated.
ai_agentobject
AIAgent data.

Errors