User resource

Site users management - Send invitation email to users

OVERVIEW


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

Request URI

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

Request Body 

A list of user ids to send invitation 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.

<invitations>

         <messagebody> <![CDATA[E-Mail message.]]></messagebody> {optionally provide a message body for the invitation email }

       transaction id's object

<invitations>

 

Response

The server will respond with a 200 OK http response in the case of success , and a (4xx/5xx) response in case of partial success or 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 the message "User ID provided is Invalid."

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

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

4) Admin users can send invitations to users who were added by him. Other users will see the message "You do not have rights to send an invitation email to the specified user."

5) If the site is in preparation mode at the time the invitation is send to site admin only and it was send by site admin or system admin.

6) If the site is in archive mode at that time an invitation is sent, the response will be "Access denied".

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

8) In the request body, a user must add an e-mail message in the CDATA tag if they have special characters in e-mail message tag. See the request body below

    <invitations>

         <messagebody>

            <![CDATA[E-Mail message.]]>

        </messagebody>

         <transactionids>

            <transactionid>102</transactionid>

            <transactionid>126</transactionid>

            <transactionid>128</transactionid>

            <transactionid>129</transactionid>

        </transactionids>

    </invitations>

9) If user status is suspended, inactive or archived at the time an invitation is sent, the email will not be sent to the specific user and this message will display "User with this User ID does not exist in system or User is not active."

Comments


0 Comments

Last Updated: Jun 09,2023