Messages
Send Message
POST
/communication/messages/{userId}/send
https://api.relesystest.net/api/v1.4/communication/messages/{userId}/send
Sends a Message to the user.
Please read the information below carefully, so you know how this endpoint operates.
deliveryMethod - Decides how to attempt to send out the message. If not provided, the request will not continue.
- Parameters: "sms", "email" or "both"
communicationTemplateId - If provided will look for the message to be sent out based on the Id provided. A list of available Communication Templates can be found under Communication -> Templates.
messageType - If communicationTemplateId is not provided, this will be looked for based on the 3 options below. These settings are chosen in the Relesys Portal.
- Parameters: "welcome", "logininfo" or "forgottenpassword"
messageBody - If none of the 2 options above are provided, this will be used to create a custom message.
- The body for email is HTML encoded and for SMS it is ASCII encoded.
Destination fields (all optional) - By default, the account's settings determine which of the user's phone/email fields the message is sent to (an account can be configured to use e.g. the business phone or the secondary email as its primary field). These fields override that account setting for this message only:
- phoneNumberField: "phone" or "businessPhone" - send the SMS to that field on the user profile.
- emailField: "email" or "secondaryEmail" - send the email to that field on the user profile.
- A field is only allowed when its channel is included in deliveryMethod.
Please read the information below carefully, so you know how this endpoint operates.
deliveryMethod - Decides how to attempt to send out the message. If not provided, the request will not continue.
- Parameters: "sms", "email" or "both"
communicationTemplateId - If provided will look for the message to be sent out based on the Id provided. A list of available Communication Templates can be found under Communication -> Templates.
messageType - If communicationTemplateId is not provided, this will be looked for based on the 3 options below. These settings are chosen in the Relesys Portal.
- Parameters: "welcome", "logininfo" or "forgottenpassword"
messageBody - If none of the 2 options above are provided, this will be used to create a custom message.
- The body for email is HTML encoded and for SMS it is ASCII encoded.
Destination fields (all optional) - By default, the account's settings determine which of the user's phone/email fields the message is sent to (an account can be configured to use e.g. the business phone or the secondary email as its primary field). These fields override that account setting for this message only:
- phoneNumberField: "phone" or "businessPhone" - send the SMS to that field on the user profile.
- emailField: "email" or "secondaryEmail" - send the email to that field on the user profile.
- A field is only allowed when its channel is included in deliveryMethod.
Scopes: relesys.api, relesys.api:write, relesys.api.users, relesys.api.users:write
URL Path
| userId | string / guid | The user's unique identifier | required |
Request Body
application/json| object | ||||
| communicationTemplateId | string / guid | optional | ||
| deliveryMethod | string | required | ||
| emailField | string | optional | ||
| ⯈ messageBody | object | optional | ||
| messageType | string | optional | ||
| phoneNumberField | string | optional | ||
Responses
application/json
There is no body for this response