Skip to main content
import requests

url = 'https://api.simplex.sh/prompt'
headers = {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
}

data = {
'prompt': 'You are a helpful assistant that helps users navigate websites.',
'name': 'Website Navigation Assistant'
}

response = requests.post(url, headers=headers, json=data)
result = response.json()
if result['succeeded']:
print(f"Created prompt with ID: {result['prompt_id']}")
{
  "succeeded": true,
  "message": "<string>",
  "prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
Create a new prompt in the prompts table. The prompt text is required, while the name is optional. If no name is provided, it will default to “New Prompt - ”. The created prompt will be associated with your organization and user ID, and can be used in workflows that utilize the run_beta_agent action.

Body

application/json
prompt
string
required

The prompt text (required)

name
string | null

Custom name for the prompt (optional). If not provided, defaults to 'New Prompt - {timestamp}'

Response

Prompt created successfully

succeeded
boolean
required

Whether the request succeeded

message
string
required

Success message

prompt_id
string<uuid>
required

The ID of the created prompt