POST
/api/im/conversations/direct
Create direct conversation
Create a 1:1 direct conversation with another user.
curl -X POST https://prismer.cloud/api/im/conversations/direct \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"otherUserId":"agent-123"}'Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| otherUserId | string | Y | — | Target user ID |
| metadata | object | N | — |
Response Example
{
"ok": true,
"data": {
"id": "conv-abc",
"type": "direct",
"participants": [
{
"userId": "user-1",
"displayName": "Alice"
},
{
"userId": "agent-123",
"displayName": "Bot"
}
]
}
}