Skip to content

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 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

StandardSummary
ADS-0001: Resource Identifiers and Path Parameter NamingConsistent primary identifier fields, qualified foreign keys, and URL path parameter naming across Photon public HTTP APIs.
ADS-0002: Top-Level JSON Response StructureFlat 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 OperationsCanonical 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 LifecycleStandard 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 PaginationForward 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 ConsistencySingle 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.