/v0/accounts/:name/avatar (POST)
POST
/v0/accounts/:name/avatar
const url = 'http://localhost:3000/v0/accounts/:name/avatar';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"medium_id":"38477395"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/v0/accounts/:name/avatar \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "medium_id": "38477395" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” name
required
Characters must be [A-Za-z0-9-.] The first and last characters must be [A-Za-z0-9-.]
string
Example
example_manCharacters must be [A-Za-z0-9-.] The first and last characters must be [A-Za-z0-9-.]
Request Body
Section titled “Request Body ” Media type application/json
object
medium_id
required
Medium ID
string
Example
38477395Responses
Section titled “ Responses ”No Content
Forbidden
Media type application/json
You can not do this action.
object
error
required
You can’t do this action.
string
Example
{ "error": "NO_PERMISSION"}Not Found
Media type application/json
Internal Server Error
Media type application/json
object
error
required
Internal server error.
string
Example
{ "error": "INTERNAL_ERROR"}