Skip to content

docs(getting-started): fix distribute route, pagination and retry advice - #3137

Merged
ephraimduncan merged 11 commits into
docs/fields-envelope-schemafrom
docs/first-api-call-fixes
Sep 15, 2026
Merged

ephraimduncan merged 11 commits into
docs/fields-envelope-schemafrom
docs/first-api-call-fixes

Conversation

@ephraimduncan

@ephraimduncan ephraimduncan commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

The getting-started tutorial's distribute step 404s: it calls POST /envelope/{id}/distribute, which does not exist.

Changes Made

  • Fixed all four distribute calls to the real route: POST /envelope/distribute with envelopeId in the body.
  • Fixed the list-response example from the fabricated nested pagination object to the real flat shape { data, count, currentPage, perPage, totalPages }.
  • Replaced the fixed 60-second retry advice and hardcoded 60000ms sleep with Retry-After header handling; mentioned X-RateLimit-Remaining/X-RateLimit-Reset.

Testing Performed

Docs-only change. Verified against distribute-envelope.types.ts, find-envelopes.types.ts, create-envelope.types.ts, and the rate-limit middleware.

- replace fabricated retry schedule with provider behavior (local 4, BullMQ 3, Inngest 5 attempts)
- fix webhook timeout from 30s to 10s and define failure semantics (3xx not followed, code 0)
- clarify failed deliveries never auto-disable a webhook; document SSRF rules and http:// support
- add envelopeId to all payload examples; frame numeric id as legacy v1 identifier
- remove phantom documentMeta field; fix hardcoded timezone/dateFormat values
- add missing status/source enum values and document the RECIPIENT_EXPIRED event
@vercel

vercel Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stg-docs Ready Ready Preview Aug 25, 2026 3:23am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
prd-docs Ignored Ignored Aug 25, 2026 3:23am
prd-openpage-api Ignored Ignored Aug 25, 2026 3:23am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7507e54c-6296-42eb-90d9-9810c45413ff

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the type: documentation Improvements or additions to documentation label Jul 30, 2026
@ephraimduncan
ephraimduncan marked this pull request as ready for review July 30, 2026 21:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0d9a72448

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- qualify the SSRF guard as best-effort (no DNS-rebinding coverage, fails open on lookup errors)
- use envelope IDs from the actual generator alphabet (no digits possible)
- fix template-events intro: templateId is null except on TEMPLATE_USED
- document X-RateLimit-Limit/-Remaining/-Reset on every v1/v2/v2-beta response
- document Retry-After on 429s and epoch-aligned 1-minute windows (real wait is 1-60s)
- show both 429 body shapes: global error key vs AppError code/message/statusCode
- cover the three 429 sources including the headerless monthly quota; add v2-beta to scope
- document the real 429 bodies: v1 returns { message }, v2 returns the structured error object
- exclude CORS preflight responses from the header guarantee
- describe monthly quotas as organisation-wide api/document/email counters, not envelope-only
- retry example: honor Retry-After exactly; cap only the exponential fallback delay
…pdate routes

- these routes rendered without descriptions in the generated API reference
- add route-level descriptions and field-level .describe() calls matching sibling schemas
- add Cancel Document section: PENDING-only, not idempotent, access rules, webhook and emails
- replace fabricated envelopeIds get-many body with the real nested ids selector (max 20)
- document the data wrapper and silent filtering of inaccessible IDs
- add CANCELLED to status table, state diagram, transitions and filters
- replace nonexistent API source value with the real enum; fix pagination shape and fences
- warn in migration guide that get-many body shape changed from documentIds
- request is { envelopeId, data } not { documentId, fields }
- coordinates are page/positionX/positionY not pageNumber/pageX/pageY
- responses use the data wrapper; field type samples verified against the Zod schemas
- ZUpdateEnvelopeFieldsRequestSchema accepts page/positionX/positionY but the service consumes
  pageNumber/pageX/pageY, so position updates via POST /envelope/field/update-many were
  silently dropped; map the names in the route before calling updateEnvelopeFields
- docs: show Decimal coordinates as serialized strings in field responses
- docs: include the defaulted fieldMeta values returned when the request omits fieldMeta
- docs: use real envelope/envelope-item ID formats in samples
- POST /envelope/{id}/distribute does not exist; use POST /envelope/distribute with body
- list responses are flat (data, count, currentPage, perPage, totalPages), not nested pagination
- replace fixed 60s sleep advice with Retry-After header handling
@ephraimduncan
ephraimduncan force-pushed the docs/fields-envelope-schema branch from a43d09b to 8143d04 Compare August 19, 2026 09:36
@dguyen

dguyen commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

@ephraimduncan please fix merge conflict

@ephraimduncan
ephraimduncan merged commit 26a680f into docs/fields-envelope-schema Sep 15, 2026
8 checks passed
@ephraimduncan
ephraimduncan deleted the docs/first-api-call-fixes branch September 15, 2026 23:19

This branch was successfully deployed

1 active deployment
Preview – stg-docs — 822c8298 Deployed Aug 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants