API reference
Open, extend, end and reopen previews; invite and revoke viewers; share a hostname in one call; turn names on under an agent’s wildcard; leave a note and sign-in details for viewers; tell an app who is viewing; open SSH-only previews with TCP services and Houseguest certificate sign-in; give a share group a viewer list that reaches every preview in it; read agents and activity; read and change what an agent may reach; update agents to a new release and set when they update on their own. Version 1.20.1 of the contract.
- Base URL:
https://console.houseguest.dev/api/v1. Hosted. A self-hosted edge serves the same paths on its console host. - Authentication:
Authorization: Bearer hgk_…, a workspace API token (A workspace API token from the console (Settings, API tokens)). - Format: JSON requests and responses, times in RFC 3339 UTC, opaque string ids, cursor pagination, one error envelope.
- The OpenAPI document:
GET /api/v1/openapi.jsonon the console host, no token needed. Generate a client from it or check requests against it.
How tokens, versioning, limits, idempotency and errors work is in the API guide.
This contract
Section titled “This contract”GET /openapi.json · No token · getOpenAPI
The OpenAPI document of v1, the one this server was built with. No token needed.
| Status | Meaning | Body |
|---|---|---|
| 200 | The OpenAPI 3.1 document. | object |
The calling token
Section titled “The calling token”GET /token · Any token · getToken
The token making the request, its scopes and workspace. Needs no scope; a quick way to check a token works.
| Status | Meaning | Body |
|---|---|---|
| 200 | The token. | Token |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "token", "id": "tk_7", "name": "Staging checkout CI", "last4": "9QxZ", "scopes": [ "previews.view", "previews.create", "previews.extend", "previews.end", "viewers.invite" ], "created_at": "2026-11-01T08:00:00Z", "expires_at": "2027-01-30T08:00:00Z", "workspace": { "slug": "acme", "name": "Acme" }}Previews
Section titled “Previews”List previews
Section titled “List previews”GET /previews · Scope previews.view · listPreviews
Previews the token can see, newest first.
| Parameter | In | Type | Description |
|---|---|---|---|
status |
query | string: active, open, scheduled, ended, expired |
Only previews in this state. active: open or scheduled. |
name |
query | string | Only previews with this name (an open one and earlier closed ones). |
limit |
query | integer | Items per page. Default 50. At least 1. At most 100. |
cursor |
query | string | next_cursor of the previous page. Opaque. |
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of previews. | PreviewList |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "list", "data": [ { "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null } ], "next_cursor": "cHY6MTI4"}Open a preview
Section titled “Open a preview”POST /previews · Scope previews.create · createPreview
Opens a preview of hostnames the workspace’s agents serve and invites its viewers. The token’s creator becomes its owner. Opening one for more than 7 days also needs previews.extend_long (Longer than 7 days). Send an Idempotency-Key so a re-run job does not open two. Since 1.10.0, kind ssh opens an SSH-only preview: no hostnames, a Houseguest address as its landing page (the edge sends a signed-in viewer to the terminals page) and at least one SSH service in tcp_services; any preview may take tcp_services. Viewers, standing access, email codes and the lifetime work as for any preview.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: CreatePreviewRequest
{ "name": "checkout-pr-42", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "lifetime_seconds": 259200, "viewers": [ ], "note": "The new staging checkout for pull request 42."}| Status | Meaning | Body |
|---|---|---|
| 201 | Opened (or scheduled). | PreviewCreated |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (201):
{ "object": "preview_created", "preview": { "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null }, "invites": [ { "delivery": "emailed", "invite_url": null } ], "tcp_services": []}Get a preview
Section titled “Get a preview”GET /previews/{preview_id} · Scope previews.view · getPreview
One preview.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The preview. | Preview |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null}Extend a preview
Section titled “Extend a preview”POST /previews/{preview_id}/extend · Scope previews.extend · extendPreview
Moves the end out, within the workspace’s longest preview. More than 7 days from now needs previews.extend_long (Longer than 7 days). Sign-ins that ran to the old end follow it.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: ExtendPreviewRequest
{ "extend_by_seconds": 86400}| Status | Meaning | Body |
|---|---|---|
| 200 | The preview with its new end. | Preview |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null}End a preview
Section titled “End a preview”POST /previews/{preview_id}/end · Scope previews.end · endPreview
Ends it for every viewer at once. Ending an ended preview answers it as it is, so a repeated call is safe. No body. Open browser terminals and TCP connections of the preview close within 15 seconds; new ones are refused at once.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The ended preview. | Preview |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null}Reopen a preview
Section titled “Reopen a preview”POST /previews/{preview_id}/reopen · Scope previews.extend · reopenPreview
Opens an ended or expired preview again: the same preview, with the same id, link, hostnames, people, history and insights. Its new end is lifetime_seconds from now (default: the workspace’s default length). Sign-ins and command-line tokens that ran to the old end follow the new one, and invites still unused when it stopped work again; revoked people stay revoked. Nothing is emailed unless notify is true: then each viewer who is not revoked gets a new single-use invite (standing access: each exact address on the list gets the link). Needs previews.extend and previews.end on the preview (Manage own previews holds both for the member’s own previews, Manage any preview for every preview); more than 7 days needs previews.extend_long. The same rules as opening a preview apply, and a refusal changes nothing: an open preview answers 409 preview_live; the workspace’s open-previews limit (409 limit_reached); another open preview with the same name (409 name_in_use) or one of its hostnames (409 hostname_in_use); every hostname still forwarded by an agent of the workspace (422 hostname_not_covered) under a verified domain (422 domain_not_verified); a suspended workspace (403 workspace_suspended). A hostname under an agent’s *.domain entry that is off now is turned on again, which needs agents.names. Terminal shares are not reopened (422 validation_failed). Since 1.6.0.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: ReopenPreviewRequest
{ "lifetime_seconds": 259200, "notify": false}| Status | Meaning | Body |
|---|---|---|
| 200 | The reopened preview with its new end. | Preview |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null}Set a preview’s end date
Section titled “Set a preview’s end date”POST /previews/{preview_id}/end-date · Scope previews.view · setPreviewEndDate
Moves the end to expires_at, earlier or later than the current end. Later follows extendPreview’s rules and needs previews.extend (and previews.extend_long past 7 days from now). Earlier needs previews.end and must be at least 5 minutes from now; every sign-in, CLI token and unused invite is capped at the new end, and at the new end the preview expires as any other does. tell_owner emails the preview’s owner and adds a console notification, unless the caller is the owner. The activity log records the old and new end and whether the owner was told.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: SetEndDateRequest
{ "expires_at": "2026-10-31T17:00:00Z", "tell_owner": true}| Status | Meaning | Body |
|---|---|---|
| 200 | The preview with its new end. | Preview |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null}Add a hostname
Section titled “Add a hostname”POST /previews/{preview_id}/hostnames · Scope previews.manage_own · addPreviewHostname
Adds a hostname to an open preview, as Add hostname on its page. It must be under the preview’s cookie domain and in no other open preview. A name under one of an agent’s *.domain entries that is not on yet is turned on too, which also needs agents.names. Adding a hostname the preview has answers it as it is. The scope previews.manage_own reaches only previews the token’s member opened, even when the member may manage any; previews.manage (Manage any preview) reaches every preview the member may manage. A name this call turns on gets its DNS record from the workspace’s DNS automation when that covers its domain, by the domain’s default (no per-call choice); dns_record says where that stands.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: HostnameRequest
{ "hostname": "staging.apps.example.com"}| Status | Meaning | Body |
|---|---|---|
| 200 | The preview with the hostname. | Preview |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null}Remove a hostname
Section titled “Remove a hostname”DELETE /previews/{preview_id}/hostnames/{hostname} · Scope previews.manage_own · removePreviewHostname
Takes a hostname out of an open preview; viewers lose it at once, on every edge. The landing hostname (the first) stays while the preview is open. The name stays turned on for its agent. The scope previews.manage_own reaches only previews the token’s member opened, even when the member may manage any; previews.manage (Manage any preview) reaches every preview the member may manage.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
hostname |
path | string | A hostname, lowercase. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The preview without the hostname. | Preview |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null}Set a preview’s note for viewers
Section titled “Set a preview’s note for viewers”POST /previews/{preview_id}/viewer-note · Scope previews.manage_own · setPreviewViewerNote
Changes the note viewers see after they sign in through Houseguest, and its sign-in details. Applies to the next sign-in and to the note page (https://
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: SetViewerNoteRequest
{ "viewer_note": "Orders go to a sandbox. Use the test card 4242 4242 4242 4242.", "sign_in_details": [ { "label": "Admin", "password": "correct-horse-battery" } ]}| Status | Meaning | Body |
|---|---|---|
| 200 | The preview with its note. | Preview |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "checkout-pr-42", "status": "open", "access": "invite", "hostnames": [ "checkout.staging.example.com", "api.staging.example.com" ], "url": "https://checkout.staging.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null}Shares
Section titled “Shares”Share hostnames
Section titled “Share hostnames”POST /shares · Scope previews.create · createShare
One call for a “Share with Houseguest” button. Each hostname must be forwarded by an agent of the workspace, or allowed one label under an agent’s *.domain entry and under a verified domain of the workspace (hostname_not_covered, domain_not_verified); such a name is turned on, which needs agents.names. If an open preview already holds a hostname it is reused (200): hostnames it lacks are added (previews.manage_own on it) and new viewers are invited (viewers.invite) or listed (standing.manage); nothing else changes. Otherwise a new invite preview opens (201). Repeating the call with the same body changes nothing, so a second click on a button is safe. The answer says whether each name’s DNS and certificate are ready yet. Adding hostnames to a reused preview follows the hostname operations: previews.manage_own for previews the token’s member opened, previews.manage for others. A name this call turns on gets its DNS record from the workspace’s DNS automation when that covers its domain, by the domain’s default (no per-call choice); dns_record says where that stands.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: CreateShareRequest
{ "hostname": "staging.apps.example.com", "viewers": [ ], "lifetime_seconds": 259200, "note": "The new checkout, for Thursday."}| Status | Meaning | Body |
|---|---|---|
| 200 | An open preview held a hostname; it was reused. | Share |
| 201 | A new preview opened. | Share |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "share", "result": "created", "share_url": "https://staging.apps.example.com/", "ready": false, "preview": { "object": "preview", "id": "k3x7q2m5w4p5r6t2", "name": "staging", "status": "open", "access": "invite", "hostnames": [ "staging.apps.example.com" ], "url": "https://staging.apps.example.com/", "email_code": false, "viewer_session_hours": null, "created_at": "2026-11-02T09:00:00Z", "starts_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-05T09:00:00Z", "ended_at": null, "console_url": "https://console.houseguest.dev/previews/k3x7q2m5w4p5r6t2", "viewer_note": "", "sign_in_details_count": 0, "sign_in_details": [], "kind": "web", "terminals_url": null }, "hostnames": [ { "hostname": "staging.apps.example.com", "agent_id": "ag_3", "turned_on": true, "dns": "edge", "dns_ready": true, "dns_record": "managed", "certificate": "pending", "certificate_ready": false } ], "invites": [ { "delivery": "emailed", "invite_url": null } ]}TCP & SSH
Section titled “TCP & SSH”Get the SSH certificate authority
Section titled “Get the SSH certificate authority”GET /ssh-ca · Scope tcp.add · getSSHCA
The workspace’s SSH certificate authority, made on first use (as the console makes it when a service first takes certificates). Put public_key on each SSH server and add trusted_user_ca_keys_line to its sshd_config; then services with sign_in certificate or either accept viewers without a password or key of their own. Needs tcp.add (Add TCP services) on some preview. Since 1.10.0.
| Status | Meaning | Body |
|---|---|---|
| 200 | The CA. | SSHCA |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 409 | The resource’s state refuses it. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "ssh_ca", "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGnF1y6kq2l7rL0b3dWm8Zs5yXo1v8QeQyJ4t2hN9pKa houseguest-ca:acme", "fingerprint": "SHA256:3q2+7w8kz0Yb6v1mXo9nQ4pL5rT7uV8wX9yZ0aB1cD2", "created_at": "2026-11-19T09:00:00Z", "trusted_user_ca_keys_line": "TrustedUserCAKeys /etc/ssh/houseguest_ca.pub"}List TCP services
Section titled “List TCP services”GET /previews/{preview_id}/tcp-services · Scope previews.view · listTCPServices
The preview’s TCP services, in target order, with each SSH service’s sign-in method. All on one page. Since 1.10.0.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The services. | TCPServiceList |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "list", "data": [ { "object": "tcp_service", "target": "build-01:22", "name": "build-01", "port": 22, "ssh": true, "sign_in": "certificate", "usernames": [ "ops" ], "terminal_url": "https://ssh-lab.acme.houseguest.page/__hg/ssh?target=build-01%3A22", "added_at": "2026-11-19T09:00:00Z", "agent_usernames": [ "ops" ], "in_use": false, "start_command": null } ], "next_cursor": null}Add a TCP service
Section titled “Add a TCP service”POST /previews/{preview_id}/tcp-services · Scope tcp.add · addTCPService
Adds a name:port an agent of the workspace allows, as the console’s Add does, and for an SSH service sets how viewers sign in (the console’s Browser terminal sign-in). A target the preview already has keeps its place: sign_in and usernames, when sent, replace its setting (200). Needs tcp.add on the preview and TCP services on for the workspace. Since 1.10.0.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: TCPServiceRequest
{ "target": "build-01:22", "sign_in": "certificate", "usernames": [ "ops" ]}| Status | Meaning | Body |
|---|---|---|
| 200 | Already in the preview; its sign-in is as sent. | TCPService |
| 201 | Added. | TCPService |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "tcp_service", "target": "build-01:22", "name": "build-01", "port": 22, "ssh": true, "sign_in": "certificate", "usernames": [ "ops" ], "terminal_url": "https://ssh-lab.acme.houseguest.page/__hg/ssh?target=build-01%3A22", "added_at": "2026-11-19T09:00:00Z", "agent_usernames": [ "ops" ], "in_use": false, "start_command": { "command": "/usr/local/bin/kiosk --booth 3", "mode": "only", "on_exit": "menu" }}Remove a TCP service
Section titled “Remove a TCP service”DELETE /previews/{preview_id}/tcp-services/{target} · Scope tcp.add · removeTCPService
Takes the service out of the preview, as the console’s Remove does: new connections to it are refused at once, and open browser terminals and TCP connections to it close within 15 seconds. The terminals page stops listing it. Since 1.10.0.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
target |
path | string | A TCP service’s name:port. Send the colon as is or percent-encoded (%3A). Required. |
| Status | Meaning | Body |
|---|---|---|
| 204 | Removed. | none |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Viewers
Section titled “Viewers”List viewers
Section titled “List viewers”GET /previews/{preview_id}/viewers · Scope viewers.export · listViewers
The preview’s viewers, oldest first. Needs viewers.export (Export viewer list) on the preview, with previews.view, since 1.4.0: the list is the console’s viewer export.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
limit |
query | integer | Items per page. Default 50. At least 1. At most 100. |
cursor |
query | string | next_cursor of the previous page. Opaque. |
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of viewers. | ViewerList |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "list", "data": [ { "object": "viewer", "id": "vw_2n", "status": "invited", "invited_at": "2026-11-02T09:00:01Z", "last_seen_at": null, "requests": 0, "sign_in_details_count": 0, "sign_in_details": null } ], "next_cursor": null}Invite a viewer
Section titled “Invite a viewer”POST /previews/{preview_id}/viewers · Scope viewers.invite · addViewer
Invites one address to an invite preview: a single-use link, emailed unless send_email is false. On a scheduled preview the email is queued for the start (202).
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: AddViewerRequest
{ "note": "The staging checkout is ready for a look."}| Status | Meaning | Body |
|---|---|---|
| 201 | Invited. | ViewerAdded |
| 202 | Queued for a scheduled preview’s start. | ViewerAdded |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (201):
{ "object": "viewer_added", "viewer": { "object": "viewer", "id": "vw_2n", "status": "invited", "invited_at": "2026-11-02T09:00:01Z", "last_seen_at": null, "requests": 0, "sign_in_details_count": 0, "sign_in_details": null }, "invite": { "delivery": "emailed", "invite_url": null }}Revoke a viewer
Section titled “Revoke a viewer”DELETE /previews/{preview_id}/viewers/{viewer_id} · Scope viewers.revoke · removeViewer
Ends the viewer’s sessions and unused invites at once, on every edge. Revoking a revoked viewer answers it as it is.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
viewer_id |
path | string | A viewer’s id. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The revoked viewer. | Viewer |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "viewer", "id": "vw_2n", "status": "invited", "invited_at": "2026-11-02T09:00:01Z", "last_seen_at": null, "requests": 0, "sign_in_details_count": 0, "sign_in_details": null}Restore a revoked viewer
Section titled “Restore a revoked viewer”POST /previews/{preview_id}/viewers/{viewer_id}/restore · Scope viewers.revoke · restoreViewer
Lifts the viewer’s revocation, whoever made it (removeViewer, the console’s Revoke, a narrowed list or share group). Their sessions, command-line sign-ins and invites stay ended: the viewer signs in again (an emailed code on a standing-access preview or through a share group, a link they request on an invite preview). Refused with 409 viewer_not_covered when nothing admits the address any longer: the preview’s own list (the address or its @domain), a share group’s viewer list, or an invite; add them again instead, which lifts the revocation itself. 409 preview_ended on an ended or expired preview; 422 validation_failed when the workspace’s allowed viewer domains no longer include the address. 409 limit_reached when a named-viewers-only workspace has no place left for them (a revoked viewer does not hold one). 403 forbidden when Houseguest support revoked them: only support can lift that. Restoring a viewer who is not revoked answers it as it is and records nothing. The activity log records it as Viewer restored. Since 1.18.0.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
viewer_id |
path | string | A viewer’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The restored viewer. | Viewer |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "viewer", "id": "vw_2n", "status": "invited", "invited_at": "2026-11-02T09:00:01Z", "last_seen_at": null, "requests": 0, "sign_in_details_count": 0, "sign_in_details": null}Standing access
Section titled “Standing access”List standing access
Section titled “List standing access”GET /previews/{preview_id}/standing-access · Scope previews.view · listStandingAccess
The list of a standing-access preview: addresses and @domains, in order.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
limit |
query | integer | Items per page. Default 50. At least 1. At most 100. |
cursor |
query | string | next_cursor of the previous page. Opaque. |
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of entries. | StandingAccessList |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "list", "data": [ { "object": "standing_access_entry", "id": "sa_5f0c2b9e1d7a4c3b", "entry": "@acme.example", "kind": "domain", "added_at": "2026-11-02T09:00:00Z", "sign_in_details_count": 0, "sign_in_details": null } ], "next_cursor": null}Add to standing access
Section titled “Add to standing access”POST /previews/{preview_id}/standing-access · Scope standing.manage · addStandingAccess
Adds an address or @domain to the list. Adding an address also lifts an earlier revocation of that viewer.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: AddStandingAccessRequest
{ "entry": "@acme.example"}| Status | Meaning | Body |
|---|---|---|
| 201 | Added (or already on the list). | StandingAccessEntry |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (201):
{ "object": "standing_access_entry", "id": "sa_5f0c2b9e1d7a4c3b", "entry": "@acme.example", "kind": "domain", "added_at": "2026-11-02T09:00:00Z", "sign_in_details_count": 0, "sign_in_details": null}Remove from standing access
Section titled “Remove from standing access”DELETE /previews/{preview_id}/standing-access/{entry_id} · Scope standing.manage · removeStandingAccess
Takes the entry off the list; every viewer it covered loses access at once.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
entry_id |
path | string | A standing-access entry’s id. Required. |
| Status | Meaning | Body |
|---|---|---|
| 204 | Removed. | none |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Share groups
Section titled “Share groups”List share groups
Section titled “List share groups”GET /share-groups · Scope previews.view · listShareGroups
The workspace’s share groups the token may see, by name: each with its open previews and how many entries its viewer list has. Since 1.12.0.
| Parameter | In | Type | Description |
|---|---|---|---|
limit |
query | integer | Items per page. Default 50. At least 1. At most 100. |
cursor |
query | string | next_cursor of the previous page. Opaque. |
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of share groups. | ShareGroupList |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "list", "data": [ { "object": "share_group", "id": "sg_2n", "name": "Acme review", "description": "Everything shown to Acme", "agent_id": null, "preview_ids": [ "k3x7q2m5w4p5r6t2" ], "viewer_count": 13 } ], "next_cursor": null}List a share group’s viewers
Section titled “List a share group’s viewers”GET /share-groups/{share_group_id}/viewers · Scope previews.view · listShareGroupViewers
The group’s viewer list, by entry, ended entries included (active false). Anyone an active entry covers views every preview in the group. Since 1.12.0.
| Parameter | In | Type | Description |
|---|---|---|---|
share_group_id |
path | string | A share group’s id. Required. |
limit |
query | integer | Items per page. Default 50. At least 1. At most 100. |
cursor |
query | string | next_cursor of the previous page. Opaque. |
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of entries. | ShareGroupViewerList |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "list", "data": [ { "object": "share_group_viewer", "id": "gv_9c41d0e2b7a35f68", "share_group_id": "sg_2n", "entry": "@acme.example", "kind": "domain", "ends_at": "2026-12-31T23:59:00Z", "active": true, "added_at": "2026-11-02T09:00:00Z" } ], "next_cursor": null}Add to a share group’s viewers
Section titled “Add to a share group’s viewers”POST /share-groups/{share_group_id}/viewers · Scope standing.manage · addShareGroupViewer
Adds an address or @domain to the group’s viewer list, with an optional end date, or sets the end date of an entry already on it. It works at once on every preview in the group, including invite-only ones, and on every preview that joins the group later. Needs standing.manage on the group or the workspace. The workspace’s rules for viewers apply: allowed viewer domains, named viewers only. With notify true, a new address entry is emailed (since 1.13.0). Since 1.12.0.
| Parameter | In | Type | Description |
|---|---|---|---|
share_group_id |
path | string | A share group’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: AddShareGroupViewerRequest
{ "entry": "@acme.example", "ends_at": "2026-12-31T23:59:00Z"}| Status | Meaning | Body |
|---|---|---|
| 200 | Already on the list: its end date is set. | ShareGroupViewer |
| 201 | Added. | ShareGroupViewer |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "share_group_viewer", "id": "gv_9c41d0e2b7a35f68", "share_group_id": "sg_2n", "entry": "@acme.example", "kind": "domain", "ends_at": "2026-12-31T23:59:00Z", "active": true, "added_at": "2026-11-02T09:00:00Z"}Remove from a share group’s viewers
Section titled “Remove from a share group’s viewers”DELETE /share-groups/{share_group_id}/viewers/{entry_id} · Scope standing.manage · removeShareGroupViewer
Takes the entry off the group’s viewer list. Every viewer of the group’s previews that nothing else admits (the preview’s own list, an invite, another group) loses access at once: sessions, command-line sign-ins and terminals end. Since 1.12.0.
| Parameter | In | Type | Description |
|---|---|---|---|
share_group_id |
path | string | A share group’s id. Required. |
entry_id |
path | string | An entry’s id on a share group’s viewer list. Required. |
| Status | Meaning | Body |
|---|---|---|
| 204 | Removed. | none |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Add a preview to a share group
Section titled “Add a preview to a share group”POST /share-groups/{share_group_id}/previews · Scope groups.manage · addShareGroupPreview
Adds an open preview to the group by hand. The group’s delegates then manage it, and the group’s viewer list reaches it. When that gives the preview new viewers, the answer is 409 confirmation_required, saying how many people and domains, until the body has confirm_new_viewers: true. Needs groups.manage on the group and previews.manage on the preview. Since 1.12.0.
| Parameter | In | Type | Description |
|---|---|---|---|
share_group_id |
path | string | A share group’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: AddShareGroupPreviewRequest
{ "preview_id": "k3x7q2m5w4p5r6t2", "confirm_new_viewers": true}| Status | Meaning | Body |
|---|---|---|
| 200 | The share group, with the preview in it. | ShareGroup |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "share_group", "id": "sg_2n", "name": "Acme review", "description": "Everything shown to Acme", "agent_id": null, "preview_ids": [ "k3x7q2m5w4p5r6t2" ], "viewer_count": 13}Take a preview out of a share group
Section titled “Take a preview out of a share group”DELETE /share-groups/{share_group_id}/previews/{preview_id} · Scope groups.manage · removeShareGroupPreview
Takes a preview added by hand out of the group. Viewers only the group’s viewer list admitted lose access to it at once. A preview the group holds through its agent stays while the agent serves its hostnames (404). Needs groups.manage on the group and previews.manage on the preview. Since 1.12.0.
| Parameter | In | Type | Description |
|---|---|---|---|
share_group_id |
path | string | A share group’s id. Required. |
preview_id |
path | string | A preview’s id. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The share group, without the preview. | ShareGroup |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "share_group", "id": "sg_2n", "name": "Acme review", "description": "Everything shown to Acme", "agent_id": null, "preview_ids": [ "k3x7q2m5w4p5r6t2" ], "viewer_count": 13}Sync a share group’s end dates
Section titled “Sync a share group’s end dates”POST /share-groups/{share_group_id}/sync-end · Scope previews.view · syncShareGroupEndDates
Sets one end date on a share group’s open previews (target previews) or on every live entry of its viewer list (target viewers). mode match: for previews, the latest current end among the group’s open previews; for viewers, no end of their own (ends_at null: access lasts as long as each preview). mode date: ends_at. Previews: needs previews.view on the group, then for each preview what setPreviewEndDate needs on it (previews.extend for a later end, previews.extend_long past 7 days from now, previews.end for an earlier one) and the same caps (the workspace’s longest preview, 7 days for invite previews by default, a terminal share’s own length, at least 5 minutes from now). A preview the token may not move, or one a cap refuses, is left as it is and comes back with result refused and the reason; the others change, and the answer is 200 either way. Ended previews come back as skipped_ended. Only previews the token reads are listed. An earlier end caps every sign-in, CLI token and unused invite at the new end. tell_owners emails each owner whose preview changed, as tell_owner does: at most one email an hour per owner and preview (later changes leave the console notification only), and never to someone who is no longer a member. Viewers: needs standing.manage on the group or the workspace. An earlier end caps the sessions and CLI tokens the entry admits at once. Entries that already ended stay ended (skipped_ended). An entry the workspace’s rules for viewers refuse now (allowed viewer domains, named viewers only) comes back refused with the reason. Changing an end lifts no revocation. dry_run: the planned changes, with nothing written (the activity log included). The activity log records each preview’s change as setPreviewEndDate does (via=group), and one line for the group. Since 1.19.0.
| Parameter | In | Type | Description |
|---|---|---|---|
share_group_id |
path | string | A share group’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: SyncShareGroupEndRequest
{ "target": "previews", "mode": "match", "dry_run": true}| Status | Meaning | Body |
|---|---|---|
| 200 | The changes made, or planned with dry_run. | ShareGroupEndSync |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "share_group_end_sync", "share_group_id": "sg_2n", "target": "previews", "mode": "match", "ends_at": "2026-12-27T18:00:00Z", "dry_run": true, "changed": 1, "refused": 1, "items": [ { "preview_id": "k3x9q2", "name": "checkout", "result": "changed", "ends_at_before": "2026-12-24T18:00:00Z", "ends_at_after": "2026-12-27T18:00:00Z", "shortened": false, "reason": null, "missing_permission": null }, { "preview_id": "p8m2zt", "name": "cart", "result": "refused", "ends_at_before": "2026-12-05T18:00:00Z", "ends_at_after": null, "shortened": false, "reason": "at most 7 days from now", "missing_permission": null } ]}Agents
Section titled “Agents”List agents
Section titled “List agents”GET /agents · Scope agents.view · listAgents
The workspace’s agents and the names they serve, oldest first.
| Parameter | In | Type | Description |
|---|---|---|---|
limit |
query | integer | Items per page. Default 50. At least 1. At most 100. |
cursor |
query | string | next_cursor of the previous page. Opaque. |
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of agents. | AgentList |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "list", "data": [ { "object": "agent", "id": "ag_3", "name": "staging-vpc", "connected": true, "version": "0.6.0", "last_seen_at": "2026-11-02T10:15:00Z", "hostnames": [ "api.staging.example.com", "checkout.staging.example.com" ], "tcp_services": [ "db.staging.example.com:5432" ], "approval": { "state": "active", "pending": [], "failover": [] } } ], "next_cursor": null}Get an agent
Section titled “Get an agent”GET /agents/{agent_id} · Scope agents.view · getAgent
One agent. approval says whether it waits for approval to serve names another agent already serves (since 1.17.0).
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The agent. | Agent |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent", "id": "ag_3", "name": "staging-vpc", "connected": true, "version": "0.6.0", "last_seen_at": "2026-11-02T10:15:00Z", "hostnames": [ "api.staging.example.com", "checkout.staging.example.com" ], "tcp_services": [ "db.staging.example.com:5432" ], "approval": { "state": "active", "pending": [], "failover": [] }}Approve an agent
Section titled “Approve an agent”POST /agents/{agent_id}/approve · Scope agents.configure · approveAgent
Lets an agent that waits for approval serve the names it waits for, as the failover of the agents that claimed them first: the agent with the earliest claim of a name (the primary) keeps its traffic, and this agent serves it only while the primary is not connected. It is recorded per pair of agents and name: a name the agent claims later that another agent claimed first waits again. A name whose first agent was removed is released to it. Every edge applies it within seconds. Idempotent: an agent with nothing waiting is answered as it is, and nothing is recorded. The activity log records who approved it. 404 for an agent that is not one of the workspace’s own (a terminal share’s). Since 1.17.0.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
| Status | Meaning | Body |
|---|---|---|
| 200 | Approved, or nothing was waiting: the agent, approval.state active. | Agent |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent", "id": "ag_3", "name": "staging-vpc", "connected": true, "version": "0.6.0", "last_seen_at": "2026-11-02T10:15:00Z", "hostnames": [ "api.staging.example.com", "checkout.staging.example.com" ], "tcp_services": [ "db.staging.example.com:5432" ], "approval": { "state": "active", "pending": [], "failover": [] }}Turn a hostname on
Section titled “Turn a hostname on”POST /agents/{agent_id}/hostnames · Scope agents.names · turnOnAgentHostname
Turns on one name under one of the agent’s *.domain entries, as Turn on on the agent’s page: exactly one label under the entry, nothing wider (on a Managed agent the entry is one of its web targets, managed on its Targets tab or with PUT /agents/{agent_id}/config; on a Hardened or older agent it is in the host’s HG_ALLOW), under a verified domain of the workspace. The agent forwards it at once, and the edges fetch its certificate as soon as its DNS points at them. 201 when this call turned it on, 200 when it was on already. A name this call turns on gets its DNS record from the workspace’s DNS automation when that covers its domain, by the domain’s default (no per-call choice); dns_record says where that stands.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: HostnameRequest
{ "hostname": "staging.apps.example.com"}| Status | Meaning | Body |
|---|---|---|
| 200 | The name was on already. | AgentHostname |
| 201 | Turned on. | AgentHostname |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_hostname", "hostname": "staging.apps.example.com", "agent_id": "ag_3", "on": true, "fixed": false, "dns": "edge", "dns_ready": true, "dns_record": "managed", "certificate": "pending", "certificate_ready": false, "default_note": "", "default_sign_in_details": [], "default_sign_in_details_count": 0, "identity_header": { "enabled": false }, "agent_identity": { "mode": "pass", "email_header": "", "name_header": "" }, "agent_fixed_headers": [], "workspace_id": "wks_3k7qz2m5w4p5r6t2xn8vb4cd"}Turn a hostname off
Section titled “Turn a hostname off”DELETE /agents/{agent_id}/hostnames/{hostname} · Scope agents.names · turnOffAgentHostname
Turns off a name that was turned on under one of the agent’s *.domain entries; the agent stops forwarding it. A name in an open preview stays on (hostname_in_use): remove it from the preview first. An exact HG_ALLOW entry is changed on the agent’s host only (validation_failed). Turning off a name that is off answers it as it is. A name that is not under one of the agent’s *. entries, or not under a verified domain of the workspace, is not_found.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
hostname |
path | string | A hostname, lowercase. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The name, off. | AgentHostname |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | The resource’s state refuses it. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_hostname", "hostname": "staging.apps.example.com", "agent_id": "ag_3", "on": true, "fixed": false, "dns": "edge", "dns_ready": true, "dns_record": "managed", "certificate": "pending", "certificate_ready": false, "default_note": "", "default_sign_in_details": [], "default_sign_in_details_count": 0, "identity_header": { "enabled": false }, "agent_identity": { "mode": "pass", "email_header": "", "name_header": "" }, "agent_fixed_headers": [], "workspace_id": "wks_3k7qz2m5w4p5r6t2xn8vb4cd"}Read a hostname
Section titled “Read a hostname”GET /agents/{agent_id}/hostnames/{hostname} · Scope agents.names · getAgentHostname
One name the agent forwards, with its readiness and its default note for viewers. A name the agent does not forward in this workspace is not_found. Since 1.7.0; its identity header since 1.8.0.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
hostname |
path | string | A hostname, lowercase. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The name. | AgentHostname |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_hostname", "hostname": "staging.apps.example.com", "agent_id": "ag_3", "on": true, "fixed": false, "dns": "edge", "dns_ready": true, "dns_record": "managed", "certificate": "pending", "certificate_ready": false, "default_note": "", "default_sign_in_details": [], "default_sign_in_details_count": 0, "identity_header": { "enabled": false }, "agent_identity": { "mode": "pass", "email_header": "", "name_header": "" }, "agent_fixed_headers": [], "workspace_id": "wks_3k7qz2m5w4p5r6t2xn8vb4cd"}Set a hostname’s default note
Section titled “Set a hostname’s default note”POST /agents/{agent_id}/hostnames/{hostname}/default-note · Scope agents.names · setHostnameDefaultNote
Sets the note for viewers, and its sign-in details, that new previews including this hostname start with (when several of a preview’s hostnames have one, the first hostname’s). Previews already open keep their own note. Sign-in details need the server’s viewer notes key (422 validation_failed without it). Setting or reading the rows also needs previews.manage. Since 1.7.0.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
hostname |
path | string | A hostname, lowercase. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: SetDefaultNoteRequest
{ "default_note": "Staging data resets every night.", "default_sign_in_details": [ { "label": "Buyer", "password": "staging-only" } ]}| Status | Meaning | Body |
|---|---|---|
| 200 | The name with its default note. | AgentHostname |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_hostname", "hostname": "staging.apps.example.com", "agent_id": "ag_3", "on": true, "fixed": false, "dns": "edge", "dns_ready": true, "dns_record": "managed", "certificate": "pending", "certificate_ready": false, "default_note": "", "default_sign_in_details": [], "default_sign_in_details_count": 0, "identity_header": { "enabled": false }, "agent_identity": { "mode": "pass", "email_header": "", "name_header": "" }, "agent_fixed_headers": [], "workspace_id": "wks_3k7qz2m5w4p5r6t2xn8vb4cd"}Set a hostname’s identity header
Section titled “Set a hostname’s identity header”POST /agents/{agent_id}/hostnames/{hostname}/identity-header · Scope agents.headers · setHostnameIdentityHeader
Turns the identity header on or off for a hostname: whether the edge sends each signed-in viewer’s token (Houseguest-Identity) to the app. What the app then receives is the agent’s own configuration (agent_identity): an agent whose HG_IDENTITY lists the hostname checks the token and refuses requests without one, so turning it off there makes viewers get an error. The activity log records each change and who made it. The viewer’s Houseguest sign-in page says the app receives their email address while any hostname of the preview has it on. Since 1.8.0.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
hostname |
path | string | A hostname, lowercase. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: SetIdentityHeaderRequest
{ "enabled": true}| Status | Meaning | Body |
|---|---|---|
| 200 | The name with its identity header. | AgentHostname |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_hostname", "hostname": "staging.apps.example.com", "agent_id": "ag_3", "on": true, "fixed": false, "dns": "edge", "dns_ready": true, "dns_record": "managed", "certificate": "pending", "certificate_ready": false, "default_note": "", "default_sign_in_details": [], "default_sign_in_details_count": 0, "identity_header": { "enabled": false }, "agent_identity": { "mode": "pass", "email_header": "", "name_header": "" }, "agent_fixed_headers": [], "workspace_id": "wks_3k7qz2m5w4p5r6t2xn8vb4cd"}Get an agent’s configuration
Section titled “Get an agent’s configuration”GET /agents/{agent_id}/config · Scope agents.view · getAgentConfig
The agent’s mode, the latest saved version of what it may reach (web and TCP targets, plain HTTP, public DNS), the version it runs and its answer. The ETag is the latest version, for If-Match on PUT. Since 1.15.0.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The agent’s configuration. | AgentConfig |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_config", "agent_id": "ag_3", "mode": "managed", "editable": true, "version": 42, "applied_version": 42, "status": "applied", "refused_reason": null, "source": "console", "saved_at": "2026-11-25T09:00:00Z", "answered_at": "2026-11-25T09:00:04Z", "settings_reported": false, "settings": { "web": [ { "hostname": "app.example.com", "address": "10.0.0.5:443" }, { "hostname": "*.staging.example.com", "address": "dns" } ], "tcp": [ { "target": "ssh.example.com:22", "address": "10.0.0.7:22", "usernames": [ "deploy" ] } ], "plain_http": true, "plain_http_ports": [], "public_dns": false }}Change an agent’s configuration
Section titled “Change an agent’s configuration”PUT /agents/{agent_id}/config · Scope agents.configure · updateAgentConfig
Saves a new version of what a Managed agent may reach. The console validates every entry as the agent parses HG_ALLOW and HG_ALLOW_TCP, gives it the agent’s next version, signs it with the workspace’s key and has the edges deliver it; the agent checks the signature, the version and its host’s HG_CEILING, and applies it with no restart (status pending until it answers, then applied or refused). Needs If-Match with the version read. A change that lets the agent reach more needs confirm_wider_reach. Targets the new version removes stop at once: their previews show the app as unavailable, and TCP sessions to removed services end. The activity log records the save with its changes, and the agent’s answer. Since 1.15.0.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
If-Match |
header | string | The latest version, as GET’s ETag gives it: “5”. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: AgentConfigRequest
{ "web": [ { "hostname": "app.example.com", "address": "10.0.0.5:443" }, { "hostname": "*.staging.example.com", "address": "dns" } ], "tcp": [ { "target": "db.example.com:5432", "address": "10.0.0.6:5432", "usernames": [] } ], "confirm_wider_reach": true}| Status | Meaning | Body |
|---|---|---|
| 200 | Saved; status is pending until the agent answers. | AgentConfig |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | agent_not_managed: the agent is Hardened or older than 0.9.0. confirmation_required: the change lets the agent reach more and confirm_wider_reach was not true. | Error |
| 412 | version_conflict: If-Match is not the latest version. | Error |
| 422 | A field’s value is refused. | Error |
| 428 | precondition_required: no If-Match, or not a version. | Error |
| 429 | Slow down. | Error |
| 503 | config_unavailable: the server holds no agent config key. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_config", "agent_id": "ag_3", "mode": "managed", "editable": true, "version": 42, "applied_version": 42, "status": "applied", "refused_reason": null, "source": "console", "saved_at": "2026-11-25T09:00:00Z", "answered_at": "2026-11-25T09:00:04Z", "settings_reported": false, "settings": { "web": [ { "hostname": "app.example.com", "address": "10.0.0.5:443" }, { "hostname": "*.staging.example.com", "address": "dns" } ], "tcp": [ { "target": "ssh.example.com:22", "address": "10.0.0.7:22", "usernames": [ "deploy" ] } ], "plain_http": true, "plain_http_ports": [], "public_dns": false }}Save an earlier configuration again
Section titled “Save an earlier configuration again”POST /agents/{agent_id}/config/rollback · Scope agents.configure · rollbackAgentConfig
Saves an earlier version’s settings again as a new version (a rollback never reuses a version number, so the agent’s no-downgrade check holds). If-Match is optional. Since 1.15.0.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
If-Match |
header | string | The latest version, as GET’s ETag gives it. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: AgentConfigRollbackRequest
{ "version": 41, "confirm_wider_reach": true}| Status | Meaning | Body |
|---|---|---|
| 200 | Saved as a new version. | AgentConfig |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | agent_not_managed: the agent is Hardened or older than 0.9.0. confirmation_required: the change lets the agent reach more and confirm_wider_reach was not true. | Error |
| 412 | version_conflict: If-Match is not the latest version. | Error |
| 422 | A field’s value is refused. | Error |
| 428 | precondition_required: If-Match is not a version (it is optional here). | Error |
| 429 | Slow down. | Error |
| 503 | config_unavailable: the server holds no agent config key. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_config", "agent_id": "ag_3", "mode": "managed", "editable": true, "version": 42, "applied_version": 42, "status": "applied", "refused_reason": null, "source": "console", "saved_at": "2026-11-25T09:00:00Z", "answered_at": "2026-11-25T09:00:04Z", "settings_reported": false, "settings": { "web": [ { "hostname": "app.example.com", "address": "10.0.0.5:443" }, { "hostname": "*.staging.example.com", "address": "dns" } ], "tcp": [ { "target": "ssh.example.com:22", "address": "10.0.0.7:22", "usernames": [ "deploy" ] } ], "plain_http": true, "plain_http_ports": [], "public_dns": false }}Get an agent’s update status
Section titled “Get an agent’s update status”GET /agents/{agent_id}/update · Scope agents.view · getAgentUpdate
The version the agent runs, the newest release on offer (published, not held back), whether the agent can take it, and its latest update: who or which window asked, from and to which version, and how it went (on trial, running the new version, rolled back with the reason). Since 1.16.0.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
| Status | Meaning | Body |
|---|---|---|
| 200 | The agent’s update status. | AgentUpdate |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_update", "agent_id": "ag_3", "status": "updated", "version": "0.9.1", "latest_version": "0.9.1", "notes_url": null, "update_policy": "on", "message": null, "job": { "target_version": "0.9.1", "from_version": "0.9.0", "state": "ok", "source": "window", "requested_by": null, "requested_at": "2026-12-01T03:00:04Z", "sent_at": "2026-12-01T03:00:10Z", "finished_at": "2026-12-01T03:01:22Z", "detail": "ok 0.9.1 from 0.9.0" }}Update an agent
Section titled “Update an agent”POST /agents/{agent_id}/update · Scope agents.configure · updateAgent
Queues an update of the agent to the newest release on offer, or to version. The scheduler sends it within seconds through an edge holding the agent’s tunnel; the agent downloads the release, checks its signature and restarts into it on trial, and goes back to the version it ran if it does not reconnect to every edge within 60 seconds. Follow it with GET. Agents only move up: a version at or below the agent’s is refused. The workspace’s window and auto-update setting do not apply to this. The activity log records the request and the outcome. Since 1.16.0.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_id |
path | string | An agent’s id. Required. |
Idempotency-Key |
header | string | Makes a retried POST safe: the same key with the same method, path and body within 24 hours returns the first response (Idempotent-Replayed: true) instead of acting again. |
Request body: AgentUpdateRequest
{ "version": "0.9.1"}| Status | Meaning | Body |
|---|---|---|
| 202 | Queued; job.state is queued. | AgentUpdate |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 409 | agent_updates_off: Hardened, pinned, not reported yet. agent_too_old: before 0.9.0. already_current: at or above the version. update_in_progress: an update is under way. agent_offline: not connected. | Error |
| 422 | release_unavailable: the version is not published or is held back. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (202):
{ "object": "agent_update", "agent_id": "ag_3", "status": "updated", "version": "0.9.1", "latest_version": "0.9.1", "notes_url": null, "update_policy": "on", "message": null, "job": { "target_version": "0.9.1", "from_version": "0.9.0", "state": "ok", "source": "window", "requested_by": null, "requested_at": "2026-12-01T03:00:04Z", "sent_at": "2026-12-01T03:00:10Z", "finished_at": "2026-12-01T03:01:22Z", "detail": "ok 0.9.1 from 0.9.0" }}Get the workspace’s agent update settings
Section titled “Get the workspace’s agent update settings”GET /agent-update-settings · Scope agents.view · getAgentUpdateSettings
Auto-update (on by default), the window in which automatic updates start (days and a start and end time, in UTC; default Tuesday 03:00–05:00), the strategy (phased, the default, or all at once), and a paused rollout with the reason. Since 1.16.0.
| Status | Meaning | Body |
|---|---|---|
| 200 | The settings. | AgentUpdateSettings |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_update_settings", "auto_update": true, "window": { "days": [ "tue" ], "start": "03:00", "end": "05:00", "timezone": "UTC" }, "strategy": "phased", "paused": null}Change the workspace’s agent update settings
Section titled “Change the workspace’s agent update settings”PUT /agent-update-settings · Scope agents.configure · updateAgentUpdateSettings
Changes auto-update, the window or the strategy; fields left out keep their value. Phased: one agent first, healthy for 10 minutes, then the rest, with agents that share a hostname never restarting at the same moment; a failure pauses the rest (resumed in the console). All at once: every agent together. Hardened and pinned agents are never updated. The activity log records the change. Since 1.16.0.
Request body: AgentUpdateSettingsRequest
{ "auto_update": true, "window": { "days": [ "tue", "thu" ], "start": "03:00", "end": "05:00" }, "strategy": "phased"}| Status | Meaning | Body |
|---|---|---|
| 200 | Saved. | AgentUpdateSettings |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 422 | A field’s value is refused. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "agent_update_settings", "auto_update": true, "window": { "days": [ "tue" ], "start": "03:00", "end": "05:00", "timezone": "UTC" }, "strategy": "phased", "paused": null}Activity
Section titled “Activity”List visits
Section titled “List visits”GET /previews/{preview_id}/visits · Scope viewers.export · listVisits
The preview’s request log, newest first. Needs viewers.export (Export viewer list) on the preview, with previews.view, since 1.4.0: the rows carry viewer addresses, paths and kept query strings, as the console’s request log export. Since 1.9.0 a refused request carries the client IP address (ip) for 30 days.
| Parameter | In | Type | Description |
|---|---|---|---|
preview_id |
path | string | A preview’s id. Required. |
filter |
query | string: all, viewers, signin, refused, monitor |
all leaves out uptime checkers (monitor lists only them). Default "all". |
limit |
query | integer | Items per page. Default 50. At least 1. At most 100. |
cursor |
query | string | next_cursor of the previous page. Opaque. |
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of visits. | VisitList |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 404 | No such resource for this token. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "list", "data": [ { "object": "visit", "id": "vi_9ix", "at": "2026-11-02T10:14:03Z", "method": "GET", "host": "checkout.staging.example.com", "path": "/cart", "decision": "viewer", } ], "next_cursor": null}List activity
Section titled “List activity”GET /activity · Scope audit.export · listActivity
The workspace’s activity log, newest first: what members, agents and tokens did. Needs audit.export (Export activity log) since 1.4.0, as the console’s export.
| Parameter | In | Type | Description |
|---|---|---|---|
limit |
query | integer | Items per page. Default 50. At least 1. At most 100. |
cursor |
query | string | next_cursor of the previous page. Opaque. |
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of events. | EventList |
| 400 | The request is malformed. | Error |
| 401 | No usable token. | Error |
| 403 | The token may not do this. | Error |
| 429 | Slow down. | Error |
| other | Any other error, in the same envelope. | Error |
Example response (200):
{ "object": "list", "data": [ { "object": "event", "id": "ev_1kq", "at": "2026-11-02T09:00:00Z", "actor_kind": "user", "action": "/previews", "subject": "pid=k3x7q2m5w4p5r6t2 name=checkout-pr-42 hosts=checkout.staging.example.com access=invite via=api token=Staging checkout CI …9QxZ" } ], "next_cursor": null}Objects
Section titled “Objects”The one error envelope. Every response that is not 2xx carries it.
| Field | Type | Description |
|---|---|---|
error |
ErrorDetail |
Preview
Section titled “Preview”A preview: hostnames shared with named people for a limited time.
| Field | Type | Description |
|---|---|---|
object |
"preview" |
Always preview. |
id |
string | Opaque, stable id. The same id appears in the console’s URL of the preview. Pattern ^[a-z2-7]{16}$. |
name |
string | Unique among the workspace’s open previews. Pattern ^[a-z0-9][a-z0-9-]{1,30}$. |
status |
string: scheduled, open, ended, expired |
scheduled: holds its hostnames, admits no viewer before starts_at. open: viewers may come in. ended: ended early. expired: reached expires_at. |
access |
string: invite, standing_access |
invite: a single-use link per person. standing_access: one link; people on the list sign in with an emailed code. |
hostnames |
array of string | The first is the landing page. One sign-in covers them all. An SSH-only preview has one: its Houseguest address. |
url |
string | The landing page. For an SSH-only preview, its Houseguest address: a signed-in viewer goes on to terminals_url. |
email_code |
boolean | An emailed code confirms each invite (always true for standing access). |
viewer_session_hours |
integer or null | Standing access: how long a viewer’s sign-in lasts. null: until the preview ends (always null for invite previews). |
opened_by |
string or null | Address of the member who opened it; null when it was opened with the hg command. |
created_at |
string (date-time) | When it was created. |
starts_at |
string (date-time) | When viewers may come in; created_at unless scheduled. |
expires_at |
string (date-time) | When it closes. |
ended_at |
string or null (date-time) | When it was ended early; null otherwise. |
console_url |
string | The preview’s page in the console. |
viewer_note |
string | The note for viewers: plain text shown after they sign in (links become clickable), at https:// |
sign_in_details_count |
integer | How many rows of sign-in details every viewer sees. Since 1.7.0. At least 0. At most 3. |
sign_in_details |
array of SignInDetail | The rows, only for a token that may manage the preview: previews.manage on it, or previews.manage_own on a preview its member opened. null for any other token (sign_in_details_count still counts them), and when the server cannot read them (its viewer notes key is missing or changed). Since 1.7.0. |
kind |
string: web, ssh |
web: the landing page is an app an agent serves. ssh: an SSH-only preview; its landing page is a Houseguest address that sends a signed-in viewer to the terminals page. Since 1.10.0. |
terminals_url |
string or null | The terminals page, every SSH server of the preview in the browser: https:// |
Invite
Section titled “Invite”How one person heard of a preview.
| Field | Type | Description |
|---|---|---|
email |
string | The address. |
delivery |
string: emailed, queued, link, none, failed, already_invited |
emailed: sent now. queued: sent when a scheduled preview opens. link: not emailed; invite_url is the single-use link. none: nothing to send (standing access without notify). failed: the email could not be sent; for an invite, invite_url carries the link. already_invited (POST /shares only): the person was already invited to, or listed on, the preview, or was revoked from it; nothing was sent and nobody was re-admitted. |
invite_url |
string or null | The single-use invite link, when it was not emailed. Shown once: a replay of the same Idempotency-Key returns null here. |
PreviewCreated
Section titled “PreviewCreated”| Field | Type | Description |
|---|---|---|
object |
"preview_created" |
Always preview_created. |
preview |
Preview | |
invites |
array of Invite | One per address in viewers (not for @domain entries). |
tcp_services |
array of TCPService | The preview’s TCP services as created (empty without tcp_services). Since 1.10.0. |
Viewer
Section titled “Viewer”| Field | Type | Description |
|---|---|---|
object |
"viewer" |
Always viewer. |
id |
string | Opaque, stable id within the preview. Pattern ^vw_[0-9a-z]+$. |
email |
string | The viewer’s address. |
status |
string: invited, signed_in, signed_out, idle, revoked |
invited: an unused invite is open. signed_in: holds a live session. signed_out: their latest session ended with a sign-out and they have not signed in since (added in 1.1.0; signing in again makes them signed_in; revoked and an ended or expired preview take priority). idle: none of these (the invite was used and the session ended, or it expired). revoked: removed. Treat an unknown value as other. |
invited_at |
string (date-time) | When the viewer was first added. |
last_seen_at |
string or null (date-time) | The viewer’s last request, if any. |
requests |
integer | Requests attributed to this viewer. At least 0. |
sign_in_details_count |
integer | How many rows of sign-in details this person has of their own. Since 1.7.0. At least 0. At most 3. |
sign_in_details |
array of SignInDetail | Their own rows, which only they see after sign-in (labelled Yours, before the preview’s own rows). Only for a token that may manage the preview; null for any other, and when the server cannot read them. Since 1.7.0. |
ViewerAdded
Section titled “ViewerAdded”viewer is null when the invite is queued for a scheduled preview (202): the viewer is made when the email goes out.
| Field | Type | Description |
|---|---|---|
object |
"viewer_added" |
Always viewer_added. |
viewer |
Viewer or null | |
invite |
Invite |
StandingAccessEntry
Section titled “StandingAccessEntry”| Field | Type | Description |
|---|---|---|
object |
"standing_access_entry" |
Always standing_access_entry. |
id |
string | Opaque, stable id within the preview. Pattern ^sa_[0-9a-f]{16}$. |
entry |
string | An address, or @domain for everyone at that domain. |
kind |
string: address, domain |
|
added_at |
string (date-time) | When it was added. |
sign_in_details_count |
integer | How many rows of sign-in details this address (always 0 and null for a domain) has of their own. Since 1.7.0. At least 0. At most 3. |
sign_in_details |
array of SignInDetail | Their own rows, which only they see after sign-in (labelled Yours, before the preview’s own rows). Only for a token that may manage the preview; null for any other, and when the server cannot read them. Since 1.7.0. |
| Field | Type | Description |
|---|---|---|
object |
"visit" |
Always visit. |
id |
string | Opaque, stable id. Pattern ^vi_[0-9a-z]+$. |
at |
string (date-time) | When. |
method |
string | HTTP method. |
host |
string | Hostname requested. |
path |
string | Path, without the query string (that is query). |
query |
string | The query string without the leading ?, present only when the preview’s Query strings setting kept it: as sent (Kept in full), or with the values of secret-looking parameters replaced by ••• (Kept, secrets hidden). At most 2048 bytes; a longer one ends in …[truncated]. Absent by default: on requests logged while the setting was Not kept or the workspace did not allow keeping query strings, and on requests without one. Added in 1.3.0. At most 2048 characters. |
decision |
string | What the gate decided, such as viewer, denied, ended, signed-in, code-sent, invite-used. New values may appear. |
viewer_email |
string or null | The viewer the request was attributed to, if any. |
ip |
string | The client IP address, present only on a refused request (decision denied, ended, suspended, not-on-list, code-wrong, sso-refused, social-refused, sso-required or cross-tenant) and only for 30 days after it. Absent on every other request, on refused requests older than 30 days and on requests logged before 1.9.0. Added in 1.9.0. |
| Field | Type | Description |
|---|---|---|
object |
"agent" |
Always agent. |
id |
string | Opaque, stable id. Pattern ^ag_[0-9a-z]+$. |
name |
string | The agent’s name. |
connected |
boolean | Holds a tunnel to an edge now. |
version |
string | The version it last reported. |
last_seen_at |
string or null (date-time) | Its last report. |
hostnames |
array of string | The names it serves that a preview can use. |
tcp_services |
array of string | name:port TCP targets it allows. |
approval |
AgentApproval | Whether the agent waits for approval to serve names another agent of the workspace claimed first, and which names it serves only as a failover. Since 1.17.0. |
AgentApproval
Section titled “AgentApproval”An agent of the workspace does not take over a hostname or TCP service another agent claimed first: those names wait for approval, and traffic stays with the agent that claimed them first, connected or not. Waiting is stored: removing or restarting the first agent does not release it. Approve (POST /agents/{agent_id}/approve) makes the agent the failover for those names (failover): it serves them only while the agent with the earliest claim is not connected. Names no other agent serves are served at once. Since 1.17.0.
| Field | Type | Description |
|---|---|---|
state |
string: active, pending |
pending: some of its names wait for approval (listed in pending); active: nothing waits. |
pending |
array of AgentOverlap | The names it does not serve yet. hostnames and tcp_services still list them. |
failover |
array of AgentOverlap | Names it is approved for that the agent with the earliest claim (served_by, the primary) also serves: it serves them only while that agent is not connected. |
AgentOverlap
Section titled “AgentOverlap”One name an agent waits for approval to serve, or serves only as a failover. Since 1.17.0.
| Field | Type | Description |
|---|---|---|
name |
string | The hostname, or name:port for a TCP service. |
kind |
string: hostname, tcp_service |
What name is. |
served_by |
string or null | The agent with the earliest claim of it, which serves it. null: that agent was removed, and the name is not served until this agent is approved. Pattern ^ag_[0-9a-z]+$. |
served_by_name |
string | That agent’s name; empty when it was removed. |
One row of the workspace’s activity log, as the console and the SIEM stream show it.
| Field | Type | Description |
|---|---|---|
object |
"event" |
Always event. |
id |
string | Opaque, stable id. Pattern ^ev_[0-9a-z]+$. |
at |
string (date-time) | When. |
actor |
string | Who: a member’s address, an agent’s name, or system. Every operator event (actor_kind operator) reads Houseguest support: the operator is never named, and its subject leaves out an admin API session. |
actor_kind |
string | user, operator, agent, viewer or system. New values may appear. |
action |
string | What happened, as the activity log names it, e.g. /previews (a preview opened) or api token created. |
subject |
string | Details: ids and the names it changed. A refusal ends with → refused: and the reason. |
Workspace
Section titled “Workspace”| Field | Type | Description |
|---|---|---|
slug |
string | Short name. |
name |
string | Name. |
The token making the request.
| Field | Type | Description |
|---|---|---|
object |
"token" |
Always token. |
id |
string | Opaque, stable id. Pattern ^tk_[0-9a-z]+$. |
name |
string | The token’s name. |
last4 |
string | The secret’s last four characters. |
scopes |
array of string: previews.view, previews.create, previews.extend, previews.extend_long, previews.end, viewers.invite, viewers.revoke, standing.manage, agents.view, audit.view, viewers.export, audit.export, agents.names, previews.manage_own, previews.manage, agents.headers, tcp.add, addresses.use, groups.manage, agents.configure |
What the token may do, within its creator’s roles. A scope brings what it includes (previews.extend brings previews.view). |
created_by |
string | The member it acts as. |
created_at |
string (date-time) | Created. |
expires_at |
string (date-time) | Stops working at. |
workspace |
Workspace |
PreviewList
Section titled “PreviewList”| Field | Type | Description |
|---|---|---|
object |
"list" |
Always list. |
data |
array of Preview | |
next_cursor |
string or null | Pass as cursor for the next page; null on the last page. |
ViewerList
Section titled “ViewerList”| Field | Type | Description |
|---|---|---|
object |
"list" |
Always list. |
data |
array of Viewer | |
next_cursor |
string or null | Pass as cursor for the next page; null on the last page. |
StandingAccessList
Section titled “StandingAccessList”| Field | Type | Description |
|---|---|---|
object |
"list" |
Always list. |
data |
array of StandingAccessEntry | |
next_cursor |
string or null | Pass as cursor for the next page; null on the last page. |
VisitList
Section titled “VisitList”| Field | Type | Description |
|---|---|---|
object |
"list" |
Always list. |
data |
array of Visit | |
next_cursor |
string or null | Pass as cursor for the next page; null on the last page. |
AgentList
Section titled “AgentList”| Field | Type | Description |
|---|---|---|
object |
"list" |
Always list. |
data |
array of Agent | |
next_cursor |
string or null | Pass as cursor for the next page; null on the last page. |
EventList
Section titled “EventList”| Field | Type | Description |
|---|---|---|
object |
"list" |
Always list. |
data |
array of Event | |
next_cursor |
string or null | Pass as cursor for the next page; null on the last page. |
CreatePreviewRequest
Section titled “CreatePreviewRequest”| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | 2 to 31 lowercase letters, digits or hyphens. Pattern ^[a-z0-9][a-z0-9-]{1,30}$. |
hostnames |
array of string | Names the workspace’s agents serve (GET /agents). The first is the landing page. They must share a parent domain. Required unless kind is ssh, which takes none. | |
access |
string: invite, standing_access |
Default "invite". |
|
lifetime_seconds |
integer | How long it stays open from its start. Default: the workspace’s default preview life. Within the workspace’s longest preview (invites at most 7 days, standing access at most a year). More than 7 days needs previews.extend_long (Longer than 7 days). At least 900. | |
expires_at |
string (date-time) | Instead of lifetime_seconds: when it closes. | |
starts_at |
string (date-time) | Schedule it: viewers come in from then (at most 90 days ahead). Its hostnames are held from now. | |
viewers |
array of string or PreviewViewerRequest | invite: addresses to invite. standing_access: addresses and @domains for the list (at least one). Since 1.7.0 an entry may also be an object, {email, sign_in_details}, giving that person sign-in details of their own (needs an exact address). | |
notify |
boolean | Email the viewers. false: invite links come back in invites[].invite_url. Default true. |
|
note |
string | A line for the email. At most 500 characters. | |
email_code |
boolean | invite: an emailed code confirms each invite. Default false. |
|
viewer_session_hours |
integer: 0, 8, 24, 168, 720, 2160 |
standing_access: how long a sign-in lasts (0: until the preview ends). Default 1 day, within the workspace’s longest viewer session. | |
viewer_note |
string | The note for viewers (plain text). Left out: the default note of the first hostname that has one. Since 1.7.0. At most 2000 characters. | |
sign_in_details |
array of SignInDetail | Up to 3 rows of sign-in details every viewer sees after sign-in. Left out: the rows of the first hostname’s default note. Needs the server’s viewer notes key (422 validation_failed without it). Since 1.7.0. | |
kind |
string: web, ssh |
ssh: an SSH-only preview. No hostnames: its landing page is a Houseguest address, "web". |
|
tcp_services |
array of TCPServiceRequest | TCP services to add as the preview opens, before anyone is invited (any kind). Needs tcp.add (Add TCP services) and TCP services on for the workspace (403 tcp_not_allowed). Each target once. Since 1.10.0. |
ExtendPreviewRequest
Section titled “ExtendPreviewRequest”Exactly one of expires_at and extend_by_seconds. More than 7 days from now needs previews.extend_long (Longer than 7 days).
| Field | Type | Required | Description |
|---|---|---|---|
expires_at |
string (date-time) | The new end. | |
extend_by_seconds |
integer | Or: push the current end out by this much. At least 1. |
ReopenPreviewRequest
Section titled “ReopenPreviewRequest”Optional; an empty body reopens for the workspace’s default length without emailing anyone.
| Field | Type | Required | Description |
|---|---|---|---|
lifetime_seconds |
integer | How long it stays open, from now. Default: the workspace’s default length. At most the workspace’s longest preview of its kind; more than 7 days needs previews.extend_long. At least 900. | |
notify |
boolean | Email the invites again: a new single-use invite to each viewer who is not revoked, or the link to each exact address on a standing-access list. Default false. |
SetEndDateRequest
Section titled “SetEndDateRequest”Later needs previews.extend (previews.extend_long past 7 days from now) and stays within the workspace’s Longest preview; earlier needs previews.end.
| Field | Type | Required | Description |
|---|---|---|---|
expires_at |
string (date-time) | yes | The new end: at least 5 minutes from now, earlier or later than the current one. |
tell_owner |
boolean | Email the preview’s owner the old and new end, and add a console notification. Never sent when the caller is the owner. Default false. |
AddViewerRequest
Section titled “AddViewerRequest”| Field | Type | Required | Description |
|---|---|---|---|
email |
string | yes | The address to invite. |
send_email |
boolean | false: no email; the single-use link comes back once in invite.invite_url. Default true. |
|
note |
string | A line for the email. At most 500 characters. | |
sign_in_details |
array of SignInDetail | The person’s own sign-in details, which only they see after sign-in. Needs a token that may manage the preview (previews.manage, or previews.manage_own on its own previews). Since 1.7.0. |
AddStandingAccessRequest
Section titled “AddStandingAccessRequest”| Field | Type | Required | Description |
|---|---|---|---|
entry |
string | yes | An address, or @domain for everyone at that domain. |
notify |
boolean | Email an address the preview’s link (not for @domain). Default false. |
|
note |
string | At most 500 characters. | |
sign_in_details |
array of SignInDetail | An address entry (refused for an @domain, which covers no one person)’s own sign-in details, which only they see after sign-in. Needs a token that may manage the preview (previews.manage, or previews.manage_own on its own previews). Since 1.7.0. |
AgentHostname
Section titled “AgentHostname”One hostname of an agent: on or off, and whether it answers yet.
| Field | Type | Description |
|---|---|---|
object |
"agent_hostname" |
Always agent_hostname. |
hostname |
string | |
agent_id |
string | |
on |
boolean | The agent forwards the name. |
fixed |
boolean | An exact entry of the agent’s HG_ALLOW: always on, and changed on the agent’s host only. |
dns |
string: edge, missing, elsewhere, unknown |
The name’s public DNS: edge (it points at the workspace’s edges, for example as a CNAME to |
dns_ready |
boolean | dns is edge. |
dns_record |
string: managed, pending, conflict, by_hand, none |
Who makes the name’s DNS record, from the workspace’s DNS automation: managed (Houseguest created the record at the domain’s DNS provider and keeps it), pending (DNS automation will create it and has not yet), conflict (a record Houseguest did not make is in the way, or one it made was changed; see the domain’s page), by_hand (automation covers the domain, but this name’s record is made by hand: its own choice, the domain’s switch off, a zone apex, or a record made outside that is already right) or none (no DNS automation covers the domain). A name turned on through the API takes its domain’s default; the API has no per-call choice. |
certificate |
string: ready, pending, waiting_for_dns, unknown |
ready: the edges hold a certificate for the name. pending: DNS points at the edges and the certificate is being issued. waiting_for_dns: issued once DNS points at the edges. unknown: this service cannot tell (a self-hosted edge whose web server keeps its own certificates); it is issued on the first visit. |
certificate_ready |
boolean | certificate is ready. |
default_note |
string | The hostname’s default note for viewers: new previews that include it start with it. Empty when none. Since 1.7.0. At most 2000 characters. |
default_sign_in_details |
array of SignInDetail | The default note’s rows of sign-in details, only for a token that also holds previews.manage (the rows are copied into new previews that include the hostname, which the member could not otherwise read); empty for any other, and when the server cannot read them. Since 1.7.0. |
default_sign_in_details_count |
integer | How many rows of sign-in details the default note has. Since 1.7.0. At least 0. At most 3. |
identity_header |
IdentityHeader | Whether the edge sends the identity token for this hostname. Since 1.8.0. |
agent_identity |
AgentIdentity | What this agent does with the token for this hostname (read-only). Since 1.8.0. |
agent_fixed_headers |
array of string | The names of the fixed headers this agent adds to every request for the hostname (HG_HEADERS_FILE on its host, agents 0.7+); the values never leave the agent’s host. Read-only; empty when none. Since 1.8.0. |
workspace_id |
string | The workspace’s id for apps that check the identity token: the token’s wid claim (wks_ and 24 characters, never changes, never reused). An app that checks the token itself must require it. Since 1.8.0. |
ShareHostname
Section titled “ShareHostname”One hostname of a share.
| Field | Type | Description |
|---|---|---|
hostname |
string | |
agent_id |
string | The agent that forwards it; empty when none does any more. |
turned_on |
boolean | This request turned the name on under one of the agent’s *.domain entries. |
dns |
string: edge, missing, elsewhere, unknown |
The name’s public DNS: edge (it points at the workspace’s edges, for example as a CNAME to |
dns_ready |
boolean | dns is edge. |
dns_record |
string: managed, pending, conflict, by_hand, none |
Who makes the name’s DNS record, from the workspace’s DNS automation: managed (Houseguest created the record at the domain’s DNS provider and keeps it), pending (DNS automation will create it and has not yet), conflict (a record Houseguest did not make is in the way, or one it made was changed; see the domain’s page), by_hand (automation covers the domain, but this name’s record is made by hand: its own choice, the domain’s switch off, a zone apex, or a record made outside that is already right) or none (no DNS automation covers the domain). A name turned on through the API takes its domain’s default; the API has no per-call choice. |
certificate |
string: ready, pending, waiting_for_dns, unknown |
ready: the edges hold a certificate for the name. pending: DNS points at the edges and the certificate is being issued. waiting_for_dns: issued once DNS points at the edges. unknown: this service cannot tell (a self-hosted edge whose web server keeps its own certificates); it is issued on the first visit. |
certificate_ready |
boolean | certificate is ready. |
What POST /shares did: the preview that holds the hostnames, the link viewers use, whether each name answers yet, and who was told.
| Field | Type | Description |
|---|---|---|
object |
"share" |
Always share. |
result |
string: created, reused |
created: a new preview opened (201). reused: an open preview already held a hostname (200); missing hostnames and new viewers were added to it. |
share_url |
string | Where viewers start: https:// and the first hostname. |
ready |
boolean | Every hostname’s DNS points at the edges and no certificate is still being issued. |
preview |
Preview | |
hostnames |
array of ShareHostname | |
invites |
array of Invite |
HostnameRequest
Section titled “HostnameRequest”One hostname.
| Field | Type | Required | Description |
|---|---|---|---|
hostname |
string | yes | The hostname, such as staging.apps.example.com. |
CreateShareRequest
Section titled “CreateShareRequest”Share hostnames in one call. Send hostname, hostnames, or both (hostname first).
| Field | Type | Required | Description |
|---|---|---|---|
hostname |
string | The hostname to share; viewers land on it. | |
hostnames |
array of string | More hostnames for the same preview. They must share a parent domain, so one sign-in covers them. | |
viewers |
array of string | Addresses to invite. People the preview already has are left as they are (delivery already_invited). | |
lifetime_seconds |
integer or null | How long a new preview stays open. Default: the workspace’s default length. Ignored when an open preview is reused. At least 900. | |
note |
string | A message shown above the link in invite emails. At most 500 characters. | |
name |
string | The name of a new preview. Default: the first hostname’s first label (staging for staging.apps.example.com), with -2 to -9 added when that is taken. | |
notify |
boolean or null | Email the invites (default true). False: each invite_url is returned once. | |
viewer_note |
string | The note for viewers of a new preview (plain text). Left out: the first hostname’s default note. A preview reused keeps its own note. Sign-in details are not taken here. Since 1.7.0. At most 2000 characters. |
SignInDetail
Section titled “SignInDetail”One row of sign-in details for the app behind a preview, shown to its viewers after they sign in through Houseguest. Stored encrypted; never in an email, the activity log or an export. Since 1.7.0.
| Field | Type | Description |
|---|---|---|
label |
string | What the row is for, such as Admin or Buyer. May be empty. At most 60 characters. |
username |
string | The app’s username or email address for it. At most 200 characters. |
password |
string | The app’s password for it. At most 200 characters. |
SetViewerNoteRequest
Section titled “SetViewerNoteRequest”A field left out stays as it is; an empty string or array clears it. Both empty removes the note. Since 1.7.0.
| Field | Type | Required | Description |
|---|---|---|---|
viewer_note |
string | The note’s text (plain text). At most 2000 characters. | |
sign_in_details |
array of SignInDetail | The rows of sign-in details, replacing those set. | |
viewers |
array of PreviewViewerRequest | People’s own sign-in details: each listed address (someone invited and not revoked, or an exact address on the list) gets these rows, [] removes them; people not listed keep theirs. Revoking a person deletes theirs. |
SetDefaultNoteRequest
Section titled “SetDefaultNoteRequest”A field left out stays as it is; an empty string or array clears it. Since 1.7.0.
| Field | Type | Required | Description |
|---|---|---|---|
default_note |
string | The default note’s text. At most 2000 characters. | |
default_sign_in_details |
array of SignInDetail | The default note’s rows, replacing those set. Needs previews.manage too (403 otherwise). |
PreviewViewerRequest
Section titled “PreviewViewerRequest”One person of a new preview with sign-in details of their own: an exact address (never an @domain). Since 1.7.0.
| Field | Type | Required | Description |
|---|---|---|---|
email |
string | yes | The person’s address. |
sign_in_details |
array of SignInDetail | Their own rows, which only they see after sign-in. In setPreviewViewerNote, [] removes them. |
IdentityHeader
Section titled “IdentityHeader”The hostname’s identity header: when enabled, every request the edge forwards for a signed-in viewer carries Houseguest-Identity, a JWT signed with Ed25519 (the public keys are at https://
| Field | Type | Description |
|---|---|---|
enabled |
boolean | The edge sends each signed-in viewer’s token for this hostname. |
SetIdentityHeaderRequest
Section titled “SetIdentityHeaderRequest”Since 1.8.0.
| Field | Type | Required | Description |
|---|---|---|---|
enabled |
boolean | yes |
AgentIdentity
Section titled “AgentIdentity”What this agent does with the identity token for the hostname, from the agent’s own configuration (HG_IDENTITY_FILE on its host), as it last reported it; read-only. check: the agent verifies the token, refuses a request without a valid one (403, so identity_header must be enabled) and sends the viewer’s email address and name in email_header and name_header. pass: the token reaches the app, which verifies it. unsupported: an agent older than 0.7, which passes the token. Since 1.8.0.
| Field | Type | Description |
|---|---|---|
mode |
string: check, pass, unsupported |
|
email_header |
string | check: the header that carries the email address; empty otherwise. |
name_header |
string | check: the header that carries the name (Houseguest-Name unless the agent names another); empty otherwise. |
The workspace’s SSH certificate authority: one Ed25519 key per workspace. A server that trusts it (TrustedUserCAKeys) accepts the five-minute certificates the edge has signed for each browser terminal connection, for the usernames a preview’s service allows. Since 1.10.0.
| Field | Type | Description |
|---|---|---|
object |
"ssh_ca" |
Always ssh_ca. |
public_key |
string | The CA’s public key as one authorized_keys line (type, key, comment houseguest-ca: |
fingerprint |
string | SHA-256 fingerprint of the key, as ssh-keygen -l prints it. |
created_at |
string (date-time) | When the workspace’s CA was made (on first use). |
trusted_user_ca_keys_line |
string | The line to add to /etc/ssh/sshd_config (then reload the SSH server), for the key saved at /etc/ssh/houseguest_ca.pub. |
TCPService
Section titled “TCPService”One TCP service of a preview: a name:port an agent of the workspace allows (HG_ALLOW_TCP). Viewers reach it with the houseguest command line; an SSH service (port 22) also in the browser terminal. Since 1.10.0.
| Field | Type | Description |
|---|---|---|
object |
"tcp_service" |
Always tcp_service. |
target |
string | name:port, lowercase, as the agent reports it. Also the id in DELETE /previews/{preview_id}/tcp-services/{target}. |
name |
string | The target’s host name. |
port |
integer | The target’s port. At least 1. At most 65535. |
ssh |
boolean | Port 22: offered in the browser terminal and on the terminals page. |
sign_in |
string or null: own, certificate, either, null |
SSH services: how viewers sign in in the browser terminal. own: their own password or key. certificate: a Houseguest certificate only. either: both. null for other ports. |
usernames |
array of string | The usernames a Houseguest certificate may name (sign_in certificate or either); the terminal prefills the username when there is exactly one. Empty otherwise. Since 1.11.0 each must be in agent_usernames. |
terminal_url |
string or null | The browser terminal for this service alone, on the preview’s terminal address (a Houseguest address of its own, where no app runs) or an SSH-only preview’s landing. null for other ports, and since 1.11.0 also when the edge has no Houseguest addresses for a preview with web hostnames (no browser terminal there). |
added_at |
string (date-time) | When it was added to the preview. |
agent_usernames |
array of string | SSH services: the usernames the workspace’s agents allow Houseguest certificates for on this service (users= in the agent’s HG_ALLOW_TCP, agents 0.8.0+), sorted. The hard ceiling on usernames: a certificate is never set or signed for any other. Empty: no certificates for the service (an older agent, or no users= for it). Empty for other ports. Since 1.11.0. |
in_use |
boolean | Someone holds a live session to this service right now, on any edge: a browser terminal, or a connection through the houseguest command line (native ssh included). Never says who, or how many. Since 1.14.0. |
start_command |
StartCommand or null | SSH services: the start command the sharer set, which the browser terminal runs instead of a shell. null for a shell, and always null for other ports. Since 1.20.0. |
TCPServiceList
Section titled “TCPServiceList”| Field | Type | Description |
|---|---|---|
object |
"list" |
Always list. |
data |
array of TCPService | |
next_cursor |
string or null | Always null: every service is on one page. |
TCPServiceRequest
Section titled “TCPServiceRequest”A TCP service to add, and for an SSH service how viewers sign in. Since 1.10.0.
| Field | Type | Required | Description |
|---|---|---|---|
target |
string | yes | name:port that an agent of the workspace allows (GET /agents, tcp_services). Otherwise 422 tcp_target_not_covered. |
sign_in |
string: own, certificate, either |
SSH services (port 22) only. own: viewers’ own password or key (the default). certificate: a Houseguest certificate only. either: both. certificate and either need usernames, and the edge’s SSH CA key (409 ssh_certificates_unavailable without it); the workspace’s CA is made on first use (GET /ssh-ca). Left out together with usernames: a new service signs in with own credentials, an existing one keeps its setting. | |
usernames |
array of string | The usernames a certificate may name, at most 10 (letters, digits, ., _ and -, not starting with -, at most 32 characters). Only with sign_in certificate or either. | |
start_command |
StartCommandRequest | SSH services (port 22) only: sets the start command. Left out: the service keeps its setting (a new service opens a shell). An empty command clears it. Since 1.20.0. |
ShareGroup
Section titled “ShareGroup”A share group: previews added by hand, and, when it follows an agent, every preview of that agent’s hostnames. Its viewer list reaches every preview in it. Since 1.12.0.
| Field | Type | Description |
|---|---|---|
object |
"share_group" |
Always share_group. |
id |
string | Opaque, stable id. Pattern ^sg_[0-9a-z]+$. |
name |
string | |
description |
string | |
agent_id |
string or null | The agent whose hostnames the group follows; null when it holds only previews added by hand. |
preview_ids |
array of string | The open previews in the group now, by hand or through its agent. |
viewer_count |
integer | Entries on its viewer list that admit people now (addresses and @domains). At least 0. |
ShareGroupList
Section titled “ShareGroupList”| Field | Type | Description |
|---|---|---|
object |
"list" |
Always list. |
data |
array of ShareGroup | |
next_cursor |
string or null | Pass as cursor for the next page; null on the last page. |
ShareGroupViewer
Section titled “ShareGroupViewer”An entry of a share group’s viewer list. Anyone it covers views every preview in the group, invite-only ones included, signing in with an emailed code or single sign-on. Worked out at sign-in: nothing is copied to the previews. Since 1.12.0.
| Field | Type | Description |
|---|---|---|
object |
"share_group_viewer" |
Always share_group_viewer. |
id |
string | Opaque, stable id within the group. Pattern ^gv_[0-9a-f]{16}$. |
share_group_id |
string | |
entry |
string | An address, or @domain for everyone at that domain. |
kind |
string: address, domain |
|
ends_at |
string or null (date-time) | When the entry stops admitting anyone; null: it lasts as long as each preview. Access always ends with the preview, whichever comes first. |
active |
boolean | The entry admits people now (false once ends_at has passed). |
added_at |
string (date-time) | When it was added. |
restored_previews |
array of string | On addShareGroupViewer only: the open previews (ids) of the group where adding this exact address for the first time lifted its own revocation (a Revoke), as adding an address to a preview’s own list does. Absent when none, when the entry was already on the list (a new end date lifts nothing), and on every list. A revocation by Houseguest support is never lifted. An @domain never lifts a revocation made for one address. Since 1.18.0. |
ShareGroupViewerList
Section titled “ShareGroupViewerList”| Field | Type | Description |
|---|---|---|
object |
"list" |
Always list. |
data |
array of ShareGroupViewer | |
next_cursor |
string or null | Pass as cursor for the next page; null on the last page. |
AddShareGroupViewerRequest
Section titled “AddShareGroupViewerRequest”| Field | Type | Required | Description |
|---|---|---|---|
entry |
string | yes | An address, or @domain for everyone at that domain. |
ends_at |
string or null (date-time) | When the entry stops admitting anyone; omit or null for no end of its own. On an entry already on the list, sets its end: an earlier end cuts the sessions it admits short at once. | |
notify |
boolean | Email a new address entry: the group’s open previews (name and address, at most 10) and how to sign in. Opt-in. No email for an @domain or for an entry already on the list. The send runs after the answer; a failure does not undo the add and shows in the activity log. Since 1.13.0. Default false. |
AddShareGroupPreviewRequest
Section titled “AddShareGroupPreviewRequest”| Field | Type | Required | Description |
|---|---|---|---|
preview_id |
string | yes | The preview to add. |
confirm_new_viewers |
boolean | Confirms that the group’s viewers get access to the preview. Without it, adding a preview the group’s viewer list would reach answers 409 confirmation_required, saying how many people and domains. Default false. |
AgentWebTarget
Section titled “AgentWebTarget”One web target, as an HG_ALLOW entry: a hostname (or *.domain, whose names the console turns on one at a time) and the address the agent reaches it at. Since 1.15.0.
| Field | Type | Description |
|---|---|---|
hostname |
string | |
address |
string or null | host:port, dns (the agent host’s DNS, port 443), dns:PORT, or either with http:// for plain HTTP to a private address. null when settings_reported is true: agents never report addresses. |
AgentTCPTarget
Section titled “AgentTCPTarget”One TCP target, as an HG_ALLOW_TCP entry. Since 1.15.0.
| Field | Type | Description |
|---|---|---|
target |
string | name:port. |
address |
string or null | address:port; null when settings_reported is true. |
usernames |
array of string | The usernames a Houseguest SSH certificate may name for the service (users=). Empty: no certificates. |
AgentConfigSettings
Section titled “AgentConfigSettings”What an agent may reach. Since 1.15.0.
| Field | Type | Description |
|---|---|---|
web |
array of AgentWebTarget | |
tcp |
array of AgentTCPTarget | |
plain_http |
boolean | Hostnames may be switched to plain HTTP from the console (HG_PLAIN_HTTP not off). |
plain_http_ports |
array of integer | Ports a hostname switched to plain HTTP may use besides its entry’s own (HG_PLAIN_HTTP_PORTS). |
public_dns |
boolean | Public answers from the agent host’s DNS are used for dns targets (HG_ALLOW_PUBLIC_DNS=1). |
AgentConfig
Section titled “AgentConfig”An agent’s console-managed configuration: the latest saved version, the version the agent runs and its answer. A Managed agent (0.9.0+, the default) applies a saved version live; a Hardened one (HG_MODE=hardened) and agents before 0.9.0 take their settings from their host, and settings then show what they reported. Since 1.15.0.
| Field | Type | Description |
|---|---|---|
object |
"agent_config" |
|
agent_id |
string | |
mode |
string or null: managed, hardened, null |
null: an agent before 0.9.0, or one that has not connected since. |
editable |
boolean | A Managed agent on a server that can sign configurations: PUT and rollback are possible (with Configure agents). |
version |
integer | The latest saved version; 0 for none. The ETag. At least 0. |
applied_version |
integer | The version the agent runs; 0: the settings on its host. At least 0. |
status |
string: applied, pending, refused, none, not_managed |
applied: the agent runs the latest version; pending: it has not answered yet; refused: it refused the latest version (refused_reason) and runs applied_version; none: no version saved yet; not_managed: Hardened or older than 0.9.0. |
refused_reason |
string or null | Why the agent refused the latest version, in its words (a signature, version or HG_CEILING check, or an entry it cannot apply). |
source |
string or null: console, import, rollback, null |
How the latest version was made: saved in the console or the API, imported from the agent host on its first Managed start, or an earlier version saved again. |
saved_by |
string or null | Who saved the latest version: an email address, or the agent’s name for an import. |
saved_at |
string or null (date-time) | |
answered_at |
string or null (date-time) | When the agent’s answer (applied or refused) last changed. |
settings_reported |
boolean | true: no version is saved, and settings are what the agent reported (hostnames and services, never addresses). |
settings |
AgentConfigSettings |
AgentConfigRequest
Section titled “AgentConfigRequest”A new version of an agent’s configuration. web and tcp replace the lists whole; plain_http, plain_http_ports and public_dns left out keep their values. Since 1.15.0.
| Field | Type | Required | Description |
|---|---|---|---|
web |
array of object | yes | |
tcp |
array of object | yes | |
plain_http |
boolean | ||
plain_http_ports |
array of integer | ||
public_dns |
boolean | ||
confirm_wider_reach |
boolean | Required true when the change lets the agent reach more: a new target, a broader wildcard, a target at another address, new certificate usernames or plain-HTTP ports, public DNS answers. Without it such a change is refused with confirmation_required, whose message counts the open previews and viewers that could reach the new targets. |
AgentConfigRollbackRequest
Section titled “AgentConfigRollbackRequest”Save an earlier version again, as a new version. Since 1.15.0.
| Field | Type | Required | Description |
|---|---|---|---|
version |
integer | yes | At least 1. |
confirm_wider_reach |
boolean | As in AgentConfigRequest. |
AgentUpdateJob
Section titled “AgentUpdateJob”One update of one agent to one version. Since 1.16.0.
| Field | Type | Description |
|---|---|---|
target_version |
string | |
from_version |
string or null | What the agent ran when the update was asked for. |
state |
string: queued, sending, trial, ok, rolled_back, failed, refused, canceled |
queued: waiting to be sent; sending: the agent is downloading and checking it; trial: it runs the new version on trial; ok: it runs the new version; rolled_back: the launcher put the previous version back (detail says why); failed: it was not installed (detail); refused: the agent refused it (detail); canceled: not sent (the agent went offline or was removed, the release was held back, or it no longer applied). |
source |
string: manual, window, now |
manual: the console’s Update button or the API; window: the workspace’s update window; now: a release Houseguest sends outside windows (a security release). |
requested_by |
string or null | The email address of whoever asked, for manual updates. |
requested_at |
string (date-time) | |
sent_at |
string or null (date-time) | |
finished_at |
string or null (date-time) | |
detail |
string or null | The agent’s answer or the outcome, in its words. |
AgentUpdate
Section titled “AgentUpdate”An agent’s update status. Since 1.16.0.
| Field | Type | Description |
|---|---|---|
object |
"agent_update" |
|
agent_id |
string | |
status |
string: available, updating, updated, rolled_back, failed, current, managed_on_host, manual_only, not_reported, no_release |
available: latest_version is newer and the agent can take it; updating: an update is under way (job); updated: the latest update succeeded in the last 7 days; rolled_back, failed: the latest update in the last 7 days did not (job.detail); current: at or above latest_version; managed_on_host: Hardened or pinned (message); manual_only: before 0.9.0, update by hand; not_reported: the agent has not reported its version or update setting yet; no_release: no release is on offer. |
version |
string or null | The version the agent runs. |
latest_version |
string or null | The newest published release not held back. |
notes_url |
string or null (uri) | The latest release’s notes, when it has them. |
update_policy |
string or null | What the agent reports: on, or off with the reason (hardened mode, a pinned version). |
message |
string or null | Why the agent cannot take an update, for managed_on_host, manual_only and not_reported. |
job |
AgentUpdateJob or null | The agent’s latest update, or null. |
AgentUpdateRequest
Section titled “AgentUpdateRequest”Optional: an empty body updates to the newest release on offer. Since 1.16.0.
| Field | Type | Required | Description |
|---|---|---|---|
version |
string | A published release above the agent’s version. Pattern ^v?[0-9]+\.[0-9]+\.[0-9]+$. |
AgentUpdateWindow
Section titled “AgentUpdateWindow”When automatic updates start. A window that ends at or before its start runs past midnight into the next day. Since 1.16.0.
| Field | Type | Description |
|---|---|---|
days |
array of string: mon, tue, wed, thu, fri, sat, sun |
|
start |
string | Pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$. |
end |
string | Pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$. |
timezone |
"UTC" |
AgentUpdateSettings
Section titled “AgentUpdateSettings”The workspace’s agent update settings. Since 1.16.0.
| Field | Type | Description |
|---|---|---|
object |
"agent_update_settings" |
|
auto_update |
boolean | false: agents update only when asked (the console’s Update button, POST /agents/{agent_id}/update). A release Houseguest sends outside windows is not sent either; the console shows a banner. |
window |
AgentUpdateWindow | |
strategy |
string: phased, all_at_once |
phased: one agent first, healthy for 10 minutes, then the rest, agents sharing a hostname never at the same moment; a failure pauses the rest. all_at_once: every agent together; a hostname several agents share may drop for a few seconds. |
paused |
AgentUpdatePaused or null | A phased rollout paused by a failure, until someone resumes it in the console. |
AgentUpdateSettingsRequest
Section titled “AgentUpdateSettingsRequest”Fields left out keep their value. Since 1.16.0.
| Field | Type | Required | Description |
|---|---|---|---|
auto_update |
boolean | ||
window |
object | Fields left out keep their value. | |
strategy |
string: phased, all_at_once |
AgentUpdatePaused
Section titled “AgentUpdatePaused”A phased rollout paused by a failure. Since 1.16.0.
| Field | Type | Description |
|---|---|---|
version |
string | |
reason |
string | |
paused_at |
string (date-time) |
SyncShareGroupEndRequest
Section titled “SyncShareGroupEndRequest”| Field | Type | Required | Description |
|---|---|---|---|
target |
string: previews, viewers |
yes | previews: the group’s open previews. viewers: the entries of its viewer list. |
mode |
string: match, date |
yes | match: previews take the latest current end among the group’s open previews; viewer entries take no end of their own (they last as long as each preview). date: ends_at. |
ends_at |
string or null (date-time) | With mode date only: the new end, in the future. For previews, at least 5 minutes from now. | |
dry_run |
boolean | Answer the planned changes and write nothing. Default false. |
|
tell_owners |
boolean | Target previews only: email each owner whose preview changed the old and the new end, and add a console notification (never to the caller about their own). One email per owner. Default false. |
ShareGroupEndSyncItem
Section titled “ShareGroupEndSyncItem”One preview (target previews) or viewer entry (target viewers) and what the sync did to it, or would do with dry_run.
| Field | Type | Description |
|---|---|---|
preview_id |
string | Target previews: the preview. |
name |
string | Target previews: the preview’s name. |
entry_id |
string | Target viewers: the entry, as ShareGroupViewer.id. Pattern ^gv_[0-9a-f]{16}$. |
entry |
string | Target viewers: the address or @domain. |
result |
string: changed, unchanged, skipped_ended, refused |
changed: the end moved (with dry_run: would move). unchanged: it already ends then. skipped_ended: the preview or entry has ended and is left alone. refused: a permission or a cap refuses it; reason says which. |
ends_at_before |
string or null (date-time) | The end before. For an entry, null: no end of its own. |
ends_at_after |
string or null (date-time) | The end after (with dry_run: the planned end). For an entry, null: no end of its own. |
shortened |
boolean | The new end is earlier, which cuts access short. For an entry with no end of its own, a date before the group’s latest open preview ends. |
reason |
string or null | refused only: why, for example “at most 7 days from now”, “needs Extend previews”, or for an entry the workspace’s rules for viewers. |
missing_permission |
string or null | refused for a permission only: the scope it needs, for example previews.extend_long. |
ShareGroupEndSync
Section titled “ShareGroupEndSync”What syncShareGroupEndDates did, or would do with dry_run. Since 1.19.0.
| Field | Type | Description |
|---|---|---|
object |
"share_group_end_sync" |
Always share_group_end_sync. |
share_group_id |
string | |
target |
string: previews, viewers |
|
mode |
string: match, date |
|
ends_at |
string or null (date-time) | The end applied. null: target viewers with mode match (no end of their own), or no open preview to match. |
dry_run |
boolean | true: nothing was written. |
changed |
integer | How many items changed (with dry_run: would change). |
refused |
integer | How many items were refused. |
items |
array of ShareGroupEndSyncItem |
StartCommand
Section titled “StartCommand”The start command of an SSH service: what the browser terminal runs instead of a shell. Only the sharer sets it (console, API); nothing a viewer sends changes it. Houseguest passes it to the SSH server as one string, which runs it with the account’s shell there; Houseguest runs it nowhere itself. Since 1.20.0.
| Field | Type | Description |
|---|---|---|
command |
string | The command, as the sharer typed it: one line, at most 1024 bytes, no control or invisible formatting characters. |
mode |
string: start, only |
start: the browser terminal asks for the command (an SSH exec request with a pty) instead of a shell. Not a restriction: a viewer who connects with the houseguest command line, their own SSH client and their own credentials can still open a shell. only: the service takes Houseguest certificates only (sign_in certificate), and every certificate for it carries the command as the force-command critical option, so the SSH server runs the command and nothing else, whatever the client asks for. It restricts this service of this preview, not the server: another preview with the same server, or another target name for it, is not restricted. |
on_exit |
string: end, menu |
When the command exits. end: the session closes (as without a start command). menu: the browser terminal shows Session ended with Reconnect and Back to terminals. The browser terminal only; a command-line connection is a plain TCP stream. |
StartCommandRequest
Section titled “StartCommandRequest”Sets the start command of an SSH service, or with an empty command clears it. mode only needs sign_in certificate (in the same request, or already set): otherwise 422 ssh_command_needs_certificate. Since 1.20.0.
| Field | Type | Required | Description |
|---|---|---|---|
command |
string | yes | The command: one line, at most 1024 bytes of UTF-8, no control characters (NUL, newline, carriage return, tab, escape), invisible formatting characters (Unicode Cf: bidirectional overrides, zero-width characters) or line and paragraph separators. Stored and sent as is. Empty: no start command (a shell); then mode and on_exit must be left out. At most 1024 characters. |
mode |
string: start, only |
Needed with a command. start or only, as StartCommand.mode. | |
on_exit |
string: end, menu |
end (the default) or menu, as StartCommand.on_exit. |
Errors
Section titled “Errors”Every response that is not 2xx carries the Error envelope:
| Field | Type | Description |
|---|---|---|
code |
string: unauthenticated, token_invalid, token_expired, token_revoked, token_owner_inactive, workspace_suspended, sso_required, mfa_required, forbidden, scope_missing, not_found, method_not_allowed, browser_request, unsupported_media_type, invalid_json, validation_failed, invalid_cursor, name_in_use, hostname_in_use, preview_ended, wrong_access_mode, limit_reached, idempotency_key_invalid, idempotency_key_reused, idempotency_in_progress, rate_limited, mail_unavailable, internal_error, misdirected_request, hostname_not_covered, domain_not_verified, preview_live, ssh_certificates_unavailable, addresses_unavailable, tcp_not_allowed, tcp_target_not_covered, ssh_username_not_allowed, confirmation_required, precondition_required, version_conflict, agent_not_managed, config_unavailable, agent_updates_off, agent_too_old, already_current, release_unavailable, update_in_progress, agent_offline, viewer_not_covered, ssh_command_needs_certificate |
Machine-readable; stable within v1. New codes may be added (additive), so treat an unknown one by its HTTP status. - unauthenticated (401): No Authorization header, or not a Bearer token. - token_invalid (401): The token is not one Houseguest issued. - token_expired (401): The token reached its expiry. - token_revoked (401): The token was revoked in the console, or its workspace’s single sign-on was reset. - token_owner_inactive (401): The token’s creator was disabled or removed from the workspace. - workspace_suspended (403): The workspace is suspended. - sso_required (403): The workspace requires single sign-on and the token was not created from a single sign-on session. - mfa_required (403): The workspace requires a second sign-in method that the token’s creator has not set up. - forbidden (403): The token’s creator does not hold the permission this needs. - scope_missing (403): The creator holds the permission, but the token’s scopes do not include it. - not_found (404): No such path, or no such resource in the token’s workspace (or none the creator can see). - method_not_allowed (405): The path exists but does not take this method; see the Allow header. - browser_request (403): The request carried an Origin header. The API takes requests from programs only. - unsupported_media_type (415): A POST body that is not application/json. - invalid_json (400): The body is not a JSON object of the operation’s request schema (unknown fields are refused). - validation_failed (422): A field’s value is refused; param names the field. Also 400 for a bad query parameter. - invalid_cursor (400): The cursor did not come from this list. - name_in_use (409): An open preview of the workspace already has this name. - hostname_in_use (409): A requested hostname is in another open preview. - preview_ended (409): The preview has ended or expired. - preview_live (409): The preview is open, so it cannot be reopened (since 1.6.0). - wrong_access_mode (409): Viewers belong to invite previews, standing-access entries to standing-access previews. - limit_reached (409): A plan or workspace limit (open previews, named viewers, invitations an hour). - idempotency_key_invalid (400): Idempotency-Key is empty, longer than 255 characters or not visible ASCII. - idempotency_key_reused (422): The key was used in the last 24 hours with a different method, path or body. - idempotency_in_progress (409): The first request with this key is still running. Retry after Retry-After. - rate_limited (429): Too many requests for this token, or too many refused tokens from this network. - mail_unavailable (409): The operation needs email sending, which the edge does not have. - internal_error (500): Something failed on Houseguest’s side. Safe to retry with the same Idempotency-Key. - misdirected_request (421): The request reached a host that does not serve the API. - ssh_certificates_unavailable (409): Houseguest certificates need the edge’s SSH CA key, which this edge does not have (since 1.10.0). - addresses_unavailable (409): An SSH-only preview needs Houseguest addresses, which this edge does not have (since 1.10.0). - tcp_not_allowed (403): TCP services are off for the workspace (its plan) (since 1.10.0). - tcp_target_not_covered (422): No agent of the workspace allows this name:port (HG_ALLOW_TCP) (since 1.10.0). - ssh_username_not_allowed (422): A certificate username the workspace’s agents do not list for the service in HG_ALLOW_TCP users=, or no agent lists any (since 1.11.0). - agent_updates_off (409): The agent takes no remote updates: Hardened, pinned to a version (HG_PIN_VERSION), not reported yet, or a terminal share (since 1.16.0). - agent_too_old (409): The agent is older than 0.9.0 and has no launcher: update it by hand to 0.9.0 first (since 1.16.0). - already_current (409): The agent runs that version or a newer one. Agents only move up (since 1.16.0). - release_unavailable (422): The version is not a published release, or Houseguest holds it back (since 1.16.0). - update_in_progress (409): The agent already has an update queued, being sent or on trial (since 1.16.0). - agent_offline (409): The agent is not connected; an update is sent to a connected agent (since 1.16.0). - viewer_not_covered (409): Nothing admits the viewer any longer (the preview’s list, a share group or an invite), so their revocation is not lifted (since 1.18.0). - ssh_command_needs_certificate (422): A start command with mode only on an SSH service whose sign_in is not certificate, or such a service’s sign_in changed while its start command is mode only (since 1.20.0). |
message |
string | For people. Wording may change; never parse it. Carries no data beyond what the request sent. |
param |
string | The field, query parameter or header the error is about, when there is one. |
request_id |
string | Also in the X-Request-Id header. Quote it when asking for help. |
unauthenticated(401): No Authorization header, or not a Bearer token.token_invalid(401): The token is not one Houseguest issued.token_expired(401): The token reached its expiry.token_revoked(401): The token was revoked in the console, or its workspace’s single sign-on was reset.token_owner_inactive(401): The token’s creator was disabled or removed from the workspace.workspace_suspended(403): The workspace is suspended.sso_required(403): The workspace requires single sign-on and the token was not created from a single sign-on session.mfa_required(403): The workspace requires a second sign-in method that the token’s creator has not set up.forbidden(403): The token’s creator does not hold the permission this needs.scope_missing(403): The creator holds the permission, but the token’s scopes do not include it.not_found(404): No such path, or no such resource in the token’s workspace (or none the creator can see).method_not_allowed(405): The path exists but does not take this method; see the Allow header.browser_request(403): The request carried an Origin header. The API takes requests from programs only.unsupported_media_type(415): A POST body that is not application/json.invalid_json(400): The body is not a JSON object of the operation’s request schema (unknown fields are refused).validation_failed(422): A field’s value is refused; param names the field. Also 400 for a bad query parameter.invalid_cursor(400): The cursor did not come from this list.name_in_use(409): An open preview of the workspace already has this name.hostname_in_use(409): A requested hostname is in another open preview.preview_ended(409): The preview has ended or expired.preview_live(409): The preview is open, so it cannot be reopened (since 1.6.0).wrong_access_mode(409): Viewers belong to invite previews, standing-access entries to standing-access previews.limit_reached(409): A plan or workspace limit (open previews, named viewers, invitations an hour).idempotency_key_invalid(400): Idempotency-Key is empty, longer than 255 characters or not visible ASCII.idempotency_key_reused(422): The key was used in the last 24 hours with a different method, path or body.idempotency_in_progress(409): The first request with this key is still running. Retry after Retry-After.rate_limited(429): Too many requests for this token, or too many refused tokens from this network.mail_unavailable(409): The operation needs email sending, which the edge does not have.internal_error(500): Something failed on Houseguest’s side. Safe to retry with the same Idempotency-Key.misdirected_request(421): The request reached a host that does not serve the API.ssh_certificates_unavailable(409): Houseguest certificates need the edge’s SSH CA key, which this edge does not have (since 1.10.0).addresses_unavailable(409): An SSH-only preview needs Houseguest addresses, which this edge does not have (since 1.10.0).tcp_not_allowed(403): TCP services are off for the workspace (its plan) (since 1.10.0).tcp_target_not_covered(422): No agent of the workspace allows this name:port (HG_ALLOW_TCP) (since 1.10.0).ssh_username_not_allowed(422): A certificate username the workspace’s agents do not list for the service in HG_ALLOW_TCP users=, or no agent lists any (since 1.11.0).agent_updates_off(409): The agent takes no remote updates: Hardened, pinned to a version (HG_PIN_VERSION), not reported yet, or a terminal share (since 1.16.0).agent_too_old(409): The agent is older than 0.9.0 and has no launcher: update it by hand to 0.9.0 first (since 1.16.0).already_current(409): The agent runs that version or a newer one. Agents only move up (since 1.16.0).release_unavailable(422): The version is not a published release, or Houseguest holds it back (since 1.16.0).update_in_progress(409): The agent already has an update queued, being sent or on trial (since 1.16.0).agent_offline(409): The agent is not connected; an update is sent to a connected agent (since 1.16.0).viewer_not_covered(409): Nothing admits the viewer any longer (the preview’s list, a share group or an invite), so their revocation is not lifted (since 1.18.0).ssh_command_needs_certificate(422): A start command with mode only on an SSH service whose sign_in is not certificate, or such a service’s sign_in changed while its start command is mode only (since 1.20.0).
Scopes
Section titled “Scopes”A token’s scopes are permissions of the workspace’s role catalog. A scope brings what it includes, as in roles; the token never does more than the member who created it holds.
previews.viewpreviews.createpreviews.extendpreviews.extend_longpreviews.endviewers.inviteviewers.revokestanding.manageagents.viewaudit.viewviewers.exportaudit.exportagents.namespreviews.manage_ownpreviews.manageagents.headerstcp.addaddresses.usegroups.manageagents.configure
© 2026 Houseguest Technologies LLC. Houseguest™ is its trademark.7723 Tylers Place Blvd., Box #119, West Chester, OH 45069