Use the OpenAPI file to generate a client

Generate a TypeScript or Python client from the Whatsable API v1 OpenAPI file.

API v1 publishes one OpenAPI document. No API key is required to download it.

https://api.whatsable.app/v1/openapi.json

The document is the contract. Generate a client from it rather than retyping paths. A 201 from POST /v1/messages still means the message was recorded: read status before you treat it as sent. See Send your first message.

TypeScript

This writes types from the document. It does not send a message.

npx --yes openapi-typescript https://api.whatsable.app/v1/openapi.json -o whatsable-v1.d.ts

The generated file exports paths. paths['/v1/messages']['post'] is the send operation.

Python

This writes a Python client package from the same document. It does not send a message.

pip install openapi-python-client
openapi-python-client generate --url https://api.whatsable.app/v1/openapi.json --output-path ./whatsable-v1

That generator warns about duplicate model names in this document and skips those schemas. sendMessage is generated. Treat the package as a start, and use the TypeScript types above when you need every schema.

API v1 overview

Authentication, pagination and errors.

Send your first message

One template, then read status on the 201 response.

On this page