New conversation
OVERVIEW
Add new message API
Request URI
POST /api/4/conversations/
Request body
Response
If successful, the API returns the 200 status code.
If the operation fails, the API will return one of the following error codes
Response codes
| CODE | MEANING |
|---|---|
| 201 | Comments returned successfully |
| 400 | Problem with parameters |
| 401 | Unauthorized |
| 403 | Validation failed | Forbidden |
| 500 | Internal error occurred while returning comments |
In case of an error code other than 201, an error object will be returned in the format
Request body sample
XML form
<conversation> <recipients> <users> <user> <userid>{User id}</userid> </user> <user> <userid>{User id}</userid> </user> </users> </recipients> <messages> <message> <html><![CDATA[]]> </html> <attachments> <attachment> <id></id> </attachment> <attachment> <id></id> </attachment> </attachments> </message> </messages></conversation>
JSON form
{ "recipients": { "users": { "user": [ { "userid": {user id} }, { "userid": {user id} } ] } }, "messages": { "message": [ { "html": "{message body}", "attachments": { "attachment": [ { "id": "{attachment id}" }, { "id": "{attachment id}" } ] } } ] }}
Response body sample
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><conversation> <conversationid>43</conversationid> <messages> <message> <messageid>1160</messageid> </message> </messages></conversation>
Comments
0 Comments