Conventions
This content is not available in your language yet.
Base URL and headers
Section titled “Base URL and headers”All v1 endpoints live under https://api.harperharbor.com/open/v1. Every request carries:
| Header | Value |
|---|---|
Authorization |
Bearer <access token> |
language |
one of zh-Hant zh-Hans en ja ko — Accept-Language is not consulted |
from |
web (optional) |
Do not send cookies, site keys or account identifiers with these requests. The access token identifies the user.
Identifiers
Section titled “Identifiers”Responses never contain the internal account UUID. A user is the public numeric id; agent configurations, conversations and Lorebooks are opaque string ids. Do not parse them.
Errors
Section titled “Errors”{ "error": "unauthorized | forbidden | not_found | internal", "message": "one English sentence naming the offending part", "retryable": true }401— authentication failed. Refresh the token; if refresh fails, ask the user to authorize again.402 insufficient_credits— the user’s wallet cannot pay for this call.409— a limit or conflict, such as a conflicting conversation operation.413— a payload limit, withdetailnaming the section, field, maximum and actual size.retryable: truemeans the same request may succeed later;falsemeans do not retry without changing something.
message is safe to show verbatim when your client has no copy of its own.
Merge semantics
Section titled “Merge semantics”Preference and document endpoints merge: omitted keys remain unchanged. Older clients can update supported fields without removing newer ones. Where a field is a full replacement (for example alternates and prologue on the welcome endpoint) the reference says so.
Lists and paging
Section titled “Lists and paging”List endpoints return { list: [...] } or a named array with count and limit. Message history is paged. Use the response fields documented for each endpoint; the model catalog returns an array of groups.
Versioning
Section titled “Versioning”v1 is frozen. New fields and new stream events may appear; nothing existing changes meaning or disappears. Treat unknown fields and unknown S→C events as ignorable.