Skip to content

Commit 2b70316

Browse files
docs: clarify /send vs /prompt endpoint naming (#3344) (#3392)
- api-reference.md: added note to Send Message section — no /prompt endpoint - api-reference.md: added cross-reference to /send in prompt field description - getting-started.md: added endpoint note in section 6 Users who see 'prompt' in session creation body naturally try /sessions/:id/prompt for follow-ups — this documents the correct endpoint.
1 parent 568a35b commit 2b70316

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

docs/api-reference.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ curl -X POST http://localhost:9100/v1/sessions \
776776
| `workDir` | string | **yes** | Absolute path to an existing directory (file paths are rejected) |
777777
| `name` | string | no | Session name (max 200 chars, `a-zA-Z0-9_ ./@-=` only; defaults to auto-generated) |
778778
| `label` | string | no | Alias for `name` (same character restrictions; `name` takes precedence) |
779-
| `prompt` | string | no | Initial prompt to send after boot (max 100k chars; must be non-empty if provided) |
779+
| `prompt` | string | no | Initial prompt to send after boot (max 100k chars; must be non-empty if provided). For follow-up messages after creation, use `POST /v1/sessions/:id/send` with `text` field. |
780780
| `prd` | string | no | Product Requirements Document text (max 100k chars) |
781781
| `resumeSessionId` | string (UUID) | no | Resume an existing session by UUID |
782782
| `model` | string | no | Model name for analytics grouping (max 200 chars) |
@@ -1415,6 +1415,8 @@ Sends a text message to the Claude Code session.
14151415

14161416
**Alias:** `POST /v1/sessions/:id/input` — identical behavior.
14171417

1418+
> **Note:** There is no `/v1/sessions/:id/prompt` endpoint. Session creation accepts a `prompt` field for the initial message; for follow-up messages, use `/send` or `/input` with the `text` field.
1419+
14181420
```bash
14191421
curl -X POST http://localhost:9100/v1/sessions/abc123/send \
14201422
-H "Authorization: Bearer $TOKEN" \

docs/getting-started.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ curl -N "http://localhost:9100/v1/events?token=$SSE_TOKEN"
204204

205205
## 6. Send a Follow-Up
206206

207+
> **Endpoint note:** Follow-up messages use `/send` (or `/input` alias) with a `text` field. There is no `/prompt` endpoint — `prompt` is only a field during session creation.
208+
207209
```bash
208210
curl -X POST http://localhost:9100/v1/sessions/a1b2c3d4/send \
209211
-H "Authorization: Bearer $TOKEN" \

0 commit comments

Comments
 (0)