OpenAPI
The full API as an OpenAPI 3.1 document, with code samples, for generating clients and importing into API tools.
The API is described by an OpenAPI 3.1 document, generated from the same schemas the API validates requests with, so the docs and the API can't drift apart.
- On this site: https://happyfetch.net/openapi.json
- From the API itself:
https://api.happyfetch.net/v1/openapi.json
Each operation carries x-codeSamples in cURL, JavaScript and Python. Those are the samples on these pages.
Generate a client#
npx openapi-typescript https://happyfetch.net/openapi.json -o happyfetch.d.tspipx run openapi-python-client generate --url https://happyfetch.net/openapi.jsonnpx @openapitools/openapi-generator-cli generate -i https://happyfetch.net/openapi.json -g go -o ./happyfetchUse it in API tools#
Postman, Insomnia and Bruno import the URL directly. Set the Authorization header to
Bearer <your key> once at the collection level.