{"id":320,"date":"2014-10-15T00:38:41","date_gmt":"2014-10-15T00:38:41","guid":{"rendered":"http:\/\/www.improvely.com\/docs\/?p=320"},"modified":"2014-10-15T01:11:52","modified_gmt":"2014-10-15T01:11:52","slug":"api-post-user-permission","status":"publish","type":"post","link":"https:\/\/www.improvely.com\/docs\/api-post-user-permission","title":{"rendered":"POST \/user_permission.json"},"content":{"rendered":"<p><b>Description:<\/b> Grants a user permission to view or administrate a specific project.<\/p>\n<p><b>API Endpoint URL:<\/b> <code>https:\/\/api.improvely.com\/v1\/user_permission.json<\/code><\/p>\n<table class=\"api\">\n<tr>\n<th>Attribute<\/th>\n<th>Required<\/th>\n<th>Default<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>key<\/td>\n<td style=\"text-align: center\"><i class=\"fa fa-check\"><\/i><\/td>\n<td><\/td>\n<td>Your API key<\/td>\n<\/tr>\n<tr>\n<td>id<\/td>\n<td><\/td>\n<td><\/td>\n<td>The ID number of the user to delete.<\/td>\n<\/tr>\n<tr>\n<td>email<\/td>\n<td><\/td>\n<td><\/td>\n<td>The e-mail address of the user to delete.<\/td>\n<\/tr>\n<tr>\n<td>project<\/td>\n<td style=\"text-align: center\"><i class=\"fa fa-check\"><\/i><\/td>\n<td><\/td>\n<td>The ID number of the Improvely project to grant this permission to. You can retrieve this number from the top of the Project Settings page of the relevant project in your account. <\/td>\n<\/tr>\n<tr>\n<td>permission<\/td>\n<td style=\"text-align: center\"><i class=\"fa fa-check\"><\/i><\/td>\n<td><\/td>\n<td>&#8220;view&#8221; will provide read-only access to the project&#8217;s reports<br \/>&#8220;full&#8221; will provide full administrative access to the project&#8217;s reports, links and settings<\/td>\n<\/tr>\n<\/table>\n<p><b>Note:<\/b> Either <code>id<\/code> or <code>email<\/code> must be provided to identify which user to grant this permission to.<\/p>\n<p><strong>Example request:<\/strong><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncurl https:\/\/api.improvely.com\/v1\/user_permission.json \\\r\n  -X POST \\\r\n  -d 'key=90c0d64fds653338as6869e54267e05&amp;email=dan@awio.com&amp;project=1&amp;permission=full'\r\n<\/pre>\n<p><strong>Example successful response (HTTP status code 200):<\/strong><\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n{\r\n    &quot;status&quot;: &quot;success&quot;\r\n}\r\n<\/pre>\n<p><strong>Example failure response (HTTP status code: 400):<\/strong><\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n{\r\n    &quot;status&quot;: &quot;error&quot;,\r\n    &quot;type&quot;: &quot;parameters&quot;,\r\n    &quot;message&quot;: &quot;Missing parameter: either `id` or `email` must be provided.&quot;\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Description: Grants a user permission to view or administrate a specific project. API Endpoint URL: https:\/\/api.improvely.com\/v1\/user_permission.json Attribute Required Default Description key Your API key id The ID number of the user to delete. email The e-mail address of the user to delete. project The ID number of the Improvely project to grant this permission to. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-320","post","type-post","status-publish","format-standard","hentry","category-api"],"_links":{"self":[{"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/posts\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/comments?post=320"}],"version-history":[{"count":5,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/posts\/320\/revisions"}],"predecessor-version":[{"id":330,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/posts\/320\/revisions\/330"}],"wp:attachment":[{"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/media?parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/categories?post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/tags?post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}