Messages API
The Messages API allows you to manage messages in your WeComplete application.
API Documentation
GET /api/messages/list
Retrieve all messages
Example Request:
GET /api/messages/list
Headers:
Content-Type: application/json
x-wecomplete-api: YOUR_API_KEYExample Response:
[
{
"id": "message_89012345",
"body": "Hello, how are you?",
"author": "John Doe",
"createdAt": 1628097600000
},
{
"id": "message_89012346",
"body": "I'm doing great, thanks!",
"author": "Jane Smith",
"createdAt": 1628097700000
},
...
]POST /api/messages/send
Send a new message
Example Request:
POST /api/messages/send
Headers:
Content-Type: application/json
x-wecomplete-api: YOUR_API_KEY
Body:
{
"body": "Hello, this is a new message!"
}Example Response:
{
"success": true
}