Document Stack
Document Stack
Docs

API Versioning

How the Document Stack API is versioned and how to handle upgrades.

Versioning Scheme

The Document Stack API uses URL-based versioning. The current version is v1, included in every endpoint path:

text
https://api.documentstack.dev/api/v1/generate

When breaking changes are introduced, a new version (e.g., v2) will be released. The previous version will continue to work during the deprecation period.

Stability Guarantees

Within a version, we guarantee:

  • Existing fields will not be removed or renamed
  • Request parameters will stay backward-compatible
  • Error codes and formats will remain consistent
  • New optional fields may be added to responses (non-breaking)
Adding new fields to a JSON response is considered non-breaking. Make sure your code ignores unknown fields rather than failing on them.

What Counts as a Breaking Change

Change TypeBreaking?
Adding a new optional response fieldNo
Adding a new optional request parameterNo
Adding a new endpointNo
Removing or renaming a response fieldYes
Changing a field's data typeYes
Making an optional parameter requiredYes
Changing error response formatYes

Deprecation Policy

When a new API version is released:

  1. Announcement — We notify all users via email and the changelog at least 6 months in advance
  2. Overlap period — Both old and new versions run simultaneously for at least 12 months
  3. Sunset — The old version is retired. Requests to the deprecated version return a 410 Gone response with migration instructions

Migration Tips

  • Always pin your SDK to a specific major version to prevent surprise breaking changes
  • Use environment variables for the base URL so you can switch API versions without code changes
  • Test against the new version in a staging environment before upgrading production
  • Monitor the changelog for deprecation notices
Pinning SDK Version
// package.json — pin to major version
{
  "dependencies": {
    "@document-stack/sdk-node": "^1.0.0"
  }
}
Subscribe to the Document Stack changelog to get notified about new features, deprecations, and version releases.

Next Steps