API docs

I am genderfluid, which means my gender and preferred pronouns change over time. I've made an API to allow others to query the current status without having to ask me every time.

Endpoints

The API exposes the following endpoints:

EndpointSummary
/api/pronounsGet or update the pronouns.
/api/genderGet or update the gender.
/api/summaryGet a summary of the current state.
/api/killTrigger lockdown mode.

Previous version of this API made no guarantees about the formatting of the response bodies. This version makes the the following guarantees:

# /api/pronouns

Returns/updates the set of pronouns currently in use.

MethodAuthSummary
POSTBasicUpdate current pronouns.
GETNoneReturn current pronouns.

All payloads will be lowercased and stripped of both trailing and leading whitespace. This endpoint is guaranteed to return all values lowercased and without any leading or trailing whitespace.

# /api/gender

Returns/updates the current gender.

MethodAuthSummary
POSTBasicUpdate current gender.
GETNoneReturn current gender.

For some POST bodies, the gender will be matched to a set of pronouns that I commonly use when I am of that gender. These special cases are boy, girl and enby.

All payloads will be lowercased and stripped of both trailing and leading whitespace. This endpoint is guaranteed to return all values lowercased and without any leading or trailing whitespace.

# /api/summary

Combines the values produced by /api/pronouns and /api/gender into a single response, in JSON format.

MethodAuthSummary
GETNoneReturn both the gender and the pronouns as a JSON object.

Response

The response is in JSON-format. The endpoint returns an object with the following structure:

{"gender":"enby","pronouns":"they/them"}

The values for "gender" and "pronouns" are guaranteed to be lowercased strings. Both leading and trailing whitespace are stripped from those values.

Adding new keys to this response is considered backwards compatible. Treating the current set of keys as exhaustive is discouraged.

# /api/kill

Activate the kill switch built into the website. After this, a manual reset has to be done in order to restore the full site. This kill switch restricts access to a number of pages when triggered. The API will not be affected by this action.

MethodAuthSummary
POSTBasicActivate the website's kill switch.