Account

Change the account's username, or its OnlyWorld with only_world.

A username the rule refuses (the body's description says it) is a 422 invalid_request with param username and a sentence that says why, and nothing in the body is written. only_world takes the id of a world the account owns; an id that names no world of the account's is a 404 and nothing in the body is written. Null clears the choice, and the oldest world the account owns serves again. Answers the account as GET /api/v2/account does.

patch/api/v2/account

Request

  • Base URL
    https://www.onlyworlds.com
  • Auth
    • HTTP bearer
    • or API key in header X-Session-Token

Request body

object required
username, string

The account's username, held to the rule sign-up holds it to: only the ASCII letters a to z (small or capital), the digits 0 to 9 and . + - _, with at least one letter or digit, at most 30 characters; not another account's name when case is ignored; and not the word owner in any case. The account's own name sent back unchanged is kept as it is, whatever it holds, and a change of only the case of one's own name is not refused as taken.

only_world, string nullable

The id of a world the account owns, to make it the account's OnlyWorld; null clears the choice.

Response

The account, changed.

object required
id, string uuid required
username, string required
email, string required
date_joined, string date-time nullable required
only_world, object nullable required

The account's OnlyWorld, the one world that stands for it: the world the person chose, else the oldest world the account owns, else null.

only_world_chosen, boolean required

True when only_world is the person's choice; false when it is the oldest world the account owns, or null.

Changes

    • info

      added the optional property error/limit to the response with the status

    • info

      added the optional property error/limit to the response with the status

    • info

      added the optional property error/limit to the response with the status

    3 more changes in this revision