Skip to content

Fix OpenAPI link, document cursor semantics, 402/403 errors and token type - #2

Merged
stromcom merged 1 commit into
feature/reactions-and-write-endpointsfrom
docs/openapi-link-and-pagination
Oct 16, 2026
Merged

stromcom merged 1 commit into
feature/reactions-and-write-endpointsfrom
docs/openapi-link-and-pagination

Conversation

@stromcom

Copy link
Copy Markdown
Owner

Stacked on #1. Merge that first; this PR then retargets to main.

Summary

  • README: the OpenAPI spec is at /docs/customer/openapi.json, not swagger.json.
  • README: the token must be an API key of type customer (or both) from /customer/project/{id}/credentials/, used server-side only.
  • README: new section on the message cursor. lastMessageHash is inclusive and oldest-first, and there is no page size: the server returns everything from the cursor onward (id >= cursor, no LIMIT).
  • examples/paginate_messages.php rewritten as incremental sync. The old version assumed 50-item pages.
  • README Exceptions: 402 plan limits and 403 ACTION_FORBIDDEN arrive as a plain ApiException. Added a table of codes and a catch example. Removed the "limit reached" wording from ConflictException.
  • README: known limitation — the SDK drops the response meta (warnings, meta.updated).
  • CHANGELOG: Unreleased entry.

Tests

  • phpunit (89 tests) and phpstan pass. The example also passes php -l and phpstan at level 9.

… type

The OpenAPI spec lives at /docs/customer/openapi.json. The lastMessageHash cursor is inclusive and the API has no page size, so paginate_messages.php is rewritten as an incremental sync. README now documents that 402 plan limits and 403 ACTION_FORBIDDEN surface as ApiException, which API key type the SDK needs, and that response meta is not exposed.
@stromcom
stromcom merged commit d3fbe38 into feature/reactions-and-write-endpoints Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant