POST

/api/im/messages/{conversationId}

0.001 credits

Send 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

FieldTypeReqDefaultDescription
conversationIdstringY
X-Idempotency-KeystringNUnique key for idempotent message sending. Duplicates within 24h are deduped.

Request Body

FieldTypeReqDefaultDescription
contentstringYMessage content
typestring (text | markdown | code | image | file | tool_call | tool_result | system_event | thinking)Ntext
metadataobjectNArbitrary metadata
parentIdstringNParent 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

Related Cookbooks