From d4fe6cd2bfee50cfcde5de5c3f58240552e9c71d Mon Sep 17 00:00:00 2001 From: David Celis Date: Sun, 9 Apr 2017 09:33:40 -0700 Subject: 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 * Add /api/v1/accounts/update_credentials to the API docs Signed-off-by: David Celis --- docs/Using-the-API/API.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/Using-the-API') diff --git a/docs/Using-the-API/API.md b/docs/Using-the-API/API.md index 8a648b6d0..2b7081470 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 -- cgit