REST API reference and OpenAPI document
The API reference is generated from the contracts the server validates every request against, so it lists exactly what the API accepts and returns, and it changes the moment the API does. It is served by the API itself:
API reference The routes, their scopes, fields and errors.
OpenAPI document OpenAPI 3.1 JSON, for client generators, Postman and tests.
Using the OpenAPI document
Section titled “Using the OpenAPI document”- Generate a client. Any OpenAPI 3.1 generator works from the JSON, for instance
npx openapi-typescriptfor TypeScript types. - Import it into an API client such as Postman or Insomnia, then set the bearer token.
- Validate your fixtures against it in your tests, so a change on our side shows up in yours.
Realtime
Section titled “Realtime”Besides REST, agents’ apps hold a WebSocket at wss://api.click2reply.com/v1/rtm/agent
for live chat events. The reference describes its messages next to the REST routes.
Conventions
Section titled “Conventions”Tokens, scopes, errors and paging work the same on every route; they are on authentication and conventions.