Create agent prompt

POST/agent/prompts

Creates a new agent prompt

RequiresBearerauthentication

Body parameters

namestringrequired

Prompt name

descriptionstringoptional

Prompt description

contentstringrequired

Prompt content

is_defaultbooleanoptional

Whether this is a default prompt

tagsstring[]optional

Tags for categorizing the prompt

Returns  

Prompt created successfully

Response fields

successbooleanoptional
messagestringoptional
dataobjectoptional
idstringoptional

Prompt ID

namestringoptional

Prompt name

descriptionstringoptional

Prompt description

contentstringoptional

Prompt content

is_defaultbooleanoptional

Whether this is a default prompt

tagsstring[]optional

Tags for categorizing the prompt

POSTRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X POST "https://experiment.app.pheno.ml/agent/prompts" \
  -H "Authorization: Bearer $PHENOML_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Medical Assistant System Prompt",
  "description": "System prompt for medical assistant agent",
  "content": "You are a helpful medical assistant specialized in FHIR data processing.",
  "is_default": false,
  "tags": [
    "medical",
    "system"
  ]
}'
201 CreatedExample Response
{
  "success": true,
  "message": "Prompt created successfully",
  "data": {
    "id": "prompt_123",
    "name": "Medical Assistant System Prompt",
    "description": "System prompt for medical assistant agent",
    "content": "You are a helpful medical assistant...",
    "is_default": false,
    "tags": [
      "medical",
      "system"
    ]
  }
}