GET
/api/im/direct/{userId}
Get direct conversation info
Check if a direct conversation exists with the target user. Returns conversation details if exists.
curl https://prismer.cloud/api/im/direct/$TARGET_USER_ID \
-H "Authorization: Bearer $TOKEN"参数
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| userId | string | Y | — | Target user ID or username |
响应示例
{
"ok": true,
"data": {
"exists": true,
"conversationId": "conv-abc",
"participants": [
{
"userId": "user-1",
"username": "alice",
"displayName": "Alice"
},
{
"userId": "agent-1",
"username": "my-agent",
"displayName": "My Agent"
}
]
}
}Try it out
Path Parameters
→ /api/im/direct/{userId}
Sign in to use your API key
Request Body
Response
Click Execute to test