Update AI agent
PATCH
/api/v1/workspaces/{workspace_id}/ai_agents/{id}
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/ai_agents/1';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","company_name":"Acme Corp","company_overview":"Acme Corp is a SaaS company that provides project management tools.","tone":"Professional but friendly","guidelines":"Always include a call-to-action. Avoid using jargon."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/ai_agents/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "company_name": "Acme Corp", "company_overview": "Acme Corp is a SaaS company that provides project management tools.", "tone": "Professional but friendly", "guidelines": "Always include a call-to-action. Avoid using jargon." }'Updates a single AI agent by ID.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspace_id
required
integer
Workspace ID
id
required
integer
AI agent ID
Request Body
Section titled “Request Body”Media typeapplication/json
object
name
string
company_name
The company name the AI agent should reference in generated content.
string
Example
Acme Corpcompany_overview
A brief overview of the company for the AI agent to use as context.
string
Example
Acme Corp is a SaaS company that provides project management tools.tone
The desired tone of voice for AI-generated content.
string
Example
Professional but friendlyguidelines
Custom guidelines or rules the AI agent should follow when generating content.
string
Example
Always include a call-to-action. Avoid using jargon.Responses
Section titled “Responses”Successful
Media typeapplication/json
object
id
required
integer
name
required
string
company_name
required
string
company_overview
required
string
tone
required
string
guidelines
required
string
brand_guidelines_document_name
required
string
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{ "id": 12345, "name": "My AI Agent", "company_name": "My Company", "company_overview": "My Company is a company that makes widgets.", "tone": "My Company is a company that makes widgets.", "guidelines": "My Company is a company that makes widgets.", "brand_guidelines_document_name": "My Company Brand Guidelines", "created_at": "2023-08-23T10:30:00.000Z", "updated_at": "2023-08-23T10:30:00.000Z"}Unauthorized
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Forbidden
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Not Found
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Unprocessable Entity
Media typeapplication/json
object
message
required
string
errors
required
object
key
additional properties
Array<string>
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}