New Orchly MCP & API are live. Build custom workflows with your SEO & AI visibility data.
POST /prompts

Create prompt

Add a prompt under a topic. Requires `content:write`.

Authenticate with Authorization: Bearer obk_live_xxx. See authentication.

Parameters

NameInTypeRequiredDescription
X-Workspace-Id header string required The workspace to scope the request to. Can also be passed as a `workspace_id` query parameter.

Request body

Send as JSON in the request body.

FieldTypeRequiredDescription
topic_id string required
prompt_text string required
country string optional
priority integer optional
target_models string[] optional
enabled boolean optional

Responses

200 Created
FieldTypeDescription
prompt Prompt
422 Invalid request parameters

Example request

curl --request POST \
  --url https://app.orchly.ai/api/v1/prompts \
  --header 'Authorization: Bearer obk_live_xxx' \
  --header 'X-Workspace-Id: ws_xxx' \
  --header 'Content-Type: application/json' \
  --data '{ "topic_id": "...", "prompt_text": "..." }'
const res = await fetch(`https://app.orchly.ai/api/v1/prompts`, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer obk_live_xxx',
    'X-Workspace-Id': 'ws_xxx',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"topic_id":"...","prompt_text":"..."}),
});
const data = await res.json();
import requests

resp = requests.post(
    "https://app.orchly.ai/api/v1/prompts",
    headers={
        "Authorization": "Bearer obk_live_xxx",
        "X-Workspace-Id": "ws_xxx",
    },
    json={"topic_id":"...","prompt_text":"..."},
)
data = resp.json()

Example response

A 200 response. Dynamic fields are shown as their type.

{
  "prompt": {
    "id": "string",
    "prompt_text": "string",
    "topic_id": "string",
    "enabled": true,
    "country": "string",
    "target_models": [
      "string"
    ],
    "priority": 0,
    "last_run_at": "string",
    "next_run_at": "string",
    "created_at": "string"
  }
}