You can invite a user to view a content item by sending the POST request to the following URL: /content/<content_item_id>/invitation.
Permission to run the request: Account Owner, Administrator, Organization Administrator, Publisher.
Parameter | Description |
---|---|
X-Auth-Account-Url (required) | Base URL of the account, e.g. http://myaccount.ispringlearn.com |
X-Auth-Email (required) | Administrator/Publisher e-mail address. |
X-Auth-Password (required) | Administrator/Publisher password. |
X-Users (optional) | a comma-separated list of user IDs, who will be invited to view the content item. |
X-Groups (optional) | a comma-separated list of group IDs, which members will be invited to view the content item. |
X-Emails (optional) | a comma-separated list of e-mail addresses to send invitations to. |
X-Invitation-Message (optional) | an invitation text added to the e-mail. |
X-Auto-Add-Permissions(optional, default: 1) | 1 - if a user/group has no permissions to view a given content item, these permissions will be added automatically. |
After the request has been completed, the system returns the response with Code 200.
If a user/group has no permissions to view a given content item, the response will be returned with Code 403, and it will contain the X-Users-Without-Permission/X-Groups-Without-Permission headers listing IDs of these users/groups.
Code | Text | Description |
---|---|---|
403 | Forbidden | The specified users or groups have no permissions to view a given content item. |
400 | Bad Request | The system failed to process the request, because it did not contain all necessary parameters. |
200 | Ok | The request has been processed successfully. |
POST /content/1/invitation HTTP/1.1 Host: api.ispringonline.com X-Auth-Account-Url: http://myaccount.ispringlearn.com X-Auth-Email: email@email.com X-Auth-Password: password X-Users: 1,2,3 X-Groups: 3,2,1 X-Emails: user1@email.com,user2@email.com X-Invitation-Message: Invitation Message |
HTTP/1.1 200 OK Connection: close |