Conventions
These rules apply across the whole API. Endpoint pages call out only the exceptions.
Versioning
Section titled “Versioning”All routes live under /api/v1. Every response from your library carries the header X-PH-API: 1. Errors from the API front door (see Errors and rate limits) do not carry it.
You can declare the major version your client speaks by sending X-PH-API: 1. The header is optional, because the /api/v1 path already declares major 1. Your library refuses a request without processing it if the header or the path declares a different major, or if the header is malformed (empty, not a number, or sent twice). The refusal is a 426 response:
{ "error": { "code": "UPGRADE_REQUIRED", "message": "This library speaks API major 1. Update the client and try again. The request was not processed.", "details": { "server_major": 1, "declared": "2", "source": "header" } }}details.source is header or path. A header value like 1.4 counts as major 1.
Within a major version, responses can gain new fields, and open enums can gain new values (entry types, activity event types, notification reasons, change-feed entities). Ignore fields and values you do not recognize.
To identify your integration, send X-PH-Client: <name>/<version>, for example asset-sync/1.2.0. The header is optional. Use a name of your own. Names that start with ph-agent/ belong to the Prophouse desktop app, and the API front door applies a different rate-limit window to them.
Requests and responses
Section titled “Requests and responses”| Rule | Detail |
|---|---|
| JSON bodies | Send Content-Type: application/json. Request bodies ignore unknown fields unless an endpoint says otherwise. |
| Partial updates | A PATCH body changes only the fields you send. Send null to clear a nullable field. Omit a field to leave it alone. An empty body returns 422. |
| Binary uploads | Thumbnails, previews, attachments, search-by-image queries and blob uploads take the raw bytes as the request body. Multipart is not accepted. |
| Empty success | Most deletes and idempotent membership changes (tags on entries, entries in collections, reactions) return 204 No Content. DELETE /packs/{pack_id} and DELETE /entries/{entry_id}/watch return JSON instead. |
| Hashes | Lowercase hex SHA-256 of the exact file bytes, 64 characters. |
| Timestamps | UTC ISO 8601 with Z, for example 2026-07-25T12:00:00Z. |
| User stubs | People appear as {"id", "name", "display_name"}. id is the user’s id in your library. |
| Validation | A body or query parameter that fails schema validation returns 422 VALIDATION, with each failure listed in details.errors. |
Pagination
Section titled “Pagination”List endpoints take limit and return a cursor for the next page in next_cursor. There are three cursor styles. Each endpoint page says which one it uses.
| Style | Used by | How it works |
|---|---|---|
| Opaque cursor | GET /entries, /packs, /tags, /collections, /pull-jobs |
Pass next_cursor back as cursor. null means you have the last page. Do not parse or build the string. |
| Id cursor (newest first) | GET /activity, /notifications, /review-requests |
next_cursor is an integer id. Pass it back as cursor to get older items. null means there is nothing older. A full page always returns a cursor, so the last page you fetch can come back empty. |
| Sequence cursor | GET /catalog/changes |
cursor is the seq of the last change you applied. next_cursor is never null. Page until changes comes back empty. See Activity and changes. |
limit defaults to 50 and accepts 1 to 200, with these exceptions:
| Endpoint | Default | Maximum |
|---|---|---|
GET /catalog/changes |
200 | 1000 |
GET /members |
200 | 200 |
GET /admin/duplicates |
100 | 500 |
GET /push/preview-queue, GET /push/thumbnail-refresh-queue |
500 | 2000 |
GET /locks, GET /members, GET /admin/duplicates and POST /entries/search/image take limit but return no cursor.
An entries cursor is tied to the sort and order it was created with. Reusing it with a different sort or order returns 422 VALIDATION with the message Pagination cursor does not match the requested sort.
# First pagecurl -H "Authorization: Bearer $PH_KEY" \ "https://api.prophouse.dev/api/v1/entries?sort=date_updated&order=desc&limit=100"
# Next page: the same query plus the cursorcurl -H "Authorization: Bearer $PH_KEY" \ "https://api.prophouse.dev/api/v1/entries?sort=date_updated&order=desc&limit=100&cursor=<next_cursor>"Downloads and presigned URLs
Section titled “Downloads and presigned URLs”The API does not stream file bytes (blobs, thumbnails, previews, preview artifacts, comment attachments). The endpoint answers 302 Found with a Location header that points at a short-lived presigned URL. Your client fetches the bytes from that URL.
Redirect responses carry Cache-Control: private, no-store. Do not cache the redirect or the URL. Request a fresh one each time.
Some JSON responses contain API paths, for example blob_url in a check-out, which looks like /api/v1/blobs/<hash>. Request those paths from https://api.prophouse.dev with your key as usual.
See Downloads for the download endpoints.
Uploads
Section titled “Uploads”Push uploads usually go straight to storage too. POST /push/negotiate can return a presigned PUT target for each missing blob, with headers you must send exactly as given. The full flow is on Push (uploads).
Write availability
Section titled “Write availability”Reads work in every account state except suspension and pending deletion. A suspended hosted workspace gets 402 for every request, as Billing describes. A workspace scheduled for deletion gets 410 WORKSPACE_DELETED for every request. Your library refuses writes in three cases:
| Status | details.reason |
When |
|---|---|---|
403 FORBIDDEN |
read_only |
The library refuses writes while billing has suspended the workspace. On hosted workspaces the front door answers first. It returns 402 for every request, reads included, so you see that instead. |
403 FORBIDDEN |
ingest_blocked |
Storage is at its limit. Only new uploads are refused. Other writes still work. |
503 UNAVAILABLE |
policy_unavailable |
Your library is starting and has not yet confirmed its plan. Retry after the Retry-After value (5 seconds). |
See Errors and rate limits for every error code.
