{"_id":"55b7cff7aea7c8190058ba6f","user":"55aa7d625d3abb0d0012f3da","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"},"editedParams":true,"project":"55aa7d973be8f60d00041d42","__v":3,"editedParams2":true,"parentDoc":null,"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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-28T18:54:47.245Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n  name: \"John Doe\",\n  email: \"john:::at:::doe.com\",\n  privileges: \"\",\n  creationDate: \"2015-07-28T15:48:43.000-03:00\",\n  id: \"55b7ce8bd4c651f76bbd1b4b\"\n}","language":"json","status":200}]},"settings":"","examples":{"codes":[{"name":"","code":"curl -X POST 'https://api.cliengo.com/1.0/users' --data \"email=john@doe.com&name=John Doe&password=\"johndoerocks&api_key=YOURAPIKEY\"","language":"text"}]},"method":"post","auth":"required","params":[{"_id":"55b7cff7aea7c8190058ba73","ref":"","in":"body","required":true,"desc":"Email for the user","default":"Required and Unique","type":"string","name":"email"},{"_id":"55b7cff7aea7c8190058ba70","ref":"","in":"body","required":true,"desc":"Password for the user","default":"Required","type":"string","name":"password"},{"_id":"55b7cff7aea7c8190058ba72","ref":"","in":"body","required":false,"desc":"Name of the user","default":"Not required","type":"string","name":"name"},{"_id":"55b7cff7aea7c8190058ba71","ref":"","in":"body","required":false,"desc":"Phone of the user","default":"Not required","type":"string","name":"phone"},{"_id":"55b910fbfeef5135009b7d74","ref":"","in":"body","required":false,"desc":"Scroll down for more info.","default":"Not required, recommended.","type":"array_string","name":"privileges"}],"url":"/users"},"isReference":false,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"For security reasons, the user password isn't returned in the JSON.\"\n}\n[/block]\n\n[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\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\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Privilege\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"clients_read\",\n    \"0-1\": \"Grants read permissions for clients within the company.\",\n    \"1-0\": \"clients_write\",\n    \"1-1\": \"Grants writing permissions for clients within the company.\",\n    \"2-0\": \"clients_read_assigned\",\n    \"2-1\": \"The user will only be able to read clients assigned to them.\",\n    \"3-0\": \"clients_write_assigned\",\n    \"3-1\": \"The user will only be able to write clients assigned to them.\",\n    \"4-0\": \"website_read\",\n    \"4-1\": \"Grants read permissions for websites within the company.\",\n    \"5-0\": \"website_write\",\n    \"5-1\": \"Grants write permissions for websites within the company.\",\n    \"6-0\": \"stats_read\",\n    \"6-1\": \"Grants read permissions for stats within the company.\",\n    \"7-0\": \"appointments_read\",\n    \"7-1\": \"Grants read permissions for appointments within the company.\",\n    \"8-0\": \"appointments_write\",\n    \"8-1\": \"Grants write permissions for appointments within the company.\",\n    \"9-0\": \"users_read\",\n    \"9-1\": \"Grants read permissions for users within the company.\",\n    \"10-0\": \"users_write\",\n    \"10-1\": \"Grants write permissions for users within the company.\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]","excerpt":"Creates user and returns JSON with data of the created user.","slug":"users-1","type":"endpoint","title":"/users"}

post/users

Creates user and returns JSON with data of the created user.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

email:
required
stringRequired and Unique
Email for the user
password:
required
stringRequired
Password for the user
name:
stringNot required
Name of the user
phone:
stringNot required
Phone of the user
privileges:
array of stringsNot required, recommended.
Scroll down for more info.

Examples


Result Format


Documentation

[block:callout] { "type": "info", "title": "For security reasons, the user password isn't returned in the JSON." } [/block] [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": { "h-0": "Privilege", "h-1": "Description", "0-0": "clients_read", "0-1": "Grants read permissions for clients within the company.", "1-0": "clients_write", "1-1": "Grants writing permissions for clients within the company.", "2-0": "clients_read_assigned", "2-1": "The user will only be able to read clients assigned to them.", "3-0": "clients_write_assigned", "3-1": "The user will only be able to write clients assigned to them.", "4-0": "website_read", "4-1": "Grants read permissions for websites within the company.", "5-0": "website_write", "5-1": "Grants write permissions for websites within the company.", "6-0": "stats_read", "6-1": "Grants read permissions for stats within the company.", "7-0": "appointments_read", "7-1": "Grants read permissions for appointments within the company.", "8-0": "appointments_write", "8-1": "Grants write permissions for appointments within the company.", "9-0": "users_read", "9-1": "Grants read permissions for users within the company.", "10-0": "users_write", "10-1": "Grants write permissions for users within the company." }, "cols": 2, "rows": 11 } [/block]

User Information

Try It Out

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