photon CLI call under the hood — reach for it when you want to automate setup, drive changes from CI, or build your own internal tooling.
If you’re sending and receiving messages at runtime, you want the spectrum-ts SDK or webhooks instead. This API is for the management plane around them.
Base URL
Every endpoint lives under a single host. HTTPS only — plaintext requests are rejected.Authentication
The API uses HTTP Basic auth. The username is yourprojectId and the password is your projectSecret. Credentials are scoped to a single project and never expire on their own.
photon projects show or from the dashboard. If a secret leaks, rotate it with photon projects regenerate-secret.
Response format
Every response is JSON wrapped in a{ succeed, data } envelope. On success, data holds the resource:
succeed is false and the body carries an explanation:
data rather than a single object. The HTTP status code is the source of truth for whether a call succeeded — branch on it first, then read data.
Response codes
| Code | Meaning |
|---|---|
200 | Request succeeded. |
401 | Missing or invalid project credentials. |
404 | Resource not found or already deleted. |
409 | Conflict — for example, a resource with the same key already exists. |
422 | Request body failed schema validation. |
5xx | Spectrum-side error. Safe to retry with backoff. |
Where to next
Get project
The simplest endpoint to try first — fetch a project by id.
Get started with the SDK
Send and receive messages from your agent server with
spectrum-ts.