POST
/v1/messages/
curl \
--request POST 'https://classmanager.test/v1/messages/' \
--header "Content-Type: application/json" \
--data '{"id":"msg_xxxxxxxxxx","subject":"email","body":"email body","recipientIds":["con_xxxxxxxxxx"],"attachments":["/path/to/file.blah"]}'
Request examples
{
"id": "msg_xxxxxxxxxx",
"subject": "email",
"body": "email body",
"recipientIds": [
"con_xxxxxxxxxx"
],
"attachments": [
"/path/to/file.blah"
]
}
Response examples (200)
{
"entity": {
"id": "msg_123123123123",
"companyId": "co_123123123123",
"type": "staff_invitation",
"subject": "Happy Birthday",
"body": "Body",
"fromName": "John Doe",
"fromEmail": "sample@example.com",
"status": "draft",
"sentAt": "2024-06-12T09:39:49.000000Z",
"updatedAt": "2024-06-12T09:39:49.000000Z",
"attachments": [
"string"
]
},
"stats": {
"messageId": "msg_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"recipients": {
"count": 10
}
}
}
Response examples (403)
{
"statusCode": 42.0,
"messages": [
"string"
],
"exception": {}
}
Response examples (422)
{
"statusCode": 42.0,
"messages": [
"string"
],
"exception": {}
}