> **Photon Beta documentation**
> Browse all pages: https://photon.codes/docs/beta/llms.txt
> Search Beta docs via MCP: https://photon.codes/docs/beta/mcp (OAuth REST API MCP: https://mcp.photon.codes/mcp)

# API Design Standards

> Design conventions behind Photon's public HTTP APIs, why we publish them openly, and how to report inconsistencies.

**Photon API Design Standards (ADS)** are the public design conventions that govern how Photon structures resources, identifiers, URLs, payloads, and errors across its public HTTP APIs. Every standard published here is approved as a binding convention for new and redesigned Photon endpoints.

## Why We Publish These Standards

1. **Predictability across every API**: Once you integrate with one Photon endpoint, every other endpoint should follow the same conventions—whether you are calling the HTTP API directly, using an SDK, or building with an AI agent.
2. **Transparency and design discipline**: Putting our conventions in writing commits Photon to a consistent design bar as the platform grows, rather than letting endpoints drift ad hoc.
3. **Developer accountability**: Publishing our standards in the open gives developers a clear reference to hold us to whenever an endpoint does not match what we promise.

## Feedback & Reporting Issues

We do not accept external pull requests. Instead, please [open an issue in `photon-hq/api-design-standards`](https://github.com/photon-hq/api-design-standards/issues/new) if:

* You find any Photon API endpoint that does not follow these standards. Include the HTTP method, path, standard number (for example `ADS-0001`), and a sanitized or synthetic request or response example with any credentials, tokens, or sensitive customer data removed.
* You have a suggestion to improve an existing standard or want to propose a new convention we should standardize.

## Standards

| Standard | Summary |
| - | - |
| [ADS-0001: Resource Identifiers and Path Parameter Naming](/docs/beta/api-reference/ads/ads-0001.md) | Consistent primary identifier fields, qualified foreign keys, and URL path parameter naming across Photon public HTTP APIs. |
| [ADS-0002: Top-Level JSON Response Structure](/docs/beta/api-reference/ads/ads-0002.md) | Flat top-level JSON objects for Photon public HTTP API responses, prohibiting bare arrays, single-resource wrapper envelopes, and split resource-and-secret creation wrappers. |
| [ADS-0004: Long-Running Operations](/docs/beta/api-reference/ads/ads-0004.md) | Canonical flat Operation schema, status lifecycle invariants, structured nextAction contract, and HTTP polling and cancellation conventions for asynchronous Photon public HTTP APIs. |
| [ADS-0005: Standard Resource Methods and Lifecycle](/docs/beta/api-reference/ads/ads-0005.md) | Standard HTTP methods, read symmetry for addressable resources, canonical success status codes, representation consistency, URL path naming, and RFC 7396 JSON Merge Patch semantics across Photon public HTTP APIs. |
| [ADS-0006: List Pagination](/docs/beta/api-reference/ads/ads-0006.md) | Forward opaque token pagination using pageSize, pageToken, and nextPageToken, strict bounds validation, end-of-list omission, deterministic ordering, and unified error contracts across Photon public HTTP APIs. |
| [ADS-0007: Resource Representation Consistency](/docs/beta/api-reference/ads/ads-0007.md) | Single canonical resource schemas, per-service Operation resources, cross-method response consistency, strict collection slices, mutation input symmetry, sub-resources, and the x-photon-resource OpenAPI extension across Photon public HTTP APIs. |
