POST ./mesaje

Need subscription flag to send a message to groups (limited acces for student/parent): FLAG_MSG_GROUP

It is used to send a message.

If the message is a draft field msgDestinatar will not be mandatory.

The workflow to create a draft:

  • to create a draft the request should be made with the parameter msgCiorna = 1;
  • to update a draft a request is made with the parameter msgCiorna = 1 and msgCiornaID = msgID; msgID will be the ID that was received after the creation of the draft.
  • when the final message will be sent, the request will be made only with msgCiornaID in order to delete the draft automatically.

POST parameters

NameValue TypeValidationDetails
msgDestinatararrayRequiredArray with message recipients.
msgSubiectstringRequiredMEssage subject.
msgContinutstringRequiredThe content of the message.
msgAtasamentearrayOptionalArray with attachment ids obtained from Upload files.
msgCiornaintOptionalvalues[1]; Specifies whether the message is a draft or not.
msgCiornaIDintOptionalSpecifies the draft id that will be updated or deleted when the message is sent.
replyMsgIDintOptionalReply message id.

Recipient format

FormatDetails
1-elevIDMessage to the student elevID
2-elevIDMessage to the student's parents elevID.
3-cadIDMessage to the teacher cadID.
5-pinstIDMessage to institution staff pinstID.
g-elevi-allMessage to all students in the current school year.
g-elevi-ast-astIDMessage to students in the current school year and year of study astID.
g-elevi-cl-clIDMessage to the students in the class clID.
g-elevi-cmc-cmcIDMessage to all students from the association between a teacher, a subject and a class cmcID.
g-parinti-allMessage to the parents of the students of the current school year.
g-parinti-ast-astIDMessage to the parents of the students of the current school year and the year of studyastID.
g-parinti-cl-clIDMessage to the parents of the students in the class clID.
g-parinti-cmc-cmcIDMessage to all parents from the association between a teacher, a subject and a class cmcID.
g-cadre-allMessage to all teachers.
g-cadre-ast-astIDMessage to teachers who teach in the current school year to the year of study astID.
g-cadre-cl-clIDMessage to teachers who teach in class clID.
g-cadre-mat-matIDMessage to the teachers who teach the subject matID.
g-cadre-cf-cfIDMessage to the teachers who have the function cfID.
g-inst-instIDMessage to all staff of the institution instID.

Validation

Error FieldError CodeError Message
msgDestinatar101At least one of the recipients is disabled.
msgDestinatar103You are not allowed to send messages to groups.
replyMsgID102Invalid ID or no permission.
msgContinut105The maximum limit of 30,000 characters has been reached.

Output example

{
"msgID": 8065
}