Stand Guidebook
Chapter 14 of 14
Field guide
What to learn in this chapter
This walkthrough uses the CLI as an authenticated HTTP client so you can learn the API without handling raw credentials. It covers a conversation review first, then the rules for making changes.
Need an exact capability definition, plan requirement, or limitation? Browse the Feature Reference.
Choose a direction
Match the connection to the job.
The Public API lets your tools work on your Stand account. It is available on all plans, with the same role, ownership and plan checks as the underlying features. A permission does not add a paid capability or another person’s access.
Use the public OpenAPI document to find the operation, required scope, input and response. The current contract contains 109 operations across 19 business scopes. Paths include /v1; the production server origin is https://api.stand.chat. Only published operations are available to external clients.
Contract
Download OpenAPI.
Use the supported operations and schemas when planning a client or generating request types.
HTTP reference
Look up an endpoint.
Search by operation, method, path or permission.
Outbound APIs
Give a Stand-in a tool.
Follow this separate workflow when Stand should call your system.
Visitor interface
Build a custom chat UI.
Use the supported visitor protocol for your own chat experience.
Start small
Read one page with an explicit selection.
Inspect listArchivedSessions before making the request. Use scope=myself for your own accessible conversations; organization-wide history requires the current organization owner. An owner’s archived access does not grant access to a teammate’s live conversation.
Replace both timestamps with the period you intend to review. They filter close time, require a timezone, and use an exclusive upper bound. Keep all filters the same when moving between pages. The site filter matches literal text within a saved page URL, not an exact hostname; inspect those URLs if your analysis needs a single domain.
Use the generic client for a published GET operation
stand schema listArchivedSessions
stand api GET /v1/sessions/archived \
--query-param scope=myself \
--query-param closedFrom=2026-10-01T00:00:00Z \
--query-param closedTo=2026-11-01T00:00:00Z \
--query-param page=0 --query-param size=20 \
--query-param sortBy=closedAt --query-param sortDir=descExamples use readable terminal output. Add --json when a script or agent will parse the result; read diagnostics from stderr and data from stdout.
Know the coverage
Use an export for a whole-period review.
History pages contain 1–100 records and use offset pagination. Bound page count, elapsed time and bytes, and report whether more results remain. Concurrent changes can move page boundaries, so a page traversal is not a frozen snapshot. A sessions get read is also bounded to at most 500 messages.
The export endpoint freezes the matching conversation set and streams one JSON document. The CLI checks the whole response, failedSessionIds and exportedElements before publishing a new private file, and refuses to overwrite an existing file. An interrupted or invalid stream is not a completed export, even after HTTP 200.
Download only the conversations authorized for the task and keep the file outside your repository. A copy sent to another service has its own access and retention lifecycle. Record the account scope, dates, filters and count with any analysis; verify claims and quotations against the included conversation IDs.
Export the same selection to a new private file
stand history export --scope myself \
--closed-from 2026-10-01T00:00:00Z \
--closed-to 2026-11-01T00:00:00Z \
--output /absolute/path/review-october.jsonReplace the dates and destination. The default timeout is 600 seconds and the default byte cap is 100 MiB. Operation and resource limits still apply; do not publish an incomplete report.
A useful analysis brief
Ask for evidence, not an unsupported trend.
- Question
- Which support questions recur within this exact selection?
- Evidence
- Include conversation IDs and checked quotations for each theme.
- Coverage
- State the period, filters, count, omissions and whether this is a sample.
- Next step
- Propose approved knowledge changes; do not apply them without authorization.
Make a deliberate change
Read the existing configuration before writing.
Save the resource ID from the successful response. Names are not unique, and an inaccessible or missing resource is not permission to create a replacement. Read the operation schema, preserve the intended settings, and inspect the saved result.
There is no conditional revision check or general Idempotency-Key guarantee. Coordinate shared edits and stop when another writer may have changed the configuration.
Inspect the request before editing an existing Stand-in
stand standins get STANDIN_ID
stand schema updateStandinPrepare a complete reviewed body from that read before using stand standins update STANDIN_ID --body-file standin.json. Request standins:write as well as standins:read for the approved change.
Image uploads
Distinguish staging an image from applying it.
Image uploads use multipart/form-data with a required file part. The CLI supplies the boundary and media type from a regular local file. Inspect the specific operation schema for accepted formats and limits before upload; do not send a base64 string or JSON filename in place of the file.
Your avatar and personal pin use profile:write; your Stand-in images use standins:write; organization pin images use org:write and require the owner. Request the corresponding read permissions to inspect existing settings. Write scopes do not include reads.
CLI example
Replace an existing Stand-in avatar.
Use the direct upload when you only want to change that image.
Stage your avatar without replacing profile settings
stand auth login --scopes "profile:read profile:write"
stand profile get
stand schema uploadRepAvatar
stand api POST /v1/reps/profile/avatar \
--form-file file=/absolute/path/approved-portrait.png
stand schema updateRepProfileAfter upload, prepare the complete profile body and set avatarUrl to filename. Review it before stand profile update --body-file profile-avatar.json, then read the profile again. Do not send an avatar-only body.
Recovery
Treat an uncertain write as unfinished work.
The CLI retries some transient GET failures within a bound, but never automatically replays writes. After a timeout, lost response, cancellation after dispatch or server error, read the affected resource and reconcile its ID and content before deciding whether a retry is safe.
Use the API error code and status together. Invalid or interrupted responses can fail validation even when a status was received. Broader scopes cannot supply ownership, restore a disabled membership, add a paid capability or accept browser consent.
Message workflow
Keep a reply recoverable.
The named send command checks identity and returns reconciliation IDs after uncertain dispatch.
Continue the guide