<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://docs.hostway.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://docs.hostway.com/index.php?action=history&amp;feed=atom&amp;title=Accounts-accountId-users-userName-roles%3APUT</id>
		<title>Accounts-accountId-users-userName-roles:PUT - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://docs.hostway.com/index.php?action=history&amp;feed=atom&amp;title=Accounts-accountId-users-userName-roles%3APUT"/>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-users-userName-roles:PUT&amp;action=history"/>
		<updated>2026-05-04T17:43:28Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://docs.hostway.com/index.php?title=Accounts-accountId-users-userName-roles:PUT&amp;diff=1137&amp;oldid=prev</id>
		<title>Mike.robski: 1 revision: Release 90</title>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-users-userName-roles:PUT&amp;diff=1137&amp;oldid=prev"/>
				<updated>2014-01-31T18:23:42Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision: Release 90&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:23, 31 January 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Mike.robski</name></author>	</entry>

	<entry>
		<id>http://docs.hostway.com/index.php?title=Accounts-accountId-users-userName-roles:PUT&amp;diff=1136&amp;oldid=prev</id>
		<title>Dinh.anh: /* Request Body */</title>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-users-userName-roles:PUT&amp;diff=1136&amp;oldid=prev"/>
				<updated>2013-11-14T15:26:57Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Request Body&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= PUT /accounts/{accountId}/users/{userName}/roles =&lt;br /&gt;
Modify the roles of a user.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Request ==&lt;br /&gt;
&amp;lt;code&amp;gt;PUT /accounts/{accountId}/users/{userName}/roles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Request Parameters ====&lt;br /&gt;
;accountId&lt;br /&gt;
: The ID of the account&lt;br /&gt;
;userName&lt;br /&gt;
: The username of the user&lt;br /&gt;
&lt;br /&gt;
=== URI Parameters ===&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
=== Request Headers ===&lt;br /&gt;
{{Authorization}}&lt;br /&gt;
&lt;br /&gt;
=== Request Body ===&lt;br /&gt;
List of new roles to be set to the requested user&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
  &amp;quot;role1&amp;quot;,&lt;br /&gt;
  &amp;quot;role2&amp;quot;&lt;br /&gt;
]&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Allowed Roles ====&lt;br /&gt;
Can be retrieved with GET /roles call.&lt;br /&gt;
&lt;br /&gt;
== Response ==&lt;br /&gt;
&lt;br /&gt;
=== Status Code ===&lt;br /&gt;
;204 No Content&lt;br /&gt;
: The user's roles were successfully updated&lt;br /&gt;
;400 Bad Request&lt;br /&gt;
: The request body was malformed, or the specified roles are not allowed, or the account owner was attempting to demote himself/herself which is not allowed. (in this case, the response body will contain hints for what went wrong)&lt;br /&gt;
;401 Unauthorized&lt;br /&gt;
: Authentication failed&lt;br /&gt;
;403 Forbidden&lt;br /&gt;
: Authentication succeeded, but the logged-in user is not allowed to update the roles of this user. The only users allowed to update the roles of this user are ''this very user'', account owner(s) of ''this'' account, and sales/support agents. An account owner is any account user with the &amp;quot;sitecontrol_account_owner&amp;quot; role. An account owner may not remove their own &amp;quot;sitecontrol_account_owner&amp;quot; role, though they may do this to other account owners.&lt;br /&gt;
;404 Not Found&lt;br /&gt;
: Either the account or user does not exist&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Account|Account Management API]]&lt;br /&gt;
* [[Common Features]]&lt;br /&gt;
&lt;br /&gt;
{{disqus}}&lt;br /&gt;
[[Category:Hostway API]]&lt;br /&gt;
[[Category:Account Management API]]&lt;/div&gt;</summary>
		<author><name>Dinh.anh</name></author>	</entry>

	</feed>