REST API: the conventions that make one predictable
REST is a set of constraints, not a specification, which is why every API claiming to be RESTful is different. The conventions worth following are the ones that let a developer guess correctly.
Nobody reads API documentation from the top. They search for the endpoint, copy the example, and leave — which tells you exactly what to spend your effort on.
API documentation is the interface to your interface. However good the API, a developer's experience of it is the docs — and the way docs are used is consistent and worth designing around: search for the thing, copy a working example, adapt it, leave. Almost nobody reads the introduction.
That behaviour explains why beautifully organised documentation with no copyable examples fails, and why a plain page with a correct curl command for every endpoint succeeds. Optimise for the person who arrives at one page from a search engine with a specific problem.
Test the examples automatically. Documentation drifts silently and the first person to notice is a customer with a broken integration and a poor opinion of your engineering. Running the documented examples against the real API in continuous integration is a half day of work and converts your docs from a description into a check.
Long conceptual introductions nobody reaches, marketing language in a reference, and internal terminology that means nothing to somebody outside the company. Also worth avoiding: documenting endpoints you intend to change next month — mark them experimental explicitly rather than letting somebody build on them, because they will.
Ettex API publishes its own reference, and the conventions behind it are described in rest api, with events in webhook. For anything you build against it, the practices in api integration apply.
Being clear: we do not host or generate documentation for your APIs — this is not a docs platform. What is described here is how to write documentation people can use, whichever tool you write it in.
A runnable example and full response per endpoint, every parameter with type and constraints, the errors that endpoint returns, authentication shown inline, and rate limits.
Generate the reference from a machine-readable specification, and write the guides by hand. Generation prevents the drift where documentation describes an older version of the API.
The copy button on a complete example. Developers arrive at one page from search, copy the example and adapt it — design for that rather than for a reader starting at the top.
Run them against the real API in continuous integration. Otherwise the first person to notice the drift is a customer whose integration just broke.
REST is a set of constraints, not a specification, which is why every API claiming to be RESTful is different. The conventions worth following are the ones that let a developer guess correctly.
A rate limit exists to keep one caller from degrading the service for everyone. The design question is not the number — it is what happens at the boundary, and whether a client can tell.
A webhook is a callback: instead of polling an API every minute for changes, you give it a URL and it calls you. Simple to describe, and the failure modes are where all the interesting work is.