Skip to main content

Overview

Update an existing AI agent by providing its unique Agent ID. You can modify the agent’s name, prompts, and other configurable settings without creating a new agent.

Prerequisites

  • Bearer token for an authenticated workspace
  • Valid Agent ID
You can retrieve the Agent ID using the Get Agents endpoint or from the Weya AI Dashboard.

Path Parameters

string
required
Unique identifier of the AI agent to update.

Request

string
required
Bearer token for authenticated workspace access.

Response

boolean
required
Indicates whether the request completed successfully.
integer
required
HTTP status code returned by the API.
string
required
Success message returned by the API.
object
required
Updated AI agent details.
string
Unique identifier of the AI agent.
string
Updated display name of the AI agent.
string
Updated system prompt that defines the agent’s behavior.
string
Updated greeting message spoken when the conversation begins.

Editable Fields

The following fields can be updated:

Response Codes

Error Handling

  • 400 Bad Request – Invalid request body or Agent ID.
  • 401 Unauthorized – Missing or invalid Bearer token.
  • 403 Forbidden – You do not have permission to update this agent.
  • 404 Not Found – Agent does not exist.
  • 500 Internal Server Error – Unexpected server error.
Only the fields included in the request body will be updated. Fields that are omitted will retain their existing values.
After updating an agent, you can:
  • Retrieve the updated configuration using GET /api/agents/
  • Assign the updated agent to campaigns
  • Continue editing the agent from the Weya AI Dashboard