Skip to main content
POST
/
v1
/
update-agent
Update Agent
curl --request POST \
  --url https://api.getbluejay.ai/v1/update-agent \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "agent_id": "<string>",
  "external_agent_id": "<string>",
  "name": "<string>",
  "system_prompt": "<string>",
  "knowledge_base": "<string>",
  "phone_number": "<string>",
  "goals": [
    "<string>"
  ],
  "type": "INBOUND",
  "connection_type": "SMS",
  "mode": "VOICE",
  "keyterms": [
    "<string>"
  ],
  "folder": "<string>",
  "websocket_url": "<string>",
  "websocket_username": "<string>",
  "websocket_password": "<string>",
  "sip_uri": "<string>",
  "sip_username": "<string>",
  "sip_password": "<string>",
  "custom_sip_headers": {},
  "redact_pii": true,
  "livekit_agent_name": "<string>",
  "livekit_metadata": {},
  "livekit_customer_tool_topic": "<string>",
  "pipecat_agent_name": "<string>",
  "pipecat_agent_configuration": {},
  "pipecat_room_properties": {},
  "http_webhook": "<string>",
  "voice_provider": "<string>",
  "provider_id": "<string>",
  "enable_outbound_call_auto_start": true
}
'
{
  "agent": {
    "agent_id": "<string>",
    "external_agent_id": "<string>",
    "name": "<string>",
    "system_prompt": "<string>",
    "knowledge_base": "<string>",
    "phone_number": "<string>",
    "goals": [
      "<string>"
    ],
    "type": "INBOUND",
    "connection_type": "SMS",
    "mode": "VOICE",
    "keyterms": [
      "<string>"
    ],
    "folder": "<string>",
    "websocket_url": "<string>",
    "websocket_username": "<string>",
    "websocket_password": "<string>",
    "sip_uri": "<string>",
    "sip_username": "<string>",
    "sip_password": "<string>",
    "custom_sip_headers": {},
    "redact_pii": true,
    "livekit_agent_name": "<string>",
    "livekit_metadata": {},
    "livekit_customer_tool_topic": "<string>",
    "pipecat_agent_name": "<string>",
    "pipecat_agent_configuration": {},
    "pipecat_room_properties": {},
    "http_webhook": "<string>",
    "voice_provider": "<string>",
    "provider_id": "<string>",
    "enable_outbound_call_auto_start": true
  },
  "status": "200",
  "http_webhook_key": "<string>"
}
Integration Prompt for AI Agents
# Bluejay — Testing & Monitoring Platform for Conversational AI Agents

You are a senior backend engineer integrating the Bluejay API. Think step-by-step: first understand the endpoint, then plan the integration, then implement with minimal changes.

## Update Agent — POST /v1/update-agent

> **What this endpoint does:** Update an existing agent in the system.

**Endpoint:** POST `https://api.getbluejay.ai/v1/update-agent`
**Auth:** `X-API-Key` header
**Content-Type:** application/json

### Required Parameters
| Name | Type | Description |
|------|------|-------------|
| X-API-Key | string | API key required to authenticate requests. |
| agent_id | string (nullable) | ID of the agent to be updated |

Review the full parameter list at https://docs.getbluejay.ai/api-reference/endpoint/update-agent and include any optional parameters (e.g., `external_agent_id`, `name`, `system_prompt`, `knowledge_base`, `phone_number`, `goals`) that serve your integration's use case and align with Bluejay's testing and monitoring capabilities.

### Request Body (required fields)
```json
{
  "agent_id": "string"
}
```

Refer to the full schema at https://docs.getbluejay.ai/api-reference/endpoint/update-agent. Include optional fields that serve the goal of setting up for testing and monitoring on Bluejay.

### Example
**POST with body:**
```python
import requests

def update_agent(payload: dict, api_key: str) -> dict:
    url = "https://api.getbluejay.ai/v1/update-agent"
    headers = {"X-API-Key": api_key}
    response = requests.post(url, headers=headers, json=payload)
    response.raise_for_status()
    return response.json()
```

### Constraints
- Minimal changes — only add/change files needed for this integration.
- Match existing codebase patterns (naming, file structure, error handling).
- Include error handling for 422: Validation Error.

### Integration Checklist
Before writing code, verify:
1. Which module/service owns this API domain in the codebase?
2. What HTTP client and error-handling patterns does the project use?
3. Are there existing types/interfaces to extend?

Then implement the integration, export it, and confirm it compiles/passes lint.
Given the ID and, optionally, the name, system prompt, knowledge base, phone number, and goals, this endpoint updates your agent and returns the updates made to your agent.

Headers

X-API-Key
string
required

API key required to authenticate requests.

Body

application/json
agent_id
string | null
required

ID of the agent to be updated

external_agent_id
string | null

External agent ID for the agent

name
string | null

Name of the agent

system_prompt
string | null

System prompt for the agent

knowledge_base
string | null

Knowledge base of the agent

phone_number
string | null

Phone number associated with the agent

goals
string[] | null

List of goals for the agent

type
enum<string> | null

INBOUND: Agent receives incoming calls from customers OUTBOUND: Agent makes outgoing calls to customers

Available options:
INBOUND,
OUTBOUND
connection_type
enum<string> | null

Connection type of the agent (Livekit, Websocket, etc.)

Available options:
SMS,
HTTP_WEBHOOK,
PHONE,
SIP,
WEBSOCKET,
LIVEKIT,
PIPECAT
mode
enum<string> | null

Modality of the agent

Available options:
VOICE,
TEXT
keyterms
string[] | null

List of keyterms for the agent

folder
string | null

Name of the folder to put the agent in

websocket_url
string | null

WebSocket URL for real-time communication

websocket_username
string | null

Username for WebSocket authentication

websocket_password
string | null

Password for WebSocket authentication

sip_uri
string | null

SIP URI for VoIP calls

sip_username
string | null

Username for SIP authentication

sip_password
string | null

Password for SIP authentication

custom_sip_headers
Custom Sip Headers · object

Custom headers for SIP requests (Do not include X- prefix for the headers, these get added automatically)

redact_pii
boolean | null

Enable/disable PII redaction

livekit_agent_name
string | null

LiveKit agent name

livekit_metadata
Livekit Metadata · object

LiveKit metadata

livekit_customer_tool_topic
string | null

LiveKit customer tool topic

pipecat_agent_name
string | null

Pipecat agent name

pipecat_agent_configuration
Pipecat Agent Configuration · object

Pipecat agent configuration

pipecat_room_properties
Pipecat Room Properties · object

Pipecat room properties

http_webhook
string | null

HTTP webhook URL for text agent communication

voice_provider
string | null

Voice provider for the agent

provider_id
string | null

Provider ID for the agent

enable_outbound_call_auto_start
boolean | null

Automatically initiate an outbound call when a test result reaches READY state

Response

Successful Response

agent
AgentUpdateRequest · object
required

Updated agent details

status
string
default:200

Status of the response

http_webhook_key
string | null

Signing key for HTTP webhook (only provided if http_webhook was set)