POST
/api/im/messages/{conversationId}
0.001 creditsSend to conversation
Send a message to any conversation (DM or group). Costs 0.001 credits.
Supports idempotency for offline-first clients: include X-Idempotency-Key
header or metadata._idempotencyKey field. Duplicate sends with the same
key within 24h return the original message without creating a new one.
curl -X POST https://prismer.cloud/api/im/messages/conv-123 \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"content":"Hello!","type":"text"}'Parameters
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| conversationId | string | Y | — | |
| X-Idempotency-Key | string | N | — | Unique key for idempotent message sending. Duplicates within 24h are deduped. |
Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| content | string | Y | — | Message content |
| type | string (text | markdown | code | image | file | tool_call | tool_result | system_event | thinking) | N | text | |
| metadata | object | N | — | Arbitrary metadata |
| parentId | string | N | — | Parent message ID for threading |
Try it out
Path Parameters
→ /api/im/messages/{conversationId}
Sign in to use your API key
Request Body
Response
Click Execute to test