404.
RaiseGate stores only the SHA-256 hash of the key (partner_api_keys.key_hash), plus its first characters (key_prefix) so keys can be told apart. Neither can be used to call the API, and a lost key cannot be recovered: issue a new one. Any other Authorization scheme (for example Basic) returns 401.
Keys act for a member
Each key also acts for one member of its organisation, like a signed-in user in the app:- The member must belong to the organisation. Removing them from the organisation deletes their keys.
- A key never grants more than its member could do: keys of
viewermembers are read-only, whatever their scopes. - Over MCP, alerts go to the member’s email by default, and
whoamireports the member. - Keys created before this rule were assigned to their organisation’s only admin, or revoked if there was none. A key without a member returns
401 unauthorized.
Scopes
A missing scope returns
403 insufficient_scope. Keys issued by the provisioning script carry all four scopes. A narrower key (for example a read-only reporting key with tracker:read and leads:read) is created by inserting a partner_api_keys row with fewer scopes.
On the MCP server, a tool the key is not allowed to use returns a tool error with insufficient_scope. The rest keep working.
Issuing, resetting and revoking keys
Manage keys from API & MCP Keys on your firm’s profile in RaiseGate. Admins see and manage every key in the firm; other members see and manage only their own.- New key issues a key that acts for a member of the firm. The plaintext is shown once, with a copy button — RaiseGate keeps only its hash, so it cannot be shown again.
- Reset issues a replacement and revokes the current secret immediately. Use it when a key may have been exposed, or when whoever holds it has lost it. Anything still using the old key must be updated.
- Revoke disables the key for good.
--user must be a member of the organisation; issue one key per person. The command prints the member, their role and the plaintext key once. Transfer a key through a secrets manager, not email or chat.
Revoked and expired keys return 401 unauthorized. last_used_at is updated on every authenticated request and is shown next to each key.