Skip to main content
PUT
/
v1
/
prompts
/
{prompt_id}
Update Prompt
curl --request PUT \
  --url https://api.example.com/v1/prompts/{prompt_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "prompt": "<string>",
  "response_schema": {
    "draft_07": {}
  }
}
'
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "prompt": "<string>",
    "response_schema": {
      "draft_07": {}
    },
    "version": 123,
    "is_current": true,
    "created_at": 123,
    "description": "<string>"
  },
  "response_type": "PromptResponse",
  "links": []
}

Authorizations

X-API-Key
string
header
required

API Key for external integrations (format: greetincs_...)

Path Parameters

prompt_id
string
required

Prompt ID in TypeID format (unversioned: prompt_xxx)

Body

application/json

Request schema for updating a prompt.

Note: version is an internal field managed by the system.

  • version: Auto-incremented on updates, not accepted as input
name
string | null
Required string length: 1 - 255
description
string | null
Maximum string length: 1000
prompt
string | null
Minimum string length: 1
response_schema
JSONSchema · object

JSON Schema Draft-07 model for structured prompt responses. Supports both primitive schemas (e.g., {"type": "string"}) and object schemas. If omitted, defaults to {"type": "string"}.

Response

Successful Response

API response model for structured prompts.

data
PromptData · object
required

Data model for versioned structured prompts.

The id field serializes as unversioned (prompt_xxx) for direct use in API paths. Version info is in the separate version field.

response_type
string
default:PromptResponse

HATEOAS links related to this response (e.g., self, next, prev)

Example:
[
{
"href": "/resource/{resource_id}",
"method": "GET",
"rel": "self",
"title": "Resource Details"
},
{
"href": "/resource/{resource_id}/related",
"method": "GET",
"rel": "related",
"title": "Related Resources"
}
]