API authentication

A key you create yourself in the app, or OAuth 2.1 with PKCE for an app that acts for other hosts. No sales step, no waiting list.

An API key, for your own code

Create the key in the app under Settings, AI & apps. It starts with hst_ and is shown once. Send it as the whole Authorization header; the Bearer prefix is accepted too.

curl

curl -s https://api.hostemi.com/public/v1/is-connected -H "Authorization: hst_your_key"

GET /is-connected checks a key without needing a scope. A key's power follows its owner's current role: if they are moved down or leave the workspace, the key can at once do only what they can. A key that belongs to several workspaces picks one with the showorg header (the workspace id).

OAuth 2.1, for an app that acts for others

An app that works in other hosts' workspaces asks each host to approve it, and never sees their keys:

StepDetail
DiscoverResource metadata at https://api.hostemi.com/.well-known/oauth-protected-resource; authorization server metadata at https://api.hostemi.com/.well-known/oauth-authorization-server.
RegisterA Client ID Metadata Document, or dynamic registration at https://api.hostemi.com/oauth/register.
AuthorizeAuthorization code with PKCE (S256 only) at https://hostemi.com/oauth/authorize, with resource=https://api.hostemi.com/public/v1 and the scopes you need.
Tokenhttps://api.hostemi.com/oauth/token (public clients send no secret); refresh tokens are issued.
CallAuthorization: Bearer pos_…. A token is bound to its resource: one issued for the MCP server is refused here, and the reverse.

What a key never holds

No Hostemi credential contains, replaces or reveals a booking platform login or a card number. Connecting a platform, keys, team members and billing are done by a person in the app.

When it fails

AnswerMeaning
401 {"msg":"No API Key found"}No Authorization header.
401 {"msg":"Invalid API key"}Unknown, revoked or mistyped key.
401An OAuth token issued for another resource (the MCP server), or expired.
403 SCOPE_REQUIREDThe key lacks the scope; the body names it. Scopes.
Something missing from this page? Write to [email protected], or use the form on the Help page.