Inviting Users to View a Content Item

You can invite a user to view a content item by sending the POST request to the following URL: /content/<content_item_id>/invitation.

Request Headers

Parameter Description
X-Auth-Account-Url (required) Base URL of the account, e.g. http://myaccount.ispringonline.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 (for public content only).
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.

Possible Response Codes

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.

Sample Request

POST /content/1/invitation HTTP/1.1
Host: api.ispringonline.com
X-Auth-Account-Url: http://myaccount.ispringonline.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

Sample Response

HTTP/1.1 200 OK
Server: nginx
Connection: close