yeetpost

Reference

OpenAPI

One spec describes the whole API, and these docs are generated from it. If a page and the spec disagree, the spec is right.

#Get the spec

GET /openapi.json is the one endpoint that needs no API key.

bash
curl https://api.yeetpost.com/api/v2/openapi.json

spec version

2.0.0

operations

11

webhook events

2

error codes

13

#How these docs are built

The spec is copied into this site at build time and turned into the data the pages render. Nothing about the spec is parsed in your browser, and the build does not call the API.

pipeline
node scripts/sync-openapi.mjs           # spec  -> content/openapi.json
node scripts/generate-api-reference.mjs # spec  -> content/api-reference.json
Every endpoint, parameter, schema, example and error code on the API reference and the errors page comes from that copy. Nothing there is hand-maintained.

#Generating a client

It is a plain OpenAPI 3.1 document, so any generator will take it. Point one at the URL:

bash
npx @openapitools/openapi-generator-cli generate \
  -i https://api.yeetpost.com/api/v2/openapi.json \
  -g typescript-fetch \
  -o ./yeetpost-client

Generated clients tend to send Authorization: Bearer, which is why the API takes the key that way as well as in x-api-key. See authentication.