Skip to main content
PUT
/
Agent
/
{agentId}
/
prompt
Update the prompt of an agent
curl --request PUT \
  --url https://api.starleads.co/Agent/{agentId}/prompt \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "prompt": "You are a friendly sales assistant that helps customers find the right product..."
}
'
{
  "agentId": "64a1b2c3d4e5f6a7b8c9d0e1",
  "agentName": "My Sales Agent",
  "prompt": "You are a friendly sales assistant that helps customers find the right product..."
}

Authorizations

X-Api-Key
string
header
required

Headers

X-Api-Key
string
required

Api key to pass as a X-Api-Key request header.

Path Parameters

agentId
string
required

ID of the agent.

Body

application/json
prompt
string
required

The new prompt text for the agent. Must not be empty and cannot exceed 50,000 characters.

Required string length: 1 - 50000

Response

Success — Prompt updated

agentId
string

ID of the agent

agentName
string

Name of the agent

prompt
string

The current prompt text of the agent