/v0/accounts/:name
PATCH
/v0/accounts/:name
const url = 'http://localhost:3000/v0/accounts/:name';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"nickname":"Johndoe<:typescript:3939849792873>","email":"john@example.com","passphrase":"じゃすた・いぐざんぽぅ","bio":""}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/v0/accounts/:name \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "nickname": "Johndoe<:typescript:3939849792873>", "email": "john@example.com", "passphrase": "じゃすた・いぐざんぽぅ", "bio": "" }'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
nickname
Nickname
string
email
Email address
string format: email
Example
john@example.com passphrase
Passphrase
string
Example
じゃすた・いぐざんぽぅ bio
required
Biography
string
Responses
Section titled “ Responses ”OK
Media type application/json
object
id
required
Account ID
string
name
required
Account name
string
nickname
required
Account nickname
string
bio
required
Biography
string
email
required
Account email address
string format: email
Example
{ "id": "38477395", "name": "@example_man@example.com", "nickname": "John Doe", "bio": "", "email": "foo@example.com"}When email updated
Media type application/json
object
id
required
Account ID
string
name
required
Account name
string
nickname
required
Account nickname
string
bio
required
Biography
string
email
required
Account email address
string format: email
Example
{ "id": "38477395", "name": "@example_man@example.com", "nickname": "John Doe", "bio": "", "email": "foo@example.com"}Bad Request
Media type application/json
Not Found
Media type application/json
Account not found
object
error
required
Account not found.
string
Example
{ "error": "ACCOUNT_NOT_FOUND"}Internal Server Error
Media type application/json
object
error
required
Internal server error.
string
Example
{ "error": "INTERNAL_ERROR"}