Skip to main content
Errors are returned with an appropriate HTTP status and a JSON body in a single, consistent shape:
The error field is suitable for display to end users. The code field is populated only when callers are expected to programmatically branch on the failure mode (for example, to render a “Connect Notion” call-to-action when a Notion endpoint reports a missing integration). Generic validation errors omit code.

Status codes

Hiding existence with 404

For workspaces and API tokens, attempting to operate on a resource the caller cannot read returns 404 Not Found instead of 403 Forbidden. This prevents enumeration attacks that could otherwise reveal whether a particular ID is in use.

Error codes

The following code values are a stable contract. Document any new codes here in the same pull request that introduces them.

no_active_org

The session has no Clerk organization context, and the requested endpoint operates on organization-scoped data.
Resolution. In browsers, prompt the user to pick an organization in the Clerk switcher. In headless clients, re-mint the personal access token from a session that has the desired organization active. See Authentication › Organization binding.

notion_misconfigured

The caller’s organization has not connected a Notion workspace.
Resolution. An organization administrator must complete the OAuth flow at Admin → Notion in the application. Clients should treat this as recoverable and direct the user to that surface.

notion_access_denied

Notion rejected an API request, typically because the integration was uninstalled from the workspace or the requested page was not shared with it.
Resolution. Re-run the Notion OAuth flow and verify the integration has been added to the relevant pages within Notion’s sharing UI.

notion_not_found

Notion returned 404 for a specific page or database ID. The integration is otherwise healthy.
Resolution. Confirm the page is shared with the Archyon integration in Notion. Pages must be explicitly added — Notion does not grant the integration access to all pages by default.

bad_notion_url

A submitted URL did not parse as a Notion page or database link.
Resolution. Verify the URL matches the format https://notion.so/… and contains a 32-character hexadecimal identifier.

role_in_use

A stakeholder role cannot be deleted because existing stakeholder links still reference it. The response includes the count of dependent links.
Resolution. Reassign affected stakeholder links to a different role, or delete them, then retry the role deletion. The dependent link IDs can be obtained by listing stakeholders on the affected workspaces.

Branching on codes

Production clients should branch on code rather than the error string, which is subject to wording changes. A typical pattern:
Treat any future code value not listed above as an unknown error and surface the human-readable error message until your client adds explicit handling.