{"_id":"55b7ec0d31bccb190081c11c","editedParams2":true,"githubsync":"","version":{"_id":"55aa7d983be8f60d00041d45","__v":20,"project":"55aa7d973be8f60d00041d42","createdAt":"2015-07-18T16:23:52.273Z","releaseDate":"2015-07-18T16:23:52.273Z","categories":["55aa7d983be8f60d00041d46","55aacf4e3be8f60d00041d89","55aacfaae2bdcb0d00c7466e","55aacfb3e2bdcb0d00c7466f","55aacfca3be8f60d00041d8a","55b67da3f8105a2f00c351ab","55b7cae4aea7c8190058ba5b","55b9218afeef5135009b7db3","55c182616d7d2921006da013","5631407afa40240d007c8c60","56548b9c9c4c6d0d00aeda0c","572b9137ff3ba10e00b4abb4","572b9150ff3ba10e00b4abb5","581b83288ca41f0f007e4fb6","585065fa70cbe00f00835bb8","58641eba0355f31900380492","58861760b4816e19005c9941","58a316cb254c401b00a049ce","58ac80dbd5e1570f00d1c328","59f72b4991121a00104f036e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"project":"55aa7d973be8f60d00041d42","category":{"_id":"55b7cae4aea7c8190058ba5b","pages":["55b7cc6c31bccb190081c08e","55b7cff7aea7c8190058ba6f","55b7eb1daea7c8190058bad2","55b7ec0d31bccb190081c11c"],"project":"55aa7d973be8f60d00041d42","version":"55aa7d983be8f60d00041d45","__v":4,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-28T18:33:08.880Z","from_sync":false,"order":8,"slug":"users","title":"Users"},"parentDoc":null,"user":"55aa7d625d3abb0d0012f3da","__v":2,"editedParams":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-28T20:54:37.025Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"name":"","code":"{\n  name: \"John Doerino\",\n  email: \"john:::at:::doerino.com\",\n  privileges: \"\",\n  creationDate: \"2015-07-28T17:36:43.646-03:00\",\n  id: \"55b7e7dbd4c62a298ff3fabc\"\n}","language":"json"}]},"settings":"","examples":{"codes":[{"name":"","code":"curl -X PUT 'https://api.cliengo.com/1.0/users/55b7e7dbd4c62a298ff3fabc' --data \"email=john@doerino.com&name=John Doerino&api_key=YOURAPIKEY\"","language":"curl"}]},"method":"put","auth":"required","params":[{"_id":"55b7ec0d31bccb190081c11d","ref":"","in":"path","required":true,"desc":"ID of the User.","default":"Required.","type":"string","name":"userId"},{"_id":"55b915cbfeef5135009b7d89","ref":"","in":"body","required":false,"desc":"Scroll down for information about privileges.","default":"","type":"string","name":"privileges"},{"_id":"55b915cbfeef5135009b7d88","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"email"},{"_id":"55b915cbfeef5135009b7d87","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"name"},{"_id":"55b915cbfeef5135009b7d86","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"password"},{"_id":"55b915cbfeef5135009b7d85","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"phone"}],"url":"/users/:userId"},"isReference":false,"order":3,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"User Privileges\"\n}\n[/block]\nUser privileges define what a user can edit inside the CRM and the API. You can define them by sending them separated with commas, no spaces in between.\n\nExample:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"clients_write,clients_read,users_read\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nThe set of privileges on the example would let the new user to be able to:\n* See clients within the company.\n* Create and edit clients within the company.\n* Only be able to see the users within the company, but not editing them.\n\nThere are two types of privileges, write and read. The read privilege, grants reading permissions. The write privilege will let the user edit and create X field.\n\nYou can see the list of privileges below:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"clients_read\",\n    \"1-0\": \"clients_write\",\n    \"2-0\": \"clients_read_assigned\",\n    \"3-0\": \"clients_write_assigned\",\n    \"4-0\": \"website_read\",\n    \"5-0\": \"website_write\",\n    \"6-0\": \"stats_read\",\n    \"7-0\": \"appointments_read\",\n    \"8-0\": \"appointments_write\",\n    \"9-0\": \"users_read\",\n    \"10-0\": \"users_write\",\n    \"0-1\": \"Grants read permissions for clients within the company.\",\n    \"1-1\": \"Grants writing permissions for clients within the company.\",\n    \"2-1\": \"The user will only be able to read clients assigned to them.\",\n    \"3-1\": \"The user will only be able to write clients assigned to them.\",\n    \"4-1\": \"Grants read permissions for websites within the company.\",\n    \"5-1\": \"Grants write permissions for websites within the company.\",\n    \"6-1\": \"Grants read permissions for stats within the company.\",\n    \"7-1\": \"Grants read permissions for appointments within the company.\",\n    \"8-1\": \"Grants write permissions for appointments within the company.\",\n    \"9-1\": \"Grants read permissions for users within the company.\",\n    \"10-1\": \"Grants write permissions for users within the company.\",\n    \"h-0\": \"Privilege\",\n    \"h-1\": \"Description\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]","excerpt":"","slug":"usersuserid-1","type":"endpoint","title":"/users/:userId"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

userId:
required
stringRequired.
ID of the User.

Body Params

privileges:
string
Scroll down for information about privileges.
email:
string
name:
string
password:
string
phone:
string

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "User Privileges" } [/block] User privileges define what a user can edit inside the CRM and the API. You can define them by sending them separated with commas, no spaces in between. Example: [block:code] { "codes": [ { "code": "clients_write,clients_read,users_read", "language": "text" } ] } [/block] The set of privileges on the example would let the new user to be able to: * See clients within the company. * Create and edit clients within the company. * Only be able to see the users within the company, but not editing them. There are two types of privileges, write and read. The read privilege, grants reading permissions. The write privilege will let the user edit and create X field. You can see the list of privileges below: [block:parameters] { "data": { "0-0": "clients_read", "1-0": "clients_write", "2-0": "clients_read_assigned", "3-0": "clients_write_assigned", "4-0": "website_read", "5-0": "website_write", "6-0": "stats_read", "7-0": "appointments_read", "8-0": "appointments_write", "9-0": "users_read", "10-0": "users_write", "0-1": "Grants read permissions for clients within the company.", "1-1": "Grants writing permissions for clients within the company.", "2-1": "The user will only be able to read clients assigned to them.", "3-1": "The user will only be able to write clients assigned to them.", "4-1": "Grants read permissions for websites within the company.", "5-1": "Grants write permissions for websites within the company.", "6-1": "Grants read permissions for stats within the company.", "7-1": "Grants read permissions for appointments within the company.", "8-1": "Grants write permissions for appointments within the company.", "9-1": "Grants read permissions for users within the company.", "10-1": "Grants write permissions for users within the company.", "h-0": "Privilege", "h-1": "Description" }, "cols": 2, "rows": 11 } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}