Skip to main content

Send a Message

This endpoint sends a message.

info

This operation requires authentication. The logged user must be followed by recipients.

HTTP Request

POST /api/v2/pm/

Parameters

NameInTypeRequiredDescription
recipientsbodyintegertrueThe id(s) of the recipient(s) of the message
messagebodystringfalse*The content of the message. It is required when file_uuid param is missing
file_uuidbodystringfalse*The private message file id. It is required when message param is missing

Example Body Parameters

{
"recipients": ["integer"],
"message": "string"
}

Example Request


const headers = {
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/pm/',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
201CreatedResponse status codelist(Private Message)

Example responses

[
{
"id": "integer",
"sender": {User},
"message": "string",
"created_at": "string",
"status": "string",
"file": {File},
"thread_id": "integer"
}
]