{"_id":"56d1f33f00a2a70b00b365ea","category":{"_id":"56d1f33900a2a70b00b36598","pages":["56d1f33f00a2a70b00b365e9","56d1f33f00a2a70b00b365ea","56d1f33f00a2a70b00b365eb","56d1f33f00a2a70b00b365ec","56d1f33f00a2a70b00b365ed"],"project":"5526c95cf69851170038b48f","__v":1,"version":"56d1f33700a2a70b00b3658e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-20T16:08:19.335Z","from_sync":false,"order":7,"slug":"rest-api","title":"API"},"user":"5526ca4cf69851170038b496","parentDoc":null,"project":"5526c95cf69851170038b48f","__v":6,"version":{"_id":"56d1f33700a2a70b00b3658e","project":"5526c95cf69851170038b48f","__v":2,"createdAt":"2016-02-27T19:04:23.946Z","releaseDate":"2016-02-27T19:04:23.946Z","categories":["56d1f33900a2a70b00b3658f","56d1f33900a2a70b00b36590","56d1f33900a2a70b00b36591","56d1f33900a2a70b00b36592","56d1f33900a2a70b00b36593","56d1f33900a2a70b00b36594","56d1f33900a2a70b00b36595","56d1f33900a2a70b00b36596","56d1f33900a2a70b00b36597","56d1f33900a2a70b00b36598","56d1f33900a2a70b00b36599","56d1f33900a2a70b00b3659a","571f9497ada30c34003b7cee"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"beta","version_clean":"2.0.0-beta","version":"2.0.0-beta"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-03T14:33:24.233Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"[block:html]\n{\n  \"html\": \"<style>\\n  \\n  .docs-content hr {\\n    border-top: 1px solid #eee;\\n    border-color: #eee;\\n    margin-bottom: 1px;\\n  }\\n  \\n  .docs-content p {\\n    margin-left: 20px;\\n  }\\n  \\n  .blocks-parent > div {\\n    margin-bottom: 0px;\\n  }\\n</style>\"\n}\n[/block]\nEndpoints:\n\n* [Create](#users-post) a User\n* [List](#users-list) Users\n* [Get](#users-get) a User\n* [Get](#users-self) the currently logged in User\n* [Update](#users-patch) a User\n* [Delete](#users-delete) a User\n* [Get](#users-custom-get) a User's Custom Data\n* [Set](#users-custom-put) a User's Custom Data\n* [Reset](#users-password-reset) a User's Password\n\n\n[block:html]\n{\n  \"html\": \"<a name=\\\"users-list\\\"></a>\\n<div class=\\\"endpoint get\\\">\\n\\t<span class=\\\"pg-type-big pg-type type-get\\\">get</span> https://api.ionic.io/users\\n</div>\"\n}\n[/block]\nGet a list of your users.\n\n\n**Authentication Required:** Yes\n\n**Response:** list of User objects\n\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name=\\\"users-get\\\"></a>\\n<div class=\\\"endpoint get\\\">\\n\\t<span class=\\\"pg-type-big pg-type type-get\\\">get</span> https://api.ionic.io/users/{uuid}\\n</div>\"\n}\n[/block]\nGet Information about a User.\n\n\n**Authentication Required:** Yes\n\n**Response:** User object\n\n**Parameters:** \n\n* uuid (string) The User's UUID\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name=\\\"users-self\\\"></a>\\n<div class=\\\"endpoint get\\\">\\n\\t<span class=\\\"pg-type-big pg-type type-get\\\">get</span> https://api.ionic.io/users/self\\n</div>\"\n}\n[/block]\nGet the currently authenticated User\n\n\n**Authentication Required:** Yes\n\n**Response:** User object\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name=\\\"users-post\\\"></a>\\n<div class=\\\"endpoint post\\\">\\n\\t<span class=\\\"pg-type-big pg-type type-post\\\">post</span> https://api.ionic.io/users\\n</div>\"\n}\n[/block]\nCreate a new User.\n\n**Authentication Required:** No\n\n**Response:** User object\n\n**Required Input:**\n\n* app_id (string) Your app ID\n* email (string) A unique e-mail address for the user.\n* password (string) The User's password\n\n** Optional Input:**\n\n* username (string) A username for the User\n* custom (json object) Custom data you would like to set on the user\n\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name=\\\"users-patch\\\"></a>\\n<div class=\\\"endpoint patch\\\">\\n\\t<span class=\\\"pg-type-big pg-type type-patch\\\">patch</span> https://api.ionic.io/users/{uuid}\\n</div>\"\n}\n[/block]\nUpdate a User's details\n\n**Authentication Required:** Yes\n\n**Response:** User object\n\n**Parameters:** \n\n* uuid (string) The User's UUID\n\n**Optional Input:**\n\n* password (string) A new password for the User\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name=\\\"users-delete\\\"></a>\\n<div class=\\\"endpoint delete\\\">\\n\\t<span class=\\\"pg-type-big pg-type type-delete\\\">delete</span> https://api.ionic.io/users/{uuid}\\n</div>\"\n}\n[/block]\nDelete a User\n\n**Authentication Required:** Yes\n\n**Response:** Null\n\n**Parameters:** \n\n* uuid (string) The User's UUID\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name=\\\"users-custom-get\\\"></a>\\n<div class=\\\"endpoint get\\\">\\n\\t<span class=\\\"pg-type-big pg-type type-get\\\">get</span> https://api.ionic.io/users/{uuid}/custom\\n</div>\"\n}\n[/block]\nGet a User's custom data\n\n**Authentication Required:** Yes\n\n**Response:** Custom Data object\n\n**Parameters:** \n\n* uuid (string) The User's UUID\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name=\\\"users-custom-put\\\"></a>\\n<div class=\\\"endpoint put\\\">\\n\\t<span class=\\\"pg-type-big pg-type type-put\\\">put</span> https://api.ionic.io/users/{uuid}/custom\\n</div>\"\n}\n[/block]\nSet a User's custom data. \n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Warning\",\n  \"body\": \"Custom Data sent to this endpoint will *replace* the current custom data for the User.\"\n}\n[/block]\n**Authentication Required:** Yes\n\n**Response:** Custom Data object\n\n**Parameters:** \n\n* uuid (string) The User's UUID\n\n**Required Input:**\n\n* request body (json) The custom data to set on the User\n\n\n[block:html]\n{\n  \"html\": \"<a name=\\\"users-password-reset\\\"></a>\\n<div class=\\\"endpoint post\\\">\\n\\t<span class=\\\"pg-type-big pg-type type-post\\\">post</span> https://api.ionic.io/users/{uuid}/password-reset\\n</div>\"\n}\n[/block]\nResets the User's password with a generated password, which is e-mailed to the e-mail tied to the account. It is recommended to advise users to change their password after logging in.\n\n**Authentication Required:** No\n\n**Response:** --\n\n**Parameters:** \n\n* uuid (string) The User's UUID","excerpt":"","slug":"api-users","type":"basic","title":"Users Endpoints"}
[block:html] { "html": "<style>\n \n .docs-content hr {\n border-top: 1px solid #eee;\n border-color: #eee;\n margin-bottom: 1px;\n }\n \n .docs-content p {\n margin-left: 20px;\n }\n \n .blocks-parent > div {\n margin-bottom: 0px;\n }\n</style>" } [/block] Endpoints: * [Create](#users-post) a User * [List](#users-list) Users * [Get](#users-get) a User * [Get](#users-self) the currently logged in User * [Update](#users-patch) a User * [Delete](#users-delete) a User * [Get](#users-custom-get) a User's Custom Data * [Set](#users-custom-put) a User's Custom Data * [Reset](#users-password-reset) a User's Password [block:html] { "html": "<a name=\"users-list\"></a>\n<div class=\"endpoint get\">\n\t<span class=\"pg-type-big pg-type type-get\">get</span> https://api.ionic.io/users\n</div>" } [/block] Get a list of your users. **Authentication Required:** Yes **Response:** list of User objects [block:api-header] { "type": "basic" } [/block] [block:html] { "html": "<a name=\"users-get\"></a>\n<div class=\"endpoint get\">\n\t<span class=\"pg-type-big pg-type type-get\">get</span> https://api.ionic.io/users/{uuid}\n</div>" } [/block] Get Information about a User. **Authentication Required:** Yes **Response:** User object **Parameters:** * uuid (string) The User's UUID [block:api-header] { "type": "basic" } [/block] [block:html] { "html": "<a name=\"users-self\"></a>\n<div class=\"endpoint get\">\n\t<span class=\"pg-type-big pg-type type-get\">get</span> https://api.ionic.io/users/self\n</div>" } [/block] Get the currently authenticated User **Authentication Required:** Yes **Response:** User object [block:api-header] { "type": "basic" } [/block] [block:html] { "html": "<a name=\"users-post\"></a>\n<div class=\"endpoint post\">\n\t<span class=\"pg-type-big pg-type type-post\">post</span> https://api.ionic.io/users\n</div>" } [/block] Create a new User. **Authentication Required:** No **Response:** User object **Required Input:** * app_id (string) Your app ID * email (string) A unique e-mail address for the user. * password (string) The User's password ** Optional Input:** * username (string) A username for the User * custom (json object) Custom data you would like to set on the user [block:api-header] { "type": "basic" } [/block] [block:html] { "html": "<a name=\"users-patch\"></a>\n<div class=\"endpoint patch\">\n\t<span class=\"pg-type-big pg-type type-patch\">patch</span> https://api.ionic.io/users/{uuid}\n</div>" } [/block] Update a User's details **Authentication Required:** Yes **Response:** User object **Parameters:** * uuid (string) The User's UUID **Optional Input:** * password (string) A new password for the User [block:api-header] { "type": "basic" } [/block] [block:html] { "html": "<a name=\"users-delete\"></a>\n<div class=\"endpoint delete\">\n\t<span class=\"pg-type-big pg-type type-delete\">delete</span> https://api.ionic.io/users/{uuid}\n</div>" } [/block] Delete a User **Authentication Required:** Yes **Response:** Null **Parameters:** * uuid (string) The User's UUID [block:api-header] { "type": "basic" } [/block] [block:html] { "html": "<a name=\"users-custom-get\"></a>\n<div class=\"endpoint get\">\n\t<span class=\"pg-type-big pg-type type-get\">get</span> https://api.ionic.io/users/{uuid}/custom\n</div>" } [/block] Get a User's custom data **Authentication Required:** Yes **Response:** Custom Data object **Parameters:** * uuid (string) The User's UUID [block:api-header] { "type": "basic" } [/block] [block:html] { "html": "<a name=\"users-custom-put\"></a>\n<div class=\"endpoint put\">\n\t<span class=\"pg-type-big pg-type type-put\">put</span> https://api.ionic.io/users/{uuid}/custom\n</div>" } [/block] Set a User's custom data. [block:callout] { "type": "danger", "title": "Warning", "body": "Custom Data sent to this endpoint will *replace* the current custom data for the User." } [/block] **Authentication Required:** Yes **Response:** Custom Data object **Parameters:** * uuid (string) The User's UUID **Required Input:** * request body (json) The custom data to set on the User [block:html] { "html": "<a name=\"users-password-reset\"></a>\n<div class=\"endpoint post\">\n\t<span class=\"pg-type-big pg-type type-post\">post</span> https://api.ionic.io/users/{uuid}/password-reset\n</div>" } [/block] Resets the User's password with a generated password, which is e-mailed to the e-mail tied to the account. It is recommended to advise users to change their password after logging in. **Authentication Required:** No **Response:** -- **Parameters:** * uuid (string) The User's UUID