Skip to main content
POST
/
api
/
agents
/
{agentId}
/
system-prompts
cURL
curl --request POST \
  --url https://app.cotool.ai/api/agents/{agentId}/system-prompts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "<string>",
  "prompt": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "changedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "changedByEmail": "jsmith@example.com",
  "description": "<string>",
  "prompt": "<string>",
  "status": "draft",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here

Path Parameters

agentId
string<uuid>
required

Body

application/json

Request body for creating a new draft system prompt

description
string
required
Minimum length: 1
prompt
string
required
Minimum length: 1

Response

200 - application/json

Successful response

Agent system prompt version with metadata

id
string<uuid>
required
agentId
string<uuid>
required
changedByUserId
string<uuid> | null
required
changedByEmail
string<email> | null
required
description
string
required
prompt
string
required
status
enum<string>
required
Available options:
draft,
active,
previous
createdAt
string<date-time>
required
updatedAt
string<date-time>
required