Skip to content

API Versioning

The Glyph API uses versioning to ensure stability while enabling continuous improvement. This guide explains our versioning strategy and commitment to backwards compatibility.

The current Glyph API version is v1. All endpoints are prefixed with /v1/.

Terminal window
https://api.glyph.you/v1/preview
https://api.glyph.you/v1/modify
https://api.glyph.you/v1/generate
https://api.glyph.you/v1/create

Glyph uses URL-based versioning with the version number as the first path segment after the base URL:

https://api.glyph.you/{version}/{endpoint}

This approach provides:

  • Explicit version selection - You always know which version you’re using
  • Easy migration - Switch versions by changing the URL prefix
  • Parallel operation - Multiple versions can run simultaneously during transitions
  • Clear deprecation path - Old versions remain accessible during sunset periods

We chose URL-based versioning over header-based versioning because:

  1. Visibility - The version is visible in logs, documentation, and debugging
  2. Caching - CDNs and proxies can cache different versions independently
  3. Simplicity - No special headers required; works with any HTTP client
  4. Testing - Easy to test different versions in a browser or curl

Check the current API version using the health endpoint:

Terminal window
curl https://api.glyph.you/health

Response:

{
"status": "ok",
"version": "0.28.6",
"timestamp": "2025-01-15T12:00:00.000Z"
}

Every API response includes version information in headers:

HeaderDescription
X-Glyph-VersionCurrent API version (e.g., v1)
X-Request-IdUnique request identifier for debugging

For any given API version, we guarantee:

  • Existing endpoints will not be removed within that version
  • Existing response fields will not be removed or change type
  • Existing request parameters will continue to work as documented
  • Error codes and formats will remain consistent

Within a version, we may:

  • Add new optional fields to responses
  • Add new optional parameters to requests
  • Add new endpoints
  • Add new error codes for new scenarios
  • Improve performance and reliability
// Good: Safely access fields, handle new ones gracefully
const response = await fetch('https://api.glyph.you/v1/preview', {...});
const data = await response.json();
const html = data.html;
const sessionId = data.sessionId;
// New fields won't break this code
# Good: Use .get() for safe access
response = requests.post('https://api.glyph.you/v1/preview', ...)
data = response.json()
html = data.get('html')
session_id = data.get('sessionId')
# New fields won't break this code

When we need to introduce breaking changes, we follow a structured deprecation process:

PhaseDurationActions
AnnouncementDay 0New version released, deprecation notice published
Migration Period6 monthsBoth versions operate, migration guides available
Sunset Warning3 months beforeEmail notifications, dashboard warnings
End of LifeAfter 6 monthsOld version returns 410 Gone
  1. Email notifications to all API key holders
  2. Dashboard banners in your Glyph dashboard
  3. Documentation updates with migration guides
  4. Deprecation headers in API responses

When using a deprecated version or endpoint, responses include:

Sunset: Sat, 01 Jan 2026 00:00:00 GMT
Deprecation: true
Link: <https://docs.glyph.you/api/versioning>; rel="deprecation"
  1. Test in staging first - Use a separate API key for testing
  2. Update incrementally - Migrate one endpoint at a time
  3. Monitor for errors - Watch for unexpected behavior after migration
  4. Keep rollback ready - Maintain ability to switch back temporarily

During migration periods, you can use multiple versions:

// Old integration (still works during migration)
const legacyUrl = 'https://api.glyph.you/v1/preview';
// New integration
const newUrl = 'https://api.glyph.you/v2/preview';
// Gradually migrate traffic
const url = useNewVersion ? newUrl : legacyUrl;

A breaking change requires a new API version. Examples include:

Change TypeExampleBreaking?
Remove endpointDelete /v1/analyzeYes
Remove response fieldRemove html from preview responseYes
Change field typeChange total from number to stringYes
Rename parameterRename template to templateIdYes
Add required parameterNew required format fieldYes
Add optional fieldAdd metadata to responseNo
Add new endpointAdd /v1/batch/statusNo
Improve error messagesBetter validation errorsNo

For self-hosted Glyph deployments:

  • You control your own versioning and upgrade schedule
  • The same API version guarantees apply
  • Check release notes before upgrading
Terminal window
# Check your deployment version
curl https://your-glyph-instance.com/health
  • Migration questions: hello@glyph.you
  • Enterprise support: Contact your account manager
  • Documentation issues: Open a GitHub issue