The Fifth World

Edit member

This endpoint allows you to make changes to a member’s account information. You must have permission to do so, so you must authenticate as the member you want to change, or as a member who has administrative privileges. The endpoint updates only the fields you provide, leaving all others unchanged.

Request

HTTP Headers
HTTP Header Value
Authorization You must provide a valid JSON Web Token that authenticates you either as an administrator or as the member you wish to edit.
Path Parameters
Path parameter Value
id The unique ID number of the member you’d like to edit.
Member object
Property Value type Value
name string The member’s name.
email string The member’s email address.
password string The member’s password.
bio string A short biography or description for the member.
facebook string The member’s Facebook URL.
twitter string The member’s Twitter URL.
github string The member’s GitHub URL.
patreon string The member’s Patreon URL.
web string The URL of the member’s website.

Examples

Example Request
PATCH /v1/members/1 HTTP/1.1 Host: api.thefifthworld.com Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c { "name": "My New Name" }
Example Request
PATCH /v1/members/1 HTTP/1.1 Host: api.thefifthworld.com { "name": "My New Name", "email": "newname@example.com", "password": "My new, long, memorable passphrase.", "bio": "As an example in API docmentation, I have few interests outside of providing an example that this endpoint will update whichever fields I include, and leave any others unchanged." }

Response

If the endpoint successfully updated the member account, it returns a 200 HTTP status with a JSON object representing the updated account information. If the endpoint could not authenticate you as either the member to edit or an administrator, it responds with a 401 HTTP status.

Example

Example Response
{ "id": 1004, "name": "My New Name", "email": "newname@example.com", "bio": { "markdown": "As an example in API docmentation, I have few interests outside of providing an example that this endpoint will update whichever fields I include, and leave any others unchanged.", "html": "<p>As an example in API docmentation, I have few interests outside of providing an example that this endpoint will update whichever fields I include, and leave any others unchanged.</p>\n" }, "links": { "facebook": "https://facebook.com/jefgodesky", "twitter": "https://twitter.com/jefgodesky", "github": "https://github.com/jefgodesky", "patreon": "https://www.patreon.com/thefifthworld", "web": "https://thefifthworld.com" }, "nopass": false, "active": true, "admin": true, "invitations": 5 }