Skip to main content
PUT
/
api
/
v1
/
prompts
/
{id}
Update a prompt
curl --request PUT \
  --url https://app.dimred.com/api/v1/prompts/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "prompt_text": "<string>",
  "prompt_message_type": "system",
  "input_schema": {},
  "output_schema": {}
}'
{
  "id": "<string>",
  "prompt_message_id": "<string>",
  "project_id": "<string>",
  "prompt_message_type": "system",
  "prompt_text": "<string>",
  "input_schema": {},
  "output_schema": {},
  "prompt_source": "<string>",
  "prompt_source_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Obtain from your DimRed dashboard. The organization context is automatically derived from the API key.

Path Parameters

id
string
required

Prompt identifier

Body

application/json
prompt_text
string

Content of the prompt message

prompt_message_type
enum<string>

Type of the message

Available options:
system,
user,
assistant
input_schema
object | null

JSON schema for input validation

output_schema
object | null

JSON schema for structured output

Response

Prompt updated successfully

id
string

Unique identifier for the prompt

prompt_message_id
string

Message identifier

project_id
string

Project identifier

prompt_message_type
enum<string>

Type of the message

Available options:
system,
user,
assistant
prompt_text
string

Content of the prompt

input_schema
object | null

JSON schema for input validation

output_schema
object | null

JSON schema for structured output

prompt_source
string | null

Source of the prompt

prompt_source_id
string | null

Source identifier

created_at
string<date-time>

ISO 8601 timestamp of creation