Skip to main content
POST
/
api
/
agents
/
{agentId}
/
system-prompts
cURL
curl -X POST "https://app.cotool.ai/api/agents/:agentId/system-prompts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"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>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.cotool.ai/llms.txt

Use this file to discover all available pages before exploring further.

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 string length: 1
prompt
string
required
Minimum string 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