Authentication
Send an API key as a bearer token on every REST API request. A key belongs to one workspace, acts as the person who created it, and is either read-only or read-write.
GET /api/v1/entries HTTP/1.1Host: api.prophouse.devAuthorization: Bearer ph_live_xxxxxxxxxxxxCreate an API key
Section titled “Create an API key”- Open API keys in the account dashboard at
https://app.prophouse.dev/keys. - Under Create key, enter a Name and pick a Scope.
- Click Create key.
- Copy the key from the Key created panel. The dashboard stores only a hash, so it shows the full key this one time.
Hosted keys start with ph_live_. Treat them like passwords. Keep them out of source control and pass them in through an environment variable or a secret store.
The Keys table lists each key’s name and prefix, scope, creator and last-used time. Revoke stops the key on its next request. Members can revoke only keys they created. Owners and admins can revoke any key. See API keys for the rest of the dashboard page.
Scopes
Section titled “Scopes”| Scope | What it allows |
|---|---|
read |
Every GET, plus POST /entries/search/image, which sends the query image in the body but writes nothing. Over MCP, read tools such as search work and write tools are refused. |
write |
Everything read allows, plus every other POST, PUT, PATCH and DELETE. This covers pushing, editing, commenting, reviews, pull jobs and check-out locks. |
The dashboard describes the options as “write: upload, edit, review and import” and “read: search and download only”. Agents that import into Unreal or post comments need write. Every plan can create write keys.
A read-scoped key that sends a write gets 403 with the code READ_ONLY_KEY and the message This key is read-only. Writes need a write-scoped key. Sign in from the editor (it requests write) or create one at app.prophouse.dev/keys. A write that the library itself refuses for the same reason returns 403 FORBIDDEN with This credential is read-only. Writes need a write-scoped key.
Identity and role
Section titled “Identity and role”A key acts as the person who created it. Prophouse attributes that key’s comments, check-outs, pushes and review decisions to that person. The key also carries the person’s current workspace role:
| Workspace role | In the API |
|---|---|
| Owner or admin | Admin. Can call the endpoints this reference marks Admin, such as webhooks, the denylist, entry deletion and deprecation. |
| Member | Regular member. Admin-only endpoints return 403 FORBIDDEN. |
Role changes take effect on the key’s next request. If the creator leaves the workspace, every key they created returns 401.
Call GET /auth/me to see who a key acts as:
{ "user": { "id": "<account_id>", "name": "Ada Artist", "email": "ada@example.com", "display_name": "Ada Artist", "role": "admin" }, "name": "Ada Artist", "org_id": "<workspace_id>", "org": { "id": "<workspace_id>", "name": "Northwind Games", "slug": "northwind" }, "scope": "write"}role is admin for workspace owners and admins and member for everyone else. user.id is your account id. Library payloads such as comment authors, lock holders and reviewers use library-local numeric user ids instead. Call GET /members/me to get yours.
Keys also work against your workspace’s library address, https://<slug>.prophouse.dev. A key sent to another workspace’s address gets 403 with This API key belongs to a different workspace.
Device sign-in for apps
Section titled “Device sign-in for apps”If you build an app or command-line tool that people sign in to, use device authorization (shaped like RFC 8628) instead of asking them to paste a key. The app receives its own key. The desktop app and the Unreal plugin sign in this way.
-
Request a code. This call needs no authentication.
Terminal window curl -X POST https://api.prophouse.dev/api/v1/auth/device/code \-H "Content-Type: application/json" \-d '{"client_name": "Asset sync script", "scopes": "write"}'The response is
201:{"device_code": "phd_...","user_code": "WXYZ-BCDF","verification_uri": "/device","verification_uri_complete": "/device?code=WXYZ-BCDF","expires_in": 900,"interval": 2}Prophouse keeps the first 80 characters of
client_name. The person sees it when approving, and it becomes part of the key’s name.scopesisread(the default) orwrite. -
Show the person the
user_codeand open the approval page in their browser. Both URIs are relative to the server you called, so prefix them withhttps://api.prophouse.dev, for examplehttps://api.prophouse.dev/device?code=WXYZ-BCDF. That address redirects to the dashboard’s Device sign-in page. -
The person signs in to the dashboard, checks the code and clicks Approve sign-in or Deny. The key goes to the workspace the person has open in the dashboard.
-
Poll for the key every
intervalseconds until the code expires after 15 minutes.Terminal window curl -X POST https://api.prophouse.dev/api/v1/auth/device/token \-H "Content-Type: application/json" \-d '{"device_code": "phd_..."}'After approval, the response carries the key once:
{"token": "ph_live_xxxxxxxxxxxx","token_id": "<key_id>","scope": "write","gateway_url": "https://api.prophouse.dev"}
The key is named <client_name> (device sign-in). The dashboard lists it under Signed-in apps instead of Keys, and Sign out revokes it.
Poll responses use the standard error envelope. Switch on error.code:
| Status | error.code |
Meaning and what to do |
|---|---|---|
| 400 | DEVICE_PENDING |
Not approved yet. Keep polling every details.interval seconds. |
| 429 | DEVICE_SLOW_DOWN |
You polled too fast. Wait details.interval seconds before the next poll. |
| 400 | DEVICE_EXPIRED |
The code expired (This sign-in expired. Start a new one.). Start again from step 1. |
| 400 | DEVICE_DENIED |
The person denied the request (Sign-in was denied in the browser.). Stop polling. |
| 401 | UNAUTHORIZED |
Unknown device code, or the key was already collected. |
| 400 | INVALID_REQUEST |
The body has no device_code. |
POST /auth/device/code uses the same error envelope. It is rate limited per address: too many requests within 10 minutes return 429 with error.code RATE_LIMITED and the message Too many sign-in attempts from this address. Try again in a few minutes. Wait a few minutes and try again. A body that is not JSON returns 400 with error.code INVALID_REQUEST and the message Body must be JSON.
Sign an app out
Section titled “Sign an app out”An app that signed in through the browser can revoke its own key when the person signs out:
curl -X POST https://api.prophouse.dev/api/v1/auth/logout -H "Authorization: Bearer ph_live_xxxxxxxxxxxx"| Status | Body | What to do |
|---|---|---|
204 |
None | The key is revoked. Delete it from the app. |
401 |
error.code UNAUTHORIZED, with details.reason invalid_key (message This API key is unknown or has been revoked.) or missing_credential |
The key is already revoked or unknown. Treat the app as signed out and delete the key. |
403 |
error.code FORBIDDEN, details.reason not_an_app_key, message Only app sign-in keys can sign themselves out. Revoke API keys at app.prophouse.dev/keys. |
The key was created on the dashboard, not by device sign-in. It stays valid. Delete it from the app if you like, and revoke it on the dashboard’s API keys page. |
Only keys from device sign-in (named <client_name> (device sign-in)) can sign themselves out. The revocation shows in the dashboard’s Activity list like any other revoked key.
Authentication errors
Section titled “Authentication errors”| Status | When |
|---|---|
401 |
No Authorization header, an unknown or revoked key, or the key’s creator is no longer a workspace member. A token that is not a hosted key gets This token is not a hosted Prophouse key. Hosted keys start with ph_live_. Create one at app.prophouse.dev/keys. |
403 |
A read-scoped key sent a write (READ_ONLY_KEY), a member called an admin-only endpoint, or the key belongs to a different workspace than the library address you called. |
Authentication failures from api.prophouse.dev use the standard error envelope, for example error.code UNAUTHORIZED with the message This API key is unknown or has been revoked. See Errors and rate limits for every code.
