Start a direct chat, or return the one that already exists
POST /api/member/chats/direct. Start a direct chat, or return the one that already exists. Headless LMS Chats API reference.
For a member of the community, within its direct-message settings (403 otherwise). With the community set so a first message is a request, a new chat starts pending until the other person accepts it. 409 when you message yourself, send attachments without a body, or start a request without a message.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/member/chats/direct" \ -H "Content-Type: application/json" \ -d '{ "communityId": "string", "orgUserId": "string", "body": "string" }'{ "orgId": "string", "id": "string", "communityId": "string", "kind": "direct", "status": "pending", "createdBy": "string", "lockedAt": "2019-08-24T14:15:22Z", "lockedBy": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}{ "error": "string", "message": "string", "requestId": "string", "issues": [ { "path": "string", "message": "string" } ]}{ "error": "string", "message": "string", "requestId": "string"}{ "error": "string", "message": "string", "requestId": "string"}{ "error": "string", "message": "string", "requestId": "string"}{ "error": "string", "message": "string", "requestId": "string"}{ "error": "string", "message": "string", "requestId": "string"}