SMAO API Documentation
Public APIPrompts

Update a prompt

PATCH
/prompts/{prompt_id}
AuthorizationBearer <token>

API key in the Authorization: Bearer <key> header. Keys are created in the SMAO dashboard (Settings → API Keys).

In: header

Path Parameters

prompt_idstring
Match^[a-f0-9]{24}$
name?string
Length1 <= length <= 200
prompt?string
Length1 <= length <= 100000
description?string
Lengthlength <= 2000
type?string
Value in"answering" | "email"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.smao.ai/api/v1/prompts/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": "65f8fa6f1a9d8e0012ab34cd",
    "name": "Sales — Initial Outreach",
    "description": "Opening prompt for cold outbound calls.",
    "prompt": "string",
    "type": "answering",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "health_score": 8,
    "approved": true,
    "feedback": "The prompt follows the template exactly and is production-ready. No changes required.",
    "rated_at": "2019-08-24T14:15:22Z",
    "rating_status": "rated"
  }
}
{
  "error": {
    "code": "validation_failed",
    "message": "Validation failed"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing API key"
  }
}
{
  "error": {
    "code": "subscription_required",
    "message": "This feature is not available in your current subscription. Please upgrade to a higher plan"
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "No permission"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "An unexpected error occurred."
  }
}