diff options
author | David Celis <me@davidcel.is> | 2017-04-09 09:33:40 -0700 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-09 18:33:40 +0200 |
commit | d4fe6cd2bfee50cfcde5de5c3f58240552e9c71d (patch) | |
tree | d4a7cf3666e6310652fac11f3078506b7ab44b54 /docs | |
parent | ea6c930c04762bef00b42dad16a17b71b8acc93b (diff) |
Allow users to update their Account in the API (#1179)
* Allow users to update their Account in the API
It would be nice for API clients to be able to allow users to update
their accounts without having to wrap Mastodon in a web view. This patch
adds an API endpoint to let users submit a PATCH for their account.
Signed-off-by: David Celis <me@davidcel.is>
* Add /api/v1/accounts/update_credentials to the API docs
Signed-off-by: David Celis <me@davidcel.is>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Using-the-API/API.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/Using-the-API/API.md b/docs/Using-the-API/API.md index 8a648b6d098..2b7081470d4 100644 --- a/docs/Using-the-API/API.md +++ b/docs/Using-the-API/API.md @@ -85,6 +85,17 @@ Returns an [Account](#account). Returns the authenticated user's [Account](#account). +#### Updating the current user: + + PATCH /api/v1/accounts/update_credentials + +Form data: + +- `display_name`: The name to display in the user's profile +- `note`: A new biography for the user +- `avatar`: A base64 encoded image to display as the user's avatar (e.g. `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUoAAADrCAYAAAA...`) +- `header`: A base64 encoded image to display as the user's header image (e.g. `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUoAAADrCAYAAAA...`) + #### Getting an account's followers: GET /api/v1/accounts/:id/followers |