Skip to main content
PATCH
/
v1
/
public
/
prompts
/
{prompt_name}
Update Prompt
curl --request PATCH \
  --url https://api.eigi.ai/v1/public/prompts/{prompt_name} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "prompt_content": "You are an expert customer support agent with 10 years of experience. Always be empathetic and solution-oriented."
}
'
{
  "prompt_name": "<string>",
  "prompt_version": 123,
  "prompt_content": "<string>",
  "prompt_metadata": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Overview

Update an existing prompt by creating a new version. The version number is automatically incremented. Previous versions are preserved and can be retrieved using the Get Prompt Versions endpoint.

Authentication

X-API-Key
string
required
Your eigi.ai API key. Must be prefixed with vk_.

Path Parameters

prompt_name
string
required
The unique name of the prompt to update.

Request Body

prompt_content
string
required
The new prompt text content for the new version.
prompt_metadata
object
Updated metadata for the prompt.

Response

prompt_name
string
The prompt name.
prompt_version
integer
The new version number (auto-incremented).
prompt_content
string
The updated prompt content.
prompt_metadata
object
Prompt metadata.
created_at
string
ISO 8601 creation timestamp.
updated_at
string
ISO 8601 last update timestamp.

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your API key from the eigi.ai Dashboard under Settings → API Keys.

Path Parameters

prompt_name
string
required

The unique prompt name

Body

application/json
prompt_content
string
required

New prompt text content

Minimum string length: 1
Example:

"You are an expert customer support agent for TechCorp with 10 years of experience."

prompt_metadata
object

Updated metadata for the prompt

Response

Prompt updated (new version created)

prompt_name
string

Unique prompt name

prompt_version
integer

Version number of the prompt

prompt_content
string

The prompt text content

prompt_metadata
object

Additional metadata

created_at
string<date-time>

Creation timestamp

updated_at
string<date-time>

Last update timestamp