Tuyu Developers

Developers

Customize the URLs on this site with your Tuyu URL:

https:// .
Method Documentation > Users and Workspaces

Add User to User Group POST

Description

Add a user to a user group.

URL

All responses are in JSON format by default, to specify an XML response add “.xml” to the end of the method name (in this case “add_to_user_group”)

https://<your subdomain>.<your domain>/api/add_to_user_group

Restrictions

The calling user must have:

  • Admin privileges for the site.

Parameters

Bold indicates required.

Parameter Description
api_key Your API Key.
user_id The ID of the user being added to the user group.
user_group_ids A comma-separated list of user group IDs the user can be added to.
timestamp The current time in Unix timestamp format.
signature Please see “User Authentication” for more information.

Sample Response

Successful response In JSON:

{"addToUserGroup":{"userId":10045, "userGroupIds": 4561,4567}}

Successful response in XML:

<addToUserGroup>
    <userId>10045</userId>
    <userGroupIds>4561,4567</userGroupIds>
</addToUserGroup>

Error response In JSON:

{"error":{
    "title":"'Add User to User Group Failed",
    "message":"Please try again or contact customer support."}
}

Error response In XML:

<error>
    <title>'Add User to User Group Failed</title>
    <message>Please try again or contact customer support.</message>
</error>