User resource

Site users management - Send an email to users

OVERVIEW


Use this method to send an email to user(s)

Request URI

PUT /api/3/sites/{siteid}/users/email

Request Body 

A list of user ids to send emails. 

Send a transaction id's object to send a list of user id's. The userid can be obtained by calling the get all site users API.

<emailusers>

         <emailsubject><![CDATA[Subject]]></emailsubject> {provide subject of the email}

        <messagebody><![CDATA[message]]></messagebody> {email message }

      transaction id's object

</emailusers>

 

Response

The server will respond with 200 OK http response in the case of success , and a (4xx/5xx) response in the case of a partial success or a complete failure

The response body will contain transaction status information for each user

Request Parameters

Parameter Value Description
siteid integer The ID of the site. The siteid can be obtained by calling the Get site list API.

 

Notes : 

1) User id must be integer. If it's not, it will display this message "User ID provided is Invalid."

2) If a user id is listed multiple times in the transaction id's list an email will be sent to the user and the second time it will display a message stating "This user was already sent an email."

3) The user must be a participant of the given site. If not then it will display a message stating "User with the specified User ID does not exist in the site."

4) If the site is in read only mode at the time the invitation is sent only system admin have rights to send an email to site participants.

5) In the request body users must have to add CDATA tag if they have special characters in emailsubject or messagebody  tag. The request body is shown below

  <emailusers>

<emailsubject><![CDATA[Subject]]></emailsubject>

    <messagebody><![CDATA[message]]></messagebody>

    <transactionids>

        <transactionid>181</transactionid>

        <transactionid>124</transactionid>

</emailusers>

 

Comments


0 Comments

Last Updated: Jun 09,2023