stack/docs-mintlify/openapi/client.json
BilalG1 57ff5d3ce9
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
DB migration compat / Check if migrations changed (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Build and Run / docker (push) Has been cancelled
Runs E2E API Tests (Local Emulator) / E2E Tests (Local Emulator, Node ${{ matrix.node-version }}) (22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (mock, 22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (prod, 22.x) (push) Has been cancelled
Runs E2E API Tests with custom port prefix / build (22.x) (push) Has been cancelled
Runs E2E Fallback Tests / E2E Fallback Tests (Node ${{ matrix.node-version }}) (22.x) (push) Has been cancelled
Lint & build / lint_and_build (24) (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
feat(hexclave): PR 2 — visible rebrand (Hexclave brand goes public) (#1481)
## Summary

**Stacked on [#1475](https://github.com/hexclave/stack-auth/pull/1475)**
(`cl/hexclave-pr1`, the invisible compatibility layer). Diff vs that
base = the actual PR 2 code.

This is **PR 2 of the Stack Auth → Hexclave rebrand: the visible flip**.
Old wire identifiers (cookies, request/response headers, Bearer prefix,
JWT issuers, MCP tool name) keep working indefinitely via PR 1's
dual-accept. This PR flips every user-visible surface — package names
taught in docs, SDK class names in code examples, dashboard setup
snippets, page titles, error messages, email content, CLI binary,
default base URLs, GitHub repo slug, contributor guidance — to the
Hexclave brand.

See [`RENAME-TO-HEXCLAVE.md`](./RENAME-TO-HEXCLAVE.md) → *"PR 2: Rebrand
to Hexclave (visible)"* for the full per-work-area spec.

## What's implemented (per the plan's PR 2 scope)

- **SDK base URLs** flipped: `defaultBaseUrl` and
`defaultAnalyticsBaseUrl` in
[common.ts](packages/template/src/lib/stack-app/apps/implementations/common.ts:127)
→ `https://api.hexclave.com` / `https://r.hexclave.com`. PR 1's
[`getHardcodedFallbackUrls`](packages/stack-shared/src/utils/urls.tsx:199)
table now keys on the Hexclave domain.

- **Domain inventory sweep** (16 subdomains from the plan): every
`api/app/docs/discord/demo/mcp/skill/feedback/test/preview/r/api2/api.staging/idp-jwk-audience/built-with.stack-auth.com`
reference in production code, docs-mintlify, examples, READMEs, and
contributor guidance flipped to `*.hexclave.com`. Carve-outs: PR 1's
intentional JWT issuer dual-accept table in
[tokens.tsx](apps/backend/src/lib/tokens.tsx), the legacy `./docs/`
folder, the `unified-docs-widget` allowlist (deliberately accepts both
during DNS transition), and `url-targets.ts` hosted-component default
(baked into existing customer deploys).

- **`@deprecated` JSDoc** on every `Stack*` public export
([packages/template/src/lib/stack-app/index.ts](packages/template/src/lib/stack-app/index.ts)
+ [packages/template/src/index.ts](packages/template/src/index.ts)) —
`StackClientApp`, `StackServerApp`, `StackAdminApp` + every
constructor/options/JSON type, `StackHandler`, `StackProvider`,
`StackTheme`, `useStackApp`, `defineStackConfig`, `StackConfig`.
Hexclave\* aliases are now canonical.

- **Runtime `console.warn`**
([packages/template/src/internal/deprecation-warning.ts](packages/template/src/internal/deprecation-warning.ts))
— once-per-process when the SDK is loaded from a `@stackframe/*`
artifact. Detection uses the existing
`STACK_COMPILE_TIME_CLIENT_PACKAGE_VERSION_SENTINEL` (rewritten at build
time to e.g. `js @stackframe/stack@2.8.92` or `js
@hexclave/next@1.0.0`); `@hexclave/*` mirror artifacts short-circuit the
warning.

- **Tier 3 data migration**: new idempotent SQL migration
[`20260523000000_rename_internal_project_to_hexclave`](apps/backend/prisma/migrations/20260523000000_rename_internal_project_to_hexclave/migration.sql)
— updates the internal Project `displayName` 'Stack Dashboard' →
'Hexclave Dashboard' and `description` only if both still hold the
pre-rebrand defaults. Operator-renamed projects untouched, missing row
no-ops, re-runs are no-ops. [`seed.ts`](apps/backend/prisma/seed.ts:87)
default flipped. `getSharedEmailConfig("Stack Auth")` → `("Hexclave")`.

- **Tier 4 brand strings** (mechanical sweep, ~340 files):
- Page + OpenAPI titles (Hexclave API / Dashboard / REST API / Webhooks
API / Documentation). OpenAPI `info.description` documents
`X-Hexclave-*` headers as canonical with compat note on `X-Stack-*`.
- `HexclaveAssertionError` message text
([errors.tsx:71](packages/stack-shared/src/utils/errors.tsx:71)) — "an
error in Stack." → "an error in Hexclave."
- Known-error message templates
([known-errors.tsx](packages/stack-shared/src/known-errors.tsx)) flipped
to lead with `x-hexclave-*` + the new `docs.hexclave.com` URL; legacy
`x-stack-*` mentioned as compat aliases. **25 e2e test files updated in
lockstep**.
- Email content: failed-emails-digest body, sendTestEmail recipient (now
`sent-with-hexclave.com`), test-email-recipient default.
  - `CHANGELOG.md` title → "Hexclave Changelog".
- `AGENTS.md` env var convention: new vars prefix `HEXCLAVE_` /
`NEXT_PUBLIC_HEXCLAVE_` for Category A/B; legacy `STACK_*` explicitly
noted as accepted via PR 1's dual-read.

- **CLI / init wizard**:
- Every dashboard setup snippet, init-stack template, and docs-mintlify
page teaches `npx @hexclave/cli@latest init` (was
`@stackframe/stack-cli`).
[setup-page.tsx](apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/(overview)/setup-page.tsx)
+
[link-existing-onboarding](apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/new-project/page-client-parts/link-existing-onboarding.tsx).
- [init-stack](packages/init-stack/src/index.ts:634)
`STACK_*_INSTALL_PACKAGE_NAME_OVERRIDE` defaults flipped to
`@hexclave/*`.
- Generated `stack/client.ts` / `stack/server.ts` import from
`@hexclave/next` and reference `HexclaveClientApp` /
`HexclaveServerApp`.
- Internal `StackAuthKeys` dashboard component renamed to
`HexclaveKeys`.

- **docs-mintlify rewrite** (legacy `./docs/` intentionally untouched
per scoping decision):
- **78 MDX files swept**.
`@stackframe/{react,stack,js,tanstack-start,...}` →
`@hexclave/{react,stack,js,...}` in install snippets and code blocks;
`Stack*` SDK class names → `Hexclave*` in all code examples; 'Stack
Auth' brand phrase → 'Hexclave'.
- `openapi/{server,admin,client,webhooks}.json` titles → 'Hexclave REST
API' / 'Hexclave Webhooks API'.

- **Generators flipped before regeneration**:
-
[`packages/stack-shared/src/helpers/init-prompt.ts`](packages/stack-shared/src/helpers/init-prompt.ts),
[`/ai/prompts.ts`](packages/stack-shared/src/ai/prompts.ts),
[`apps/backend/src/lib/ai/prompts.ts`](apps/backend/src/lib/ai/prompts.ts),
[`apps/backend/src/lib/ai/tools/create-email-{template,draft}.ts`](apps/backend/src/lib/ai/tools/create-email-template.ts),
[`apps/skills/src/app/route.ts`](apps/skills/src/app/route.ts) (taught
MCP tool → `ask_hexclave` with compat note; CLI binary teach →
`hexclave`),
[`docs-mintlify/snippets/home-prompt-island.jsx`](docs-mintlify/snippets/home-prompt-island.jsx),
[`packages/template/README.md`](packages/template/README.md) +
integrations/convex/component/README.md.
  - `generate-sdks` propagated changes to `packages/{react,stack,js}`.

- **OpenAPI dual-documentation**:
[`apps/backend/src/app/api/latest/route.ts`](apps/backend/src/app/api/latest/route.ts)
now lists `X-Hexclave-*` headers as primary documented schemas with
`X-Stack-*` duplicates marked `.optional()` (both accepted at runtime by
PR 1's normalize-at-proxy shim).

- **`@stackframe/emails` virtual module**: dual-aliased to
`@hexclave/emails` at the bundler boundary
([email-rendering.tsx:89](apps/backend/src/lib/email-rendering.tsx:89)).
Stored email templates continue to import from either name; new
AI-generated templates and the system prompt teach `@hexclave/emails`.

- **Tier 2 mirror-publish wiring** (new this PR, lays the groundwork for
`@hexclave/*` first publish):
-
[`scripts/rewrite-packages-to-hexclave.ts`](scripts/rewrite-packages-to-hexclave.ts)
— rewrites 9 publishable `@stackframe/*` → `@hexclave/*` `package.json`
files (reads `HEXCLAVE_VERSION` env or `--version=` flag), pins
cross-deps to the shared `@hexclave` version, registers `hexclave` bin
alongside `stack` for `@hexclave/cli`.
-
[`.github/workflows/npm-publish.yaml`](.github/workflows/npm-publish.yaml)
appended with rewrite-then-republish step. `pnpm publish` skips
already-on-npm versions so reruns are safe.

- **Sender email domain**: `noreply@stackframe.co` →
`noreply@sent-with-hexclave.com` (the dedicated transactional-sender
domain split per the plan, to isolate bulk deliverability from
`hexclave.com` reputation); `security@` / `team@stack-auth.com` inbound
mailboxes → `@hexclave.com`.

- **Self-host docs**: docker network / container names in the bash
examples flipped from `stack-auth` to `hexclave` (`hexclave-postgres`,
`hexclave-clickhouse`, `hexclave.env`). The docker image tag
`stackauth/server:latest` stays per the plan's locked decision.

- **GitHub repo slug**: `hexclave/stack-auth` → `hexclave/hexclave` in
every `package.json` `repository` field, README link, CHANGELOG
raw-asset URL.

## Carve-outs (deliberately untouched)

-
**[`apps/backend/src/lib/tokens.tsx`](apps/backend/src/lib/tokens.tsx)**
JWT issuer dual-accept table — PR 1 intentional infrastructure, kept
indefinitely.
- **Legacy `./docs/` folder** — per scoping decision (only
`docs-mintlify/` rewritten).
- **`unified-docs-widget` hostname allowlist** — accepts both
`.hexclave.com` (canonical) and `.stack-auth.com` (transition window)
for DNS rollout.
- **`url-targets.ts`** hosted-domain default
`.built-with-stack-auth.com` — wire identifier baked into existing
customer deploys; indefinite read-fallback.
- **Binary visual assets** (logos, favicons, OG images, README
screenshots) — out of scope for this PR. Need design work; tracked
separately.

## Verification

- **`pnpm typecheck`** on
`packages/{template,stack-shared,react,stack,js}` + `apps/dashboard`:
**all green**. The remaining backend / e-commerce-demo typecheck errors
are pre-existing (Prisma codegen output +
`./generated/api-versions.json` not present in fresh worktrees without
`pnpm run codegen-prisma` + a live DB) and unrelated to this diff.
- **`pnpm lint`** on the same 6 packages: all green.
- **Final grep** for residual `Stack Auth` / `stack-auth.com` /
`@stackframe/stack-cli@latest` references: zero outside the intentional
carve-outs above.
- **25 e2e test files updated in lockstep** with the known-error message
changes (asserted strings flipped to match the new x-hexclave-* +
compat-note messages).

## Deploy blockers (ops sequencing before this rebrand goes live)

This PR is code-complete, but the rebrand's visible surfaces (SDK
default URLs, dashboard links, npm READMEs, REST error messages, runtime
deprecation warning) all point at `*.hexclave.com` / `@hexclave/*`
resources that don't exist yet. None of these are fixable from a PR —
they're ops/registrar/npm work that has to be sequenced before merging
this to a release tag.

Suggested ordering, hardest blockers first:

### Tier 1 — required before customer-facing deploy (everything below
this line *will visibly break customers on day 1* if skipped)

1. **DNS + TLS for `api.hexclave.com` + `api1./api2.hexclave.com`** →
must point at the same backend that serves `api.stack-auth.com` (or a
backend that mirrors PR 1's dual-accept). The SDK's new `defaultBaseUrl`
is `https://api.hexclave.com`; every customer that relied on the old
default and upgrades to a post-PR2 SDK build sends API requests here.
Until this resolves, every default-config customer's API call NXDOMAINs.
2. **DNS for `app.hexclave.com`** → the dashboard. Referenced in the
SDK's default-error messages ("Please create a project on the Hexclave
dashboard at https://app.hexclave.com"), the init-stack flow's
`wizard-congrats` redirect, and the OAuth dashboard handoff.
3. **DNS for `docs.hexclave.com`** + Mintlify deploy → the SDK runtime
deprecation warning (`https://docs.hexclave.com/migration`), every
README, every "Learn more" link in the dashboard, and every REST API
error body (`/api/overview#authentication`) points here. The MDX is in
this PR; the docs build target needs DNS.
4. **DNS for `mcp.hexclave.com`** → the MCP server endpoint that every
taught agent integration (`claude mcp add ...`, `cursor`, `codex`,
`vscode`) registers. Until this resolves, every `npx
@hexclave/cli@latest init` MCP-registration step fails.
5. **Reserve the `@hexclave` npm scope + set repo variable
`HEXCLAVE_VERSION`** → the mirror-publish step in
`.github/workflows/npm-publish.yaml` is gated on this variable. Without
it, the entire taught onboarding command `npx @hexclave/cli@latest init`
404s from the npm registry, *and* every README that says "install
`@hexclave/next`" leads to install failure. Pick the initial version
intentionally (`1.0.0` or aligned to `@stackframe/stack`); don't accept
a silent default.

### Tier 2 — required before announcing the rebrand publicly (lookalike
or low-traffic surfaces, but visibly broken)

6. **DNS for `r.hexclave.com`** → the analytics beacon
`defaultAnalyticsBaseUrl`. Silent failure if missing (analytics drops),
but should land alongside Tier 1.
7. **Register `sent-with-hexclave.com` + full email auth (SPF / DKIM /
DMARC)** → the new default sender domain for shared-sender transactional
emails. Without it the dashboard "send test email" path emits bounces,
and shared-sender flows (`getSharedEmailConfig("Hexclave")`) deliver to
spam at best.
8. **MX + SPF / DMARC for `hexclave.com`** → `team@hexclave.com` and
`security@hexclave.com` mailboxes. The security disclosure mailbox is
referenced in [`.github/SECURITY.md`](.github/SECURITY.md);
`team@hexclave.com` is the actual recipient of internal feedback emails
sent at runtime by
[`apps/backend/src/lib/internal-feedback-emails.tsx`](apps/backend/src/lib/internal-feedback-emails.tsx).
Today, every runtime feedback email bounces.
9. **DNS for `skill.hexclave.com`** → the canonical AI-agent skill fetch
URL (the agent bootstrap pivot). Without it, the entire "agent downloads
`SKILL.md` from a known URL" flow taught in
[`packages/stack-shared/src/helpers/init-prompt.ts`](packages/stack-shared/src/helpers/init-prompt.ts)
fails.
10. **Create `github.com/hexclave/hexclave` as a public repo** (even as
a redirect to `hexclave/stack-auth`) **OR** rewrite every `package.json`
`"repository"` field + dashboard footer "view on GitHub" link to point
at `hexclave/stack-auth` (which already exists). Currently every npm
package page's "Repository" link is dead, and the dashboard's GitHub
button + dev-tool repo link are dead.

### Tier 3 — broken but low-visibility / low-traffic

11. **DNS for `discord.hexclave.com`** → Discord invite redirect, used
in every README's chip and the dashboard footer.
12. **DNS for `demo.hexclave.com`** → " Demo" badge in every npm
package README. Broken-image badge on the package page.
13. **DNS + TLS for `built-with-hexclave.com`** → optional
hosted-handler domain (the default reverted to
`.built-with-stack-auth.com` in this PR's carve-outs, so this only
matters for projects that manually flip).

## Other follow-ups (not deploy-blocking)

- **E2E snapshot regen across the full suite** for the dual-emitted
`x-hexclave-*` response headers (PR 1 follow-up; `vitest -u` in CI
absorbs).
- **Binary visual assets** — logos, favicons, OG images, README
screenshots; need design pass.
- **Backend OpenAPI fumadocs regen** in CI flow — the JSON files in
`docs-mintlify/openapi/` are committed but regen runs in CI. Verify the
workflow that does this still works against the post-PR2 source.
- **Backend typecheck infra debt** — needs `codegen-prisma` +
`codegen-route-info` to clear; pre-existing, unaffected by this PR.

## Test plan

- [ ] CI runs full e2e suite (with `vitest -u` to absorb residual
snapshot deltas, then committed back).
- [ ] Spot-check: new `@hexclave/cli init` (once published) generates
`hexclave.config.ts` and works against a fresh project.
- [ ] Spot-check: existing customer with `@stackframe/stack` import sees
the once-per-process `console.warn` recommending `@hexclave/next` on SDK
init.
- [ ] Manual: dashboard setup page renders the `npx @hexclave/cli@latest
init` snippet and the `x-hexclave-publishable-client-key` API header in
the curl example.
- [ ] Manual: a fresh `pnpm run prisma migrate` against a clean DB sets
the internal project displayName to 'Hexclave Dashboard'.

---------

Co-authored-by: Konstantin Wohlwend <n2d4xc@gmail.com>
2026-05-26 19:18:20 -07:00

8514 lines
292 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Hexclave REST API",
"version": "1.0.0",
"description": "The Hexclave REST API. All request headers are documented as canonical `X-Hexclave-*`; the equivalent `X-Stack-*` aliases are accepted on every endpoint for backwards compatibility. Response headers `X-Hexclave-actual-status`, `X-Hexclave-known-error`, and `X-Hexclave-request-id` are emitted alongside their legacy `X-Stack-*` equivalents."
},
"servers": [
{
"url": "https://api.hexclave.com/api/v1",
"description": "Hexclave REST API"
}
],
"paths": {
"/": {
"get": {
"summary": "/api/v1",
"description": "Returns a human-readable message with some useful information about the API.",
"parameters": [
{
"name": "X-Hexclave-Project-Id",
"in": "header",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"required": false
},
{
"name": "X-Hexclave-Branch-Id",
"in": "header",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"required": false
},
{
"name": "X-Hexclave-Access-Type",
"in": "header",
"schema": {
"type": "string",
"enum": [
"client",
"server",
"admin"
]
},
"required": false
},
{
"name": "X-Hexclave-Access-Token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Hexclave-Refresh-Token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Hexclave-Publishable-Client-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Hexclave-Secret-Server-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Hexclave-Super-Secret-Admin-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Project-Id",
"in": "header",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"required": false
},
{
"name": "X-Stack-Branch-Id",
"in": "header",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"required": false
},
{
"name": "X-Stack-Access-Type",
"in": "header",
"schema": {
"type": "string",
"enum": [
"client",
"server",
"admin"
]
},
"required": false
},
{
"name": "X-Stack-Access-Token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Refresh-Token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Publishable-Client-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Secret-Server-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Super-Secret-Admin-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [],
"x-full-url": "https://api.hexclave.com/api/v1/",
"responses": {
"200": {
"description": "Successful response",
"content": {
"text/plain": {
"schema": {
"type": "string",
"example": "Welcome to the Hexclave API endpoint! Please refer to the documentation at https://docs.hexclave.com/\n\nAuthentication: None"
}
}
}
}
}
}
},
"/auth/anonymous/sign-up": {
"post": {
"summary": "Sign up anonymously",
"description": "Create a new anonymous account with no email",
"parameters": [],
"tags": [
"Anonymous"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/anonymous/sign-up",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
},
"user_id": {
"type": "string"
}
},
"required": [
"access_token",
"refresh_token",
"user_id"
]
}
}
}
}
}
}
},
"/team-api-keys": {
"get": {
"summary": "List team API keys",
"description": "List all team API keys for the project with their metadata and status",
"parameters": [
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-api-keys",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"team"
]
},
"team_id": {
"type": "string"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"team_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
},
"post": {
"summary": "Create team API key",
"description": "Create a new API key for a user or team",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"team_id": {
"type": "string"
}
},
"required": [
"description",
"team_id"
],
"example": {}
}
}
}
},
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-api-keys",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"team"
]
},
"team_id": {
"type": "string"
}
},
"required": [
"value",
"id",
"description",
"created_at_millis",
"is_public",
"type",
"team_id"
]
}
}
}
}
}
}
},
"/team-api-keys/{api_key_id}": {
"get": {
"summary": "Get team API key details",
"description": "Get details of a specific team API key",
"parameters": [
{
"name": "api_key_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-api-keys/{api_key_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"team"
]
},
"team_id": {
"type": "string"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"team_id"
]
}
}
}
}
}
},
"patch": {
"summary": "Update team API key",
"description": "Update an team API key",
"parameters": [
{
"name": "api_key_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"revoked": {
"type": "boolean"
}
},
"example": {}
}
}
}
},
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-api-keys/{api_key_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"team"
]
},
"team_id": {
"type": "string"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"team_id"
]
}
}
}
}
}
}
},
"/user-api-keys": {
"get": {
"summary": "List user API keys",
"description": "List all user API keys for the project with their metadata and status",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/user-api-keys",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"user"
]
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"user_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
},
"post": {
"summary": "Create user API key",
"description": "Create a new API key for a user or team",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"description",
"user_id"
],
"example": {
"user_id": "3241a285-8329-4d69-8f3d-316e08cf140c"
}
}
}
}
},
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/user-api-keys",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"user"
]
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"value",
"id",
"description",
"created_at_millis",
"is_public",
"type",
"user_id"
]
}
}
}
}
}
}
},
"/user-api-keys/{api_key_id}": {
"get": {
"summary": "Get user API key details",
"description": "Get details of a specific user API key",
"parameters": [
{
"name": "api_key_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/user-api-keys/{api_key_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"user"
]
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"user_id"
]
}
}
}
}
}
},
"patch": {
"summary": "Update user API key",
"description": "Update an user API key",
"parameters": [
{
"name": "api_key_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"revoked": {
"type": "boolean"
}
},
"example": {}
}
}
}
},
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/user-api-keys/{api_key_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"user"
]
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"user_id"
]
}
}
}
}
}
}
},
"/auth/cli": {
"post": {
"summary": "Initiate CLI authentication",
"description": "Create a new CLI authentication session and return polling and login codes",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"expires_in_millis": {
"type": "number",
"default": 120000
},
"anon_refresh_token": {
"type": "string"
}
},
"example": {}
}
}
}
},
"tags": [
"CLI Authentication"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/cli",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"polling_code": {
"type": "string"
},
"login_code": {
"type": "string"
},
"expires_at": {
"type": "string"
}
},
"required": [
"polling_code",
"login_code",
"expires_at"
]
}
}
}
}
}
}
},
"/auth/cli/complete": {
"post": {
"summary": "Complete CLI authentication",
"description": "Inspect, claim, or complete a CLI authentication session",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"login_code": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"check",
"claim-anon-session",
"complete"
],
"default": "complete"
},
"refresh_token": {
"type": "string"
}
},
"required": [
"login_code"
],
"example": {}
}
}
}
},
"tags": [
"CLI Authentication"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/cli/complete",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/cli/poll": {
"post": {
"summary": "Poll CLI authentication status",
"description": "Check the status of a CLI authentication session using the polling code",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"polling_code": {
"type": "string"
}
},
"required": [
"polling_code"
],
"example": {}
}
}
}
},
"tags": [
"CLI Authentication"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/cli/poll",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"waiting",
"success",
"expired",
"used"
]
},
"refresh_token": {
"type": "string"
}
},
"required": [
"status"
]
}
}
}
},
"201": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"waiting",
"success",
"expired",
"used"
]
},
"refresh_token": {
"type": "string"
}
},
"required": [
"status"
]
}
}
}
}
}
}
},
"/connected-accounts/{user_id}": {
"get": {
"summary": "List connected accounts",
"description": "Retrieves a list of all connected accounts for a user.",
"parameters": [
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
}
],
"tags": [
"Connected Accounts"
],
"x-full-url": "https://api.hexclave.com/api/v1/connected-accounts/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"provider": {
"type": "string",
"example": "google",
"description": "Provider config ID of the OAuth provider. This uniquely identifies the provider config on config.json file"
},
"provider_account_id": {
"type": "string",
"example": "google-account-id-12345",
"description": "Account ID of the OAuth provider. This uniquely identifies the account on the provider side."
}
},
"required": [
"user_id",
"provider",
"provider_account_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/contact-channels": {
"get": {
"summary": "List contact channels",
"description": "Retrieves a list of all contact channels for a user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the contact channel"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_verified": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel has been verified. If this is set to `true`, the contact channel has been verified to belong to the user."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"id",
"value",
"type",
"used_for_auth",
"is_verified",
"is_primary"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
},
"post": {
"summary": "Create a contact channel",
"description": "Add a new contact channel for a user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"value",
"type",
"used_for_auth"
],
"example": {
"user_id": "3241a285-8329-4d69-8f3d-316e08cf140c",
"value": "johndoe@example.com",
"type": "email",
"used_for_auth": true,
"is_primary": true
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels",
"responses": {
"201": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the contact channel"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_verified": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel has been verified. If this is set to `true`, the contact channel has been verified to belong to the user."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"id",
"value",
"type",
"used_for_auth",
"is_verified",
"is_primary"
]
}
}
}
}
}
}
},
"/contact-channels/verify": {
"post": {
"summary": "Verify an email",
"description": "Verify an email address of a user",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/verify",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/contact-channels/verify/check-code": {
"post": {
"summary": "Check email verification code",
"description": "Check if an email verification code is valid without using it",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/verify/check-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"is_code_valid": {
"type": "boolean"
}
},
"required": [
"is_code_valid"
]
}
}
}
}
}
}
},
"/contact-channels/{user_id}/{contact_channel_id}": {
"get": {
"summary": "Get a contact channel",
"description": "Retrieves a specific contact channel by the user ID and the contact channel ID.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "me",
"description": "the user that the contact channel belongs to"
},
"description": "the user that the contact channel belongs to",
"required": true
},
{
"name": "contact_channel_id",
"in": "path",
"schema": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "the target contact channel"
},
"description": "the target contact channel",
"required": true
}
],
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/{user_id}/{contact_channel_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the contact channel"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_verified": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel has been verified. If this is set to `true`, the contact channel has been verified to belong to the user."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"id",
"value",
"type",
"used_for_auth",
"is_verified",
"is_primary"
]
}
}
}
}
}
},
"delete": {
"summary": "Delete a contact channel",
"description": "Removes a contact channel for a given user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "me",
"description": "the user that the contact channel belongs to"
},
"description": "the user that the contact channel belongs to",
"required": true
},
{
"name": "contact_channel_id",
"in": "path",
"schema": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "the target contact channel"
},
"description": "the target contact channel",
"required": true
}
],
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/{user_id}/{contact_channel_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
},
"patch": {
"summary": "Update a contact channel",
"description": "Updates an existing contact channel. Only the values provided will be updated.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "me",
"description": "the user that the contact channel belongs to"
},
"description": "the user that the contact channel belongs to",
"required": true
},
{
"name": "contact_channel_id",
"in": "path",
"schema": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "the target contact channel"
},
"description": "the target contact channel",
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"example": {
"value": "johndoe@example.com",
"type": "email",
"used_for_auth": true,
"is_primary": true
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/{user_id}/{contact_channel_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the contact channel"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_verified": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel has been verified. If this is set to `true`, the contact channel has been verified to belong to the user."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"id",
"value",
"type",
"used_for_auth",
"is_verified",
"is_primary"
]
}
}
}
}
}
}
},
"/contact-channels/{user_id}/{contact_channel_id}/send-verification-code": {
"post": {
"summary": "Send contact channel verification code",
"description": "Send a code to the user's contact channel for verifying the contact channel.",
"parameters": [
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "me",
"description": "The user to send the verification code to."
},
"description": "The user to send the verification code to.",
"required": true
},
{
"name": "contact_channel_id",
"in": "path",
"schema": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The contact channel to send the verification code to."
},
"description": "The contact channel to send the verification code to.",
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"callback_url": {
"type": "string",
"example": "https://example.com/handler/email-verification",
"description": "The base callback URL to construct a verification link for the verification e-mail. A query parameter `code` with the verification code will be appended to it. The page should then make a request to the `/contact-channels/verify` endpoint."
}
},
"required": [
"callback_url"
],
"example": {
"callback_url": "https://example.com/handler/email-verification"
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/{user_id}/{contact_channel_id}/send-verification-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/internal/dogfood/support/conversations": {
"get": {
"summary": "List conversations for the current user",
"description": "List conversations visible to the currently authenticated user",
"parameters": [
{
"name": "query",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "offset",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"Conversations"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/dogfood/support/conversations",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conversations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"conversation_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"team_id": {
"type": "string"
},
"user_display_name": {
"type": "string"
},
"user_primary_email": {
"type": "string"
},
"user_profile_image_url": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string"
},
"priority": {
"type": "string"
},
"source": {
"type": "string"
},
"last_message_type": {
"type": "string"
},
"preview": {
"type": "string"
},
"last_activity_at": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"assigned_to_user_id": {
"type": "string"
},
"assigned_to_display_name": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"first_response_due_at": {
"type": "string"
},
"first_response_at": {
"type": "string"
},
"next_response_due_at": {
"type": "string"
},
"last_customer_reply_at": {
"type": "string"
},
"last_agent_reply_at": {
"type": "string"
}
},
"required": [
"tags"
]
}
},
"required": [
"conversation_id",
"subject",
"status",
"priority",
"source",
"last_message_type",
"last_activity_at",
"metadata"
]
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"conversations",
"has_more"
]
}
}
}
}
}
},
"post": {
"summary": "Create a conversation",
"description": "Create a new conversation as the current user",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subject": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"subject",
"message"
],
"example": {}
}
}
}
},
"tags": [
"Conversations"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/dogfood/support/conversations",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conversation_id": {
"type": "string"
}
},
"required": [
"conversation_id"
]
}
}
}
}
}
}
},
"/internal/dogfood/support/conversations/{conversationId}": {
"get": {
"summary": "Get a conversation for the current user",
"description": "Get conversation detail visible to the currently authenticated user",
"parameters": [
{
"name": "conversationId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Conversations"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/dogfood/support/conversations/{conversationId}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conversation": {
"type": "object",
"properties": {
"conversation_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"team_id": {
"type": "string"
},
"user_display_name": {
"type": "string"
},
"user_primary_email": {
"type": "string"
},
"user_profile_image_url": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string"
},
"priority": {
"type": "string"
},
"source": {
"type": "string"
},
"last_message_type": {
"type": "string"
},
"preview": {
"type": "string"
},
"last_activity_at": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"assigned_to_user_id": {
"type": "string"
},
"assigned_to_display_name": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"first_response_due_at": {
"type": "string"
},
"first_response_at": {
"type": "string"
},
"next_response_due_at": {
"type": "string"
},
"last_customer_reply_at": {
"type": "string"
},
"last_agent_reply_at": {
"type": "string"
}
},
"required": [
"tags"
]
}
},
"required": [
"conversation_id",
"subject",
"status",
"priority",
"source",
"last_message_type",
"last_activity_at",
"metadata"
]
},
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"conversation_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"team_id": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string"
},
"priority": {
"type": "string"
},
"source": {
"type": "string"
},
"message_type": {
"type": "string"
},
"body": {
"type": "string"
},
"attachments": {
"type": "array",
"items": {
"type": "object"
}
},
"metadata": {
"type": "object"
},
"created_at": {
"type": "string"
},
"sender": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"display_name": {
"type": "string"
},
"primary_email": {
"type": "string"
}
},
"required": [
"type"
]
}
},
"required": [
"id",
"conversation_id",
"subject",
"status",
"priority",
"source",
"message_type",
"attachments",
"created_at",
"sender"
]
}
}
},
"required": [
"conversation",
"messages"
]
}
}
}
}
}
},
"patch": {
"summary": "Reply to a conversation",
"description": "Append a user message to an existing conversation",
"parameters": [
{
"name": "conversationId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"example": {}
}
}
}
},
"tags": [
"Conversations"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/dogfood/support/conversations/{conversationId}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conversation": {
"type": "object",
"properties": {
"conversation_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"team_id": {
"type": "string"
},
"user_display_name": {
"type": "string"
},
"user_primary_email": {
"type": "string"
},
"user_profile_image_url": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string"
},
"priority": {
"type": "string"
},
"source": {
"type": "string"
},
"last_message_type": {
"type": "string"
},
"preview": {
"type": "string"
},
"last_activity_at": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"assigned_to_user_id": {
"type": "string"
},
"assigned_to_display_name": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"first_response_due_at": {
"type": "string"
},
"first_response_at": {
"type": "string"
},
"next_response_due_at": {
"type": "string"
},
"last_customer_reply_at": {
"type": "string"
},
"last_agent_reply_at": {
"type": "string"
}
},
"required": [
"tags"
]
}
},
"required": [
"conversation_id",
"subject",
"status",
"priority",
"source",
"last_message_type",
"last_activity_at",
"metadata"
]
},
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"conversation_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"team_id": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string"
},
"priority": {
"type": "string"
},
"source": {
"type": "string"
},
"message_type": {
"type": "string"
},
"body": {
"type": "string"
},
"attachments": {
"type": "array",
"items": {
"type": "object"
}
},
"metadata": {
"type": "object"
},
"created_at": {
"type": "string"
},
"sender": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"display_name": {
"type": "string"
},
"primary_email": {
"type": "string"
}
},
"required": [
"type"
]
}
},
"required": [
"id",
"conversation_id",
"subject",
"status",
"priority",
"source",
"message_type",
"attachments",
"created_at",
"sender"
]
}
}
},
"required": [
"conversation",
"messages"
]
}
}
}
}
}
}
},
"/emails/notification-preference/{user_id}": {
"get": {
"summary": "List notification preferences",
"description": "Get all notification preferences for a user, showing which notification categories are enabled or disabled.",
"parameters": [
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
}
],
"tags": [
"Emails"
],
"x-full-url": "https://api.hexclave.com/api/v1/emails/notification-preference/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"notification_category_id": {
"type": "string"
},
"notification_category_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"can_disable": {
"type": "boolean"
}
},
"required": [
"notification_category_id",
"notification_category_name",
"enabled",
"can_disable"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/emails/notification-preference/{user_id}/{notification_category_id}": {
"patch": {
"summary": "Update notification preference",
"description": "Enable or disable a specific notification category for a user.",
"parameters": [
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
},
{
"name": "notification_category_id",
"in": "path",
"schema": {
"type": "string"
},
"required": false
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
},
"required": [
"enabled"
],
"example": {}
}
}
}
},
"tags": [
"Emails"
],
"x-full-url": "https://api.hexclave.com/api/v1/emails/notification-preference/{user_id}/{notification_category_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_category_id": {
"type": "string"
},
"notification_category_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"can_disable": {
"type": "boolean"
}
},
"required": [
"notification_category_id",
"notification_category_name",
"enabled",
"can_disable"
]
}
}
}
}
}
}
},
"/internal/feature-requests": {
"get": {
"summary": "Get feature requests",
"description": "Fetch all feature requests with upvote status for the current user",
"parameters": [],
"tags": [
"Internal"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/feature-requests",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"posts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"upvotes": {
"type": "number"
},
"date": {
"type": "string"
},
"postStatus": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"required": [
"name",
"color"
]
},
"userHasUpvoted": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"upvotes",
"date",
"userHasUpvoted"
]
}
}
},
"required": [
"posts"
]
}
}
}
}
}
},
"post": {
"summary": "Create feature request",
"description": "Create a new feature request",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"category": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"commentsAllowed": {
"type": "boolean"
},
"customInputValues": {
"type": "object",
"properties": {},
"required": []
}
},
"required": [
"title"
],
"example": {}
}
}
}
},
"tags": [
"Internal"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/feature-requests",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"id": {
"type": "string"
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/internal/feature-requests/{featureRequestId}/upvote": {
"post": {
"summary": "Toggle upvote on feature request",
"description": "Toggle upvote on a feature request for the current user",
"parameters": [
{
"name": "featureRequestId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {},
"example": {}
}
}
}
},
"tags": [
"Internal"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/feature-requests/{featureRequestId}/upvote",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"upvoted": {
"type": "boolean"
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/internal/feedback": {
"post": {
"summary": "Submit support feedback",
"description": "Send a support feedback message to the internal Hexclave inbox. Auth is optional — works from both the dashboard (authenticated) and the dev tool (unauthenticated).",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"message": {
"type": "string"
},
"feedback_type": {
"type": "string",
"enum": [
"feedback",
"bug"
]
}
},
"required": [
"email",
"message"
],
"example": {}
}
}
}
},
"tags": [
"Internal"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/feedback",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/internal/preview/create-project": {
"post": {
"summary": "Create a preview project",
"description": "Creates a new project pre-filled with dummy data for the preview environment. Only available when NEXT_PUBLIC_STACK_IS_PREVIEW=true.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {},
"example": {}
}
}
}
},
"tags": [
"Internal"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/preview/create-project",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"project_id": {
"type": "string"
}
},
"required": [
"project_id"
]
}
}
}
}
}
}
},
"/auth/oauth/authorize/{provider_id}": {
"get": {
"summary": "OAuth authorize endpoint",
"description": "This endpoint is used to initiate the OAuth authorization flow. there are two purposes for this endpoint: 1. Authenticate a user with an OAuth provider. 2. Link an existing user with an OAuth provider.",
"parameters": [
{
"name": "type",
"in": "query",
"schema": {
"type": "string",
"enum": [
"authenticate",
"link"
],
"default": "authenticate"
},
"required": false
},
{
"name": "token",
"in": "query",
"schema": {
"type": "string",
"default": ""
},
"required": false
},
{
"name": "provider_scope",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "error_redirect_uri",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "after_callback_redirect_url",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "stack_response_mode",
"in": "query",
"schema": {
"type": "string",
"enum": [
"json",
"redirect"
],
"description": "Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided."
},
"description": "Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided.",
"required": false
},
{
"name": "hexclave_response_mode",
"in": "query",
"schema": {
"type": "string",
"enum": [
"json",
"redirect"
],
"description": "Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided."
},
"description": "Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided.",
"required": false
},
{
"name": "bot_challenge_token",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "bot_challenge_phase",
"in": "query",
"schema": {
"type": "string",
"enum": [
"invisible",
"visible"
]
},
"required": false
},
{
"name": "bot_challenge_unavailable",
"in": "query",
"schema": {
"type": "string",
"enum": [
"true"
]
},
"required": false
},
{
"name": "client_id",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "client_secret",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "redirect_uri",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "scope",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "state",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "grant_type",
"in": "query",
"schema": {
"type": "string",
"enum": [
"authorization_code"
]
},
"required": true
},
{
"name": "code_challenge",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "code_challenge_method",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "response_type",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "provider_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/oauth/authorize/{provider_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"location": {
"type": "string"
}
},
"required": [
"location"
]
}
}
}
},
"307": {
"description": "Successful response",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/auth/oauth/cross-domain/authorize": {
"post": {
"summary": "Create cross-domain auth handoff redirect",
"description": "Creates a one-time OAuth authorization code redirect for cross-domain sign-in handoff using PKCE.",
"parameters": [
{
"name": "x-stack-publishable-client-key",
"in": "header",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "x-stack-refresh-token",
"in": "header",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"redirect_uri": {
"type": "string"
},
"state": {
"type": "string"
},
"code_challenge": {
"type": "string"
},
"code_challenge_method": {
"type": "string",
"enum": [
"S256"
],
"default": "S256"
},
"after_callback_redirect_url": {
"type": "string"
}
},
"required": [
"redirect_uri",
"state",
"code_challenge"
],
"example": {}
}
}
}
},
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/oauth/cross-domain/authorize",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"redirect_url": {
"type": "string"
}
},
"required": [
"redirect_url"
]
}
}
}
}
}
}
},
"/auth/oauth/token": {
"post": {
"summary": "OAuth token endpoints",
"description": "This endpoint is used to exchange an authorization code or refresh token for an access token.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"grant_type": {
"type": "string",
"enum": [
"authorization_code",
"refresh_token"
]
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
}
},
"required": [
"grant_type"
],
"example": {}
}
}
}
},
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/oauth/token",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/oauth-providers": {
"get": {
"summary": "List OAuth providers",
"description": "Retrieves a list of all OAuth providers for a user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/oauth-providers",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the OAuth provider"
},
"email": {
"type": "string",
"example": "test@gmail.com",
"description": "Email of the OAuth provider. This is used to display and identify the OAuth provider in the UI."
},
"provider_config_id": {
"type": "string",
"example": "google",
"description": "Provider config ID of the OAuth provider. This uniquely identifies the provider config on config.json file"
},
"type": {
"type": "string",
"enum": [
"google",
"github",
"microsoft",
"spotify",
"facebook",
"discord",
"gitlab",
"bitbucket",
"linkedin",
"apple",
"x",
"twitch"
],
"example": "google",
"description": "OAuth provider type, one of `google`, `github`, `microsoft`, `spotify`, `facebook`, `discord`, `gitlab`, `bitbucket`, `linkedin`, `apple`, `x`, `twitch`"
},
"allow_sign_in": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to `true`."
},
"allow_connected_accounts": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`."
}
},
"required": [
"user_id",
"id",
"provider_config_id",
"type",
"allow_sign_in",
"allow_connected_accounts"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/oauth-providers/{user_id}/{provider_id}": {
"get": {
"summary": "Get an OAuth provider",
"description": "Retrieves a specific OAuth provider by the user ID and the OAuth provider ID.",
"parameters": [
{
"name": "provider_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/oauth-providers/{user_id}/{provider_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the OAuth provider"
},
"email": {
"type": "string",
"example": "test@gmail.com",
"description": "Email of the OAuth provider. This is used to display and identify the OAuth provider in the UI."
},
"provider_config_id": {
"type": "string",
"example": "google",
"description": "Provider config ID of the OAuth provider. This uniquely identifies the provider config on config.json file"
},
"type": {
"type": "string",
"enum": [
"google",
"github",
"microsoft",
"spotify",
"facebook",
"discord",
"gitlab",
"bitbucket",
"linkedin",
"apple",
"x",
"twitch"
],
"example": "google",
"description": "OAuth provider type, one of `google`, `github`, `microsoft`, `spotify`, `facebook`, `discord`, `gitlab`, `bitbucket`, `linkedin`, `apple`, `x`, `twitch`"
},
"allow_sign_in": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to `true`."
},
"allow_connected_accounts": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`."
}
},
"required": [
"user_id",
"id",
"provider_config_id",
"type",
"allow_sign_in",
"allow_connected_accounts"
]
}
}
}
}
}
},
"delete": {
"summary": "Delete an OAuth provider",
"description": "Removes an OAuth provider for a given user.",
"parameters": [
{
"name": "provider_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/oauth-providers/{user_id}/{provider_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
},
"patch": {
"summary": "Update an OAuth provider",
"description": "Updates an existing OAuth provider for a user.",
"parameters": [
{
"name": "provider_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"allow_sign_in": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to `true`."
},
"allow_connected_accounts": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`."
}
},
"example": {
"allow_sign_in": true,
"allow_connected_accounts": true
}
}
}
}
},
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/oauth-providers/{user_id}/{provider_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the OAuth provider"
},
"email": {
"type": "string",
"example": "test@gmail.com",
"description": "Email of the OAuth provider. This is used to display and identify the OAuth provider in the UI."
},
"provider_config_id": {
"type": "string",
"example": "google",
"description": "Provider config ID of the OAuth provider. This uniquely identifies the provider config on config.json file"
},
"type": {
"type": "string",
"enum": [
"google",
"github",
"microsoft",
"spotify",
"facebook",
"discord",
"gitlab",
"bitbucket",
"linkedin",
"apple",
"x",
"twitch"
],
"example": "google",
"description": "OAuth provider type, one of `google`, `github`, `microsoft`, `spotify`, `facebook`, `discord`, `gitlab`, `bitbucket`, `linkedin`, `apple`, `x`, `twitch`"
},
"allow_sign_in": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to `true`."
},
"allow_connected_accounts": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`."
}
},
"required": [
"user_id",
"id",
"provider_config_id",
"type",
"allow_sign_in",
"allow_connected_accounts"
]
}
}
}
}
}
}
},
"/internal/ai-conversations": {
"get": {
"summary": "List AI conversations",
"description": "List AI conversations for the current user filtered by project",
"parameters": [
{
"name": "projectId",
"in": "query",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/ai-conversations",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conversations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"projectId": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"title",
"projectId",
"updatedAt"
]
}
}
},
"required": [
"conversations"
]
}
}
}
}
}
},
"post": {
"summary": "Create AI conversation",
"description": "Create a new AI conversation with optional initial messages",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"projectId": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"user",
"assistant"
]
},
"content": {
"type": "object"
}
},
"required": [
"role",
"content"
]
}
}
},
"required": [
"title",
"projectId",
"messages"
],
"example": {}
}
}
}
},
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/ai-conversations",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
]
}
}
}
}
}
}
},
"/internal/ai-conversations/{conversationId}": {
"get": {
"summary": "Get AI conversation",
"description": "Fetch a single AI conversation with all its messages",
"parameters": [
{
"name": "conversationId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/ai-conversations/{conversationId}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"projectId": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"role": {
"type": "string"
},
"content": {
"type": "object"
}
},
"required": [
"id",
"role",
"content"
]
}
}
},
"required": [
"id",
"title",
"projectId",
"messages"
]
}
}
}
}
}
},
"delete": {
"summary": "Delete AI conversation",
"description": "Delete an AI conversation and all its messages",
"parameters": [
{
"name": "conversationId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/ai-conversations/{conversationId}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}
},
"patch": {
"summary": "Update AI conversation",
"description": "Update the title of an AI conversation",
"parameters": [
{
"name": "conversationId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
}
},
"required": [
"title"
],
"example": {}
}
}
}
},
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/ai-conversations/{conversationId}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}
}
},
"/internal/ai-conversations/{conversationId}/messages": {
"put": {
"summary": "Replace conversation messages",
"description": "Replace all messages in a conversation",
"parameters": [
{
"name": "conversationId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"user",
"assistant"
]
},
"content": {
"type": "object"
}
},
"required": [
"role",
"content"
]
}
}
},
"required": [
"messages"
],
"example": {}
}
}
}
},
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/ai-conversations/{conversationId}/messages",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}
}
},
"/internal/conversations": {
"get": {
"summary": "List conversations",
"description": "List conversations for a managed project",
"parameters": [
{
"name": "projectId",
"in": "query",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"required": true
},
{
"name": "query",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "status",
"in": "query",
"schema": {
"type": "string",
"enum": [
"open",
"pending",
"closed"
]
},
"required": false
},
{
"name": "userId",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"description": "The unique identifier of the user",
"required": false
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "offset",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/conversations",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conversations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"conversationId": {
"type": "string"
},
"userId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"userDisplayName": {
"type": "string"
},
"userPrimaryEmail": {
"type": "string"
},
"userProfileImageUrl": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"open",
"pending",
"closed"
]
},
"priority": {
"type": "string",
"enum": [
"low",
"normal",
"high",
"urgent"
]
},
"source": {
"type": "string",
"enum": [
"manual",
"chat",
"email",
"api"
]
},
"lastMessageType": {
"type": "string",
"enum": [
"message",
"internal-note",
"status-change"
]
},
"preview": {
"type": "string"
},
"lastActivityAt": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"assignedToUserId": {
"type": "string"
},
"assignedToDisplayName": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"firstResponseDueAt": {
"type": "string"
},
"firstResponseAt": {
"type": "string"
},
"nextResponseDueAt": {
"type": "string"
},
"lastCustomerReplyAt": {
"type": "string"
},
"lastAgentReplyAt": {
"type": "string"
}
},
"required": [
"tags"
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"lastMessageAt": {
"type": "string"
},
"lastInboundAt": {
"type": "string"
},
"lastOutboundAt": {
"type": "string"
},
"closedAt": {
"type": "string"
},
"recordMetadata": {
"type": "object"
}
},
"required": [
"conversationId",
"subject",
"status",
"priority",
"source",
"lastMessageType",
"lastActivityAt",
"metadata"
]
}
},
"hasMore": {
"type": "boolean"
}
},
"required": [
"conversations",
"hasMore"
]
}
}
}
}
}
},
"post": {
"summary": "Create conversation",
"description": "Create a managed project conversation for a user",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"projectId": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"userId": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"subject": {
"type": "string"
},
"initialMessage": {
"type": "string"
},
"priority": {
"type": "string",
"enum": [
"low",
"normal",
"high",
"urgent"
]
},
"source": {
"type": "string",
"enum": [
"manual",
"chat",
"email",
"api"
]
}
},
"required": [
"projectId",
"userId",
"subject",
"initialMessage",
"priority"
],
"example": {
"projectId": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"userId": "3241a285-8329-4d69-8f3d-316e08cf140c"
}
}
}
}
},
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/conversations",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conversationId": {
"type": "string"
}
},
"required": [
"conversationId"
]
}
}
}
}
}
}
},
"/internal/conversations/{conversationId}": {
"get": {
"summary": "Get conversation detail",
"description": "Get conversation detail for a managed project",
"parameters": [
{
"name": "projectId",
"in": "query",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"required": true
},
{
"name": "conversationId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/conversations/{conversationId}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conversation": {
"type": "object",
"properties": {
"conversationId": {
"type": "string"
},
"userId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"userDisplayName": {
"type": "string"
},
"userPrimaryEmail": {
"type": "string"
},
"userProfileImageUrl": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"open",
"pending",
"closed"
]
},
"priority": {
"type": "string",
"enum": [
"low",
"normal",
"high",
"urgent"
]
},
"source": {
"type": "string",
"enum": [
"manual",
"chat",
"email",
"api"
]
},
"lastMessageType": {
"type": "string",
"enum": [
"message",
"internal-note",
"status-change"
]
},
"preview": {
"type": "string"
},
"lastActivityAt": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"assignedToUserId": {
"type": "string"
},
"assignedToDisplayName": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"firstResponseDueAt": {
"type": "string"
},
"firstResponseAt": {
"type": "string"
},
"nextResponseDueAt": {
"type": "string"
},
"lastCustomerReplyAt": {
"type": "string"
},
"lastAgentReplyAt": {
"type": "string"
}
},
"required": [
"tags"
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"lastMessageAt": {
"type": "string"
},
"lastInboundAt": {
"type": "string"
},
"lastOutboundAt": {
"type": "string"
},
"closedAt": {
"type": "string"
},
"recordMetadata": {
"type": "object"
}
},
"required": [
"conversationId",
"subject",
"status",
"priority",
"source",
"lastMessageType",
"lastActivityAt",
"metadata"
]
},
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"conversationId": {
"type": "string"
},
"userId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"open",
"pending",
"closed"
]
},
"priority": {
"type": "string",
"enum": [
"low",
"normal",
"high",
"urgent"
]
},
"source": {
"type": "string",
"enum": [
"manual",
"chat",
"email",
"api"
]
},
"messageType": {
"type": "string",
"enum": [
"message",
"internal-note",
"status-change"
]
},
"body": {
"type": "string"
},
"attachments": {
"type": "array",
"items": {
"type": "object"
}
},
"metadata": {
"type": "object"
},
"createdAt": {
"type": "string"
},
"sender": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user",
"agent",
"system"
]
},
"id": {
"type": "string"
},
"displayName": {
"type": "string"
},
"primaryEmail": {
"type": "string"
}
},
"required": [
"type"
]
}
},
"required": [
"id",
"conversationId",
"subject",
"status",
"priority",
"source",
"messageType",
"attachments",
"createdAt",
"sender"
]
}
},
"entryPoints": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"channelType": {
"type": "string"
},
"adapterKey": {
"type": "string"
},
"externalChannelId": {
"type": "string"
},
"isEntryPoint": {
"type": "boolean"
},
"metadata": {
"type": "object"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"channelType",
"adapterKey",
"isEntryPoint",
"createdAt",
"updatedAt"
]
}
}
},
"required": [
"conversation",
"messages",
"entryPoints"
]
}
}
}
}
}
},
"patch": {
"summary": "Update conversation",
"description": "Append a message or update conversation attributes on a managed project conversation",
"parameters": [
{
"name": "conversationId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Others"
],
"x-full-url": "https://api.hexclave.com/api/v1/internal/conversations/{conversationId}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conversation": {
"type": "object",
"properties": {
"conversationId": {
"type": "string"
},
"userId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"userDisplayName": {
"type": "string"
},
"userPrimaryEmail": {
"type": "string"
},
"userProfileImageUrl": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"open",
"pending",
"closed"
]
},
"priority": {
"type": "string",
"enum": [
"low",
"normal",
"high",
"urgent"
]
},
"source": {
"type": "string",
"enum": [
"manual",
"chat",
"email",
"api"
]
},
"lastMessageType": {
"type": "string",
"enum": [
"message",
"internal-note",
"status-change"
]
},
"preview": {
"type": "string"
},
"lastActivityAt": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"assignedToUserId": {
"type": "string"
},
"assignedToDisplayName": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"firstResponseDueAt": {
"type": "string"
},
"firstResponseAt": {
"type": "string"
},
"nextResponseDueAt": {
"type": "string"
},
"lastCustomerReplyAt": {
"type": "string"
},
"lastAgentReplyAt": {
"type": "string"
}
},
"required": [
"tags"
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"lastMessageAt": {
"type": "string"
},
"lastInboundAt": {
"type": "string"
},
"lastOutboundAt": {
"type": "string"
},
"closedAt": {
"type": "string"
},
"recordMetadata": {
"type": "object"
}
},
"required": [
"conversationId",
"subject",
"status",
"priority",
"source",
"lastMessageType",
"lastActivityAt",
"metadata"
]
},
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"conversationId": {
"type": "string"
},
"userId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"subject": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"open",
"pending",
"closed"
]
},
"priority": {
"type": "string",
"enum": [
"low",
"normal",
"high",
"urgent"
]
},
"source": {
"type": "string",
"enum": [
"manual",
"chat",
"email",
"api"
]
},
"messageType": {
"type": "string",
"enum": [
"message",
"internal-note",
"status-change"
]
},
"body": {
"type": "string"
},
"attachments": {
"type": "array",
"items": {
"type": "object"
}
},
"metadata": {
"type": "object"
},
"createdAt": {
"type": "string"
},
"sender": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user",
"agent",
"system"
]
},
"id": {
"type": "string"
},
"displayName": {
"type": "string"
},
"primaryEmail": {
"type": "string"
}
},
"required": [
"type"
]
}
},
"required": [
"id",
"conversationId",
"subject",
"status",
"priority",
"source",
"messageType",
"attachments",
"createdAt",
"sender"
]
}
},
"entryPoints": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"channelType": {
"type": "string"
},
"adapterKey": {
"type": "string"
},
"externalChannelId": {
"type": "string"
},
"isEntryPoint": {
"type": "boolean"
},
"metadata": {
"type": "object"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"channelType",
"adapterKey",
"isEntryPoint",
"createdAt",
"updatedAt"
]
}
}
},
"required": [
"conversation",
"messages",
"entryPoints"
]
}
}
}
}
}
}
},
"/auth/mfa/sign-in": {
"post": {
"summary": "MFA sign in",
"description": "Complete multi-factor authorization to sign in, with a TOTP and an MFA attempt code",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"totp"
]
},
"totp": {
"type": "string"
},
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"type",
"totp",
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"OTP"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/mfa/sign-in",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"refresh_token": {
"type": "string",
"example": "i8ns3aq2...14y",
"description": "Long-lived refresh token that can be used to obtain a new access token"
},
"access_token": {
"type": "string",
"example": "eyJhmMiJB2TO...diI4QT",
"description": "Short-lived access token that can be used to authenticate the user"
},
"is_new_user": {
"type": "boolean",
"example": true,
"description": "Whether the user is a new user"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
}
},
"required": [
"refresh_token",
"access_token",
"is_new_user",
"user_id"
]
}
}
}
}
}
}
},
"/auth/otp/send-sign-in-code": {
"post": {
"summary": "Send sign-in code",
"description": "Send a code to the user's email address for sign-in.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"example": "johndoe@example.com",
"description": "The email to sign in with."
},
"callback_url": {
"type": "string",
"example": "https://example.com/handler/magic-link-callback",
"description": "The base callback URL to construct the magic link from. A query parameter `code` with the verification code will be appended to it. The page should then make a request to the `/auth/otp/sign-in` endpoint."
},
"bot_challenge_token": {
"type": "string"
},
"bot_challenge_phase": {
"type": "string",
"enum": [
"invisible",
"visible"
]
},
"bot_challenge_unavailable": {
"type": "string",
"enum": [
"true"
]
}
},
"required": [
"email",
"callback_url"
],
"example": {
"email": "johndoe@example.com",
"callback_url": "https://example.com/handler/magic-link-callback"
}
}
}
}
},
"tags": [
"OTP"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/otp/send-sign-in-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"nonce": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A token that must be stored temporarily and provided when verifying the 6-digit code"
}
},
"required": [
"nonce"
]
}
}
}
}
}
}
},
"/auth/otp/sign-in": {
"post": {
"summary": "Sign in with a code",
"description": "",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45-character verification code. For magic links, this is the code found in the \"code\" URL query parameter. For OTP, this is formed by concatenating the 6-digit code entered by the user with the nonce (received during code creation)"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"OTP"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/otp/sign-in",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"refresh_token": {
"type": "string",
"example": "i8ns3aq2...14y",
"description": "Long-lived refresh token that can be used to obtain a new access token"
},
"access_token": {
"type": "string",
"example": "eyJhmMiJB2TO...diI4QT",
"description": "Short-lived access token that can be used to authenticate the user"
},
"is_new_user": {
"type": "boolean",
"example": true,
"description": "Whether the user is a new user"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
}
},
"required": [
"refresh_token",
"access_token",
"is_new_user",
"user_id"
]
}
}
}
}
}
}
},
"/auth/otp/sign-in/check-code": {
"post": {
"summary": "Check sign in code",
"description": "Check if a sign in code is valid without using it",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45-character verification code. For magic links, this is the code found in the \"code\" URL query parameter. For OTP, this is formed by concatenating the 6-digit code entered by the user with the nonce (received during code creation)"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"OTP"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/otp/sign-in/check-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"is_code_valid": {
"type": "boolean"
}
},
"required": [
"is_code_valid"
]
}
}
}
}
}
}
},
"/auth/password/reset": {
"post": {
"summary": "Reset password with a code",
"description": "Reset password with a code",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"password",
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/reset",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/password/reset/check-code": {
"post": {
"summary": "Check reset password code",
"description": "Check if a reset password code is valid without using it",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/reset/check-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"is_code_valid": {
"type": "boolean"
}
},
"required": [
"is_code_valid"
]
}
}
}
}
}
}
},
"/auth/password/send-reset-code": {
"post": {
"summary": "Send reset password code",
"description": "Send a code to the user's email address for resetting the password.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"callback_url": {
"type": "string"
}
},
"required": [
"email",
"callback_url"
],
"example": {}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/send-reset-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "string",
"enum": [
"maybe, only if user with e-mail exists"
]
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/password/set": {
"post": {
"summary": "Set password",
"description": "Set a new password for the current user",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"password": {
"type": "string"
}
},
"required": [
"password"
],
"example": {}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/set",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/password/sign-in": {
"post": {
"summary": "Sign in with email and password",
"description": "Sign in to an account with email and password",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
}
},
"required": [
"email",
"password"
],
"example": {}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/sign-in",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
},
"user_id": {
"type": "string"
}
},
"required": [
"access_token",
"refresh_token",
"user_id"
]
}
}
}
}
}
}
},
"/auth/password/sign-up": {
"post": {
"summary": "Sign up with email and password",
"description": "Create a new account with email and password",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"example": "johndoe@example.com",
"description": "The email to sign in with."
},
"password": {
"type": "string"
},
"verification_callback_url": {
"type": "string",
"example": "https://example.com/handler/email-verification",
"description": "The base callback URL to construct a verification link for the verification e-mail. A query parameter `code` with the verification code will be appended to it. The page should then make a request to the `/contact-channels/verify` endpoint."
},
"bot_challenge_token": {
"type": "string"
},
"bot_challenge_phase": {
"type": "string",
"enum": [
"invisible",
"visible"
]
},
"bot_challenge_unavailable": {
"type": "string",
"enum": [
"true"
]
}
},
"required": [
"email",
"password"
],
"example": {
"email": "johndoe@example.com",
"verification_callback_url": "https://example.com/handler/email-verification"
}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/sign-up",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
},
"user_id": {
"type": "string"
}
},
"required": [
"access_token",
"refresh_token",
"user_id"
]
}
}
}
}
}
}
},
"/auth/password/update": {
"post": {
"summary": "Update password",
"description": "Update the password of the current user, requires the old password",
"parameters": [
{
"name": "x-stack-refresh-token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"old_password": {
"type": "string"
},
"new_password": {
"type": "string"
}
},
"required": [
"old_password",
"new_password"
],
"example": {}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/update",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/payments/items/{customer_type}/{customer_id}/{item_id}": {
"get": {
"summary": "Get Item",
"description": "Retrieves information about a specific item (credits, quotas, etc.) for a customer.",
"parameters": [
{
"name": "customer_type",
"in": "path",
"schema": {
"type": "string",
"enum": [
"user",
"team",
"custom"
],
"example": "user",
"description": "The type of customer"
},
"description": "The type of customer",
"required": true
},
{
"name": "customer_id",
"in": "path",
"schema": {
"type": "string",
"example": "user_1234567890abcdef",
"description": "The ID of the customer"
},
"description": "The ID of the customer",
"required": true
},
{
"name": "item_id",
"in": "path",
"schema": {
"type": "string",
"example": "credits",
"description": "The ID of the item to retrieve"
},
"description": "The ID of the item to retrieve",
"required": true
}
],
"tags": [
"Payments"
],
"x-full-url": "https://api.hexclave.com/api/v1/payments/items/{customer_type}/{customer_id}/{item_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "credits",
"description": "The ID of the item"
},
"display_name": {
"type": "string",
"example": "API Credits",
"description": "The human-readable name of the item"
},
"quantity": {
"type": "number",
"example": 1000,
"description": "The current quantity of the item (can be negative)"
}
},
"required": [
"id",
"display_name",
"quantity"
]
}
}
}
}
}
}
},
"/payments/purchases/create-purchase-url": {
"post": {
"summary": "Create Purchase URL",
"description": "Creates a secure checkout URL for purchasing a product.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"customer_type": {
"type": "string",
"enum": [
"user",
"team",
"custom"
],
"example": "user",
"description": "The type of customer making the purchase"
},
"customer_id": {
"type": "string",
"example": "user_1234567890abcdef",
"description": "The ID of the customer (user ID, team ID, or custom customer ID)"
},
"product_id": {
"type": "string",
"example": "prod_premium_monthly",
"description": "The ID of the product to purchase. Either this or product_inline should be given."
},
"product_inline": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"customer_type": {
"type": "string",
"enum": [
"user",
"team",
"custom"
]
},
"free_trial": {
"type": "array",
"items": {
"type": "integer"
}
},
"server_only": {
"type": "boolean",
"default": true
},
"stackable": {
"type": "boolean",
"default": false
},
"prices": {
"type": "object",
"properties": {},
"required": []
},
"included_items": {
"type": "object",
"properties": {},
"required": []
},
"client_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
},
"server_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the product here."
}
},
"required": [
"display_name",
"customer_type"
],
"description": "Inline product definition. Either this or product_id should be given."
},
"return_url": {
"type": "string",
"example": "https://myapp.com/purchase-success",
"description": "URL to redirect to after purchase completion. Must be configured as a trusted domain in the project configuration."
}
},
"required": [
"customer_type",
"customer_id"
],
"example": {
"customer_type": "user",
"customer_id": "user_1234567890abcdef",
"product_id": "prod_premium_monthly",
"return_url": "https://myapp.com/purchase-success"
}
}
}
}
},
"tags": [
"Payments"
],
"x-full-url": "https://api.hexclave.com/api/v1/payments/purchases/create-purchase-url",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The secure checkout URL for completing the purchase"
}
},
"required": [
"url"
]
}
}
}
}
}
}
},
"/payments/purchases/purchase-session": {
"post": {
"summary": "Create Purchase Session",
"description": "Creates a purchase session for completing a purchase.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"full_code": {
"type": "string",
"example": "proj_abc123_def456ghi789",
"description": "The verification code, given as a query parameter in the purchase URL"
},
"price_id": {
"type": "string",
"example": "price_1234567890abcdef",
"description": "The Stack auth price ID to purchase"
},
"quantity": {
"type": "integer",
"example": 1,
"description": "The quantity to purchase",
"default": 1
}
},
"required": [
"full_code",
"price_id"
],
"example": {
"full_code": "proj_abc123_def456ghi789",
"price_id": "price_1234567890abcdef",
"quantity": 1
}
}
}
}
},
"tags": [
"Payments"
],
"x-full-url": "https://api.hexclave.com/api/v1/payments/purchases/purchase-session",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"client_secret": {
"type": "string",
"example": "1234567890abcdef_secret_xyz123",
"description": "Stripe client secret used by the browser to confirm payment via Stripe Elements. Omitted when no payment step is required from the customer; in that case the purchase is being settled without a confirmation step and the caller should skip mounting Stripe Elements."
}
}
}
}
}
}
}
}
},
"/payments/purchases/validate-code": {
"post": {
"summary": "Validate Purchase Code",
"description": "Validates a purchase verification code and returns purchase details including available prices.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"full_code": {
"type": "string",
"example": "proj_abc123_def456ghi789",
"description": "The verification code, given as a query parameter in the purchase URL"
},
"return_url": {
"type": "string",
"example": "https://myapp.com/purchase-success",
"description": "URL to redirect to after purchase completion"
}
},
"required": [
"full_code"
],
"example": {
"full_code": "proj_abc123_def456ghi789",
"return_url": "https://myapp.com/purchase-success"
}
}
}
}
},
"tags": [
"Payments"
],
"x-full-url": "https://api.hexclave.com/api/v1/payments/purchases/validate-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"customer_type": {
"type": "string",
"enum": [
"user",
"team",
"custom"
]
},
"free_trial": {
"type": "array",
"items": {
"type": "integer"
}
},
"server_only": {
"type": "boolean",
"default": true
},
"stackable": {
"type": "boolean",
"default": false
},
"prices": {
"type": "object",
"properties": {},
"required": []
},
"included_items": {
"type": "object",
"properties": {},
"required": []
},
"client_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
},
"server_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the product here."
}
},
"required": [
"display_name",
"customer_type"
]
},
"stripe_account_id": {
"type": "string"
},
"project_id": {
"type": "string"
},
"project_logo_url": {
"type": "string"
},
"already_bought_non_stackable": {
"type": "boolean"
},
"conflicting_products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product_id": {
"type": "string"
},
"display_name": {
"type": "string"
}
},
"required": [
"product_id",
"display_name"
]
}
},
"test_mode": {
"type": "boolean"
},
"charges_enabled": {
"type": "boolean"
}
},
"required": [
"stripe_account_id",
"project_id",
"already_bought_non_stackable",
"conflicting_products",
"test_mode",
"charges_enabled"
]
}
}
}
}
}
}
},
"/project-permissions": {
"get": {
"summary": "List project permissions",
"description": "List global permissions of the current user. `user_id=me` must be set for client requests. `(user_id, permission_id)` together uniquely identify a permission.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "me",
"description": "Filter with the user ID. If set, only the permissions this user has will be returned. Client request must set `user_id=me`"
},
"description": "Filter with the user ID. If set, only the permissions this user has will be returned. Client request must set `user_id=me`",
"required": false
},
{
"name": "permission_id",
"in": "query",
"schema": {
"type": "string",
"example": "16399452-c4f3-4554-8e44-c2d67bb60360",
"description": "Filter with the permission ID. If set, only the permissions with this specific ID will be returned"
},
"description": "Filter with the permission ID. If set, only the permissions with this specific ID will be returned",
"required": false
},
{
"name": "recursive",
"in": "query",
"schema": {
"type": "string",
"enum": [
"true",
"false"
],
"example": "true",
"description": "Whether to list permissions recursively. If set to `false`, only the permission the users directly have will be listed. If set to `true` all the direct and indirect permissions will be listed."
},
"description": "Whether to list permissions recursively. If set to `false`, only the permission the users directly have will be listed. If set to `true` all the direct and indirect permissions will be listed.",
"required": false
}
],
"tags": [
"Permissions"
],
"x-full-url": "https://api.hexclave.com/api/v1/project-permissions",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "read_secret_info",
"description": "The permission ID used to uniquely identify a permission. Can either be a custom permission with lowercase letters, numbers, `:`, and `_` characters, or one of the system permissions: `$update_team`, `$delete_team`, `$read_members`, `$remove_members`, `$invite_members`, `$manage_api_keys`"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
}
},
"required": [
"id",
"user_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/team-permissions": {
"get": {
"summary": "List team permissions",
"description": "List team permissions of the current user. `user_id=me` must be set for client requests. Note that this might contain the permissions with the same permission ID across different teams. `(team_id, user_id, permission_id)` together uniquely identify a permission.",
"parameters": [
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string",
"example": "cce084a3-28b7-418e-913e-c8ee6d802ea4",
"description": "Filter with the team ID. If set, only the permissions of the members in a specific team will be returned."
},
"description": "Filter with the team ID. If set, only the permissions of the members in a specific team will be returned.",
"required": false
},
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "me",
"description": "Filter with the user ID. If set, only the permissions this user has will be returned. Client request must set `user_id=me`"
},
"description": "Filter with the user ID. If set, only the permissions this user has will be returned. Client request must set `user_id=me`",
"required": false
},
{
"name": "permission_id",
"in": "query",
"schema": {
"type": "string",
"example": "16399452-c4f3-4554-8e44-c2d67bb60360",
"description": "Filter with the permission ID. If set, only the permissions with this specific ID will be returned"
},
"description": "Filter with the permission ID. If set, only the permissions with this specific ID will be returned",
"required": false
},
{
"name": "recursive",
"in": "query",
"schema": {
"type": "string",
"enum": [
"true",
"false"
],
"example": "true",
"description": "Whether to list permissions recursively. If set to `false`, only the permission the users directly have will be listed. If set to `true` all the direct and indirect permissions will be listed."
},
"description": "Whether to list permissions recursively. If set to `false`, only the permission the users directly have will be listed. If set to `true` all the direct and indirect permissions will be listed.",
"required": false
}
],
"tags": [
"Permissions"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-permissions",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "read_secret_info",
"description": "The permission ID used to uniquely identify a permission. Can either be a custom permission with lowercase letters, numbers, `:`, and `_` characters, or one of the system permissions: `$update_team`, `$delete_team`, `$read_members`, `$remove_members`, `$invite_members`, `$manage_api_keys`"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
}
},
"required": [
"id",
"user_id",
"team_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/projects/current": {
"get": {
"summary": "Get the current project",
"description": "Get the current project information including display name, OAuth providers and authentication methods. Useful for displaying the available login options to the user.",
"parameters": [],
"tags": [
"Projects"
],
"x-full-url": "https://api.hexclave.com/api/v1/projects/current",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"display_name": {
"type": "string",
"example": "MyMusic",
"description": "Human-readable project display name. This is not a unique identifier."
}
},
"required": [
"id",
"display_name"
]
}
}
}
}
}
}
},
"/auth/sessions": {
"get": {
"summary": "List sessions",
"description": "List all sessions for the current user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Sessions"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/sessions",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"created_at": {
"type": "number"
},
"is_impersonation": {
"type": "boolean"
},
"last_used_at": {
"type": "number"
},
"is_current_session": {
"type": "boolean"
},
"last_used_at_end_user_ip_info": {
"type": "object",
"properties": {
"ip": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"regionCode": {
"type": "string"
},
"cityName": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"tzIdentifier": {
"type": "string"
}
},
"required": [
"ip"
]
}
},
"required": [
"id",
"user_id",
"created_at",
"is_impersonation"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/auth/sessions/current": {
"delete": {
"summary": "Sign out of the current session",
"description": "Sign out of the current session and invalidate the refresh token",
"parameters": [],
"tags": [
"Sessions"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/sessions/current",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/sessions/current/refresh": {
"post": {
"summary": "Refresh access token",
"description": "Get a new access token using a refresh token",
"parameters": [
{
"name": "x-stack-refresh-token",
"in": "header",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Sessions"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/sessions/current/refresh",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
}
},
"required": [
"access_token"
]
}
}
}
}
}
}
},
"/auth/sessions/{id}": {
"delete": {
"summary": "Delete session",
"description": "Delete a session by ID.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Sessions"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/sessions/{id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/team-invitations": {
"get": {
"summary": "List team invitations",
"description": "",
"parameters": [
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string",
"description": "The team ID to list invitations for. Required unless user_id is provided."
},
"description": "The team ID to list invitations for. Required unless user_id is provided.",
"required": false
},
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"description": "List invitations sent to this user's verified emails. Must be \"me\" for client access. Cannot be combined with team_id."
},
"description": "List invitations sent to this user's verified emails. Must be \"me\" for client access. Cannot be combined with team_id.",
"required": false
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"team_display_name": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"recipient_email": {
"type": "string"
}
},
"required": [
"id",
"team_id",
"team_display_name",
"expires_at_millis",
"recipient_email"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/team-invitations/accept": {
"post": {
"summary": "Accept the team invitation",
"description": "Accept invitation and add user to the team",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/accept",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}
}
},
"/team-invitations/accept/check-code": {
"post": {
"summary": "Check if a team invitation code is valid",
"description": "Check if a team invitation code is valid without using it",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/accept/check-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"is_code_valid": {
"type": "boolean"
}
},
"required": [
"is_code_valid"
]
}
}
}
}
}
}
},
"/team-invitations/accept/details": {
"post": {
"summary": "Get team invitation details",
"description": "Get additional information about a team invitation code",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/accept/details",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team_id": {
"type": "string"
},
"team_display_name": {
"type": "string"
}
},
"required": [
"team_id",
"team_display_name"
]
}
}
}
}
}
}
},
"/team-invitations/send-code": {
"post": {
"summary": "Send an email to invite a user to a team",
"description": "The user receiving this email can join the team by clicking on the link in the email. If the user does not have an account yet, they will be prompted to create one.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"email": {
"type": "string",
"example": "johndoe@example.com",
"description": "The email of the user to invite."
},
"callback_url": {
"type": "string",
"example": "https://example.com/handler/team-invitation",
"description": "The base callback URL to construct an invite link with. A query parameter `code` with the verification code will be appended to it. The page should then make a request to the `/team-invitations/accept` endpoint."
}
},
"required": [
"team_id",
"email",
"callback_url"
],
"example": {
"team_id": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"email": "johndoe@example.com",
"callback_url": "https://example.com/handler/team-invitation"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/send-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"id": {
"type": "string"
}
},
"required": [
"success",
"id"
]
}
}
}
}
}
}
},
"/team-invitations/{id}": {
"delete": {
"summary": "Delete a team invitation",
"description": "",
"parameters": [
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string",
"description": "The team ID to list invitations for. Required unless user_id is provided."
},
"description": "The team ID to list invitations for. Required unless user_id is provided.",
"required": false
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/{id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/team-invitations/{id}/accept": {
"post": {
"summary": "Accept a team invitation by ID",
"description": "Accepts a team invitation for the specified user. The user must have a verified email matching the invitation's recipient email. This marks the invitation as used and adds the user to the team.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/{id}/accept",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}
}
},
"/team-member-profiles": {
"get": {
"summary": "List team members profiles",
"description": "List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission in that team.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-member-profiles",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable team member display name. This is not a unique identifier. Note that this is separate from the display_name of the user."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team member. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
}
},
"required": [
"team_id",
"user_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/team-member-profiles/{team_id}/{user_id}": {
"get": {
"summary": "Get a team member profile",
"description": "Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-member-profiles/{team_id}/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable team member display name. This is not a unique identifier. Note that this is separate from the display_name of the user."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team member. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
}
},
"required": [
"team_id",
"user_id"
]
}
}
}
}
}
},
"patch": {
"summary": "Update your team member profile",
"description": "Update your own team member profile. `user_id` must be `me` in the path parameters on the client.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable team member display name. This is not a unique identifier. Note that this is separate from the display_name of the user."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team member. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
}
},
"example": {
"display_name": "John Doe",
"profile_image_url": "https://example.com/image.jpg"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-member-profiles/{team_id}/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable team member display name. This is not a unique identifier. Note that this is separate from the display_name of the user."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team member. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
}
},
"required": [
"team_id",
"user_id"
]
}
}
}
}
}
}
},
"/team-memberships/{team_id}/{user_id}": {
"delete": {
"summary": "Remove a user from a team",
"description": "All the users are allowed to remove themselves from a team (`user_id=me`). Only the users who have the `$remove_members` permission are allowed to remove other users from a team. `team_id` is must an ID of a team that the user is a member of.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-memberships/{team_id}/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/teams": {
"get": {
"summary": "List teams",
"description": "List all the teams that the current user is a member of. `user_id=me` must be passed in the query parameters.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "me",
"description": "Filter for the teams that the user is a member of. Can be either `me` or an ID. Must be `me` in the client API"
},
"description": "Filter for the teams that the user is a member of. Can be either `me` or an ID. Must be `me` in the client API",
"required": false
},
{
"name": "order_by",
"in": "query",
"schema": {
"type": "string",
"enum": [
"created_at"
],
"example": "created_at",
"description": "Field to order results by. Currently only `created_at` is supported."
},
"description": "Field to order results by. Currently only `created_at` is supported.",
"required": false
},
{
"name": "desc",
"in": "query",
"schema": {
"type": "string",
"enum": [
"true",
"false"
],
"example": "false",
"description": "Whether to order results in descending order. Defaults to false (ascending)."
},
"description": "Whether to order results in descending order. Defaults to false (ascending).",
"required": false
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"description": "The maximum number of items to return (capped at 200)."
},
"description": "The maximum number of items to return (capped at 200).",
"required": false
},
{
"name": "cursor",
"in": "query",
"schema": {
"type": "string",
"description": "The cursor to start the result set from. Requires `limit` to also be set."
},
"description": "The cursor to start the result set from. Requires `limit` to also be set.",
"required": false
},
{
"name": "query",
"in": "query",
"schema": {
"type": "string",
"description": "A search query to filter the results by. Free-text search applied to the team's id (exact-match) and display name."
},
"description": "A search query to filter the results by. Free-text search applied to the team's id (exact-match) and display name.",
"required": false
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
},
"post": {
"summary": "Create a team",
"description": "Create a new team and optionally add the current user as a member.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"creator_user_id": {
"type": "string",
"example": "me",
"description": "The ID of the creator of the team. If not specified, the user will not be added to the team. Can be either \"me\" or the ID of the user. Only used on the client side."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
}
},
"required": [
"display_name"
],
"example": {
"display_name": "My Team",
"creator_user_id": "me",
"profile_image_url": "https://example.com/image.jpg",
"client_metadata": {
"key": "value"
}
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams",
"responses": {
"201": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
}
}
}
}
}
}
},
"/teams/{team_id}": {
"get": {
"summary": "Get a team",
"description": "Get a team that the current user is a member of.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams/{team_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
}
}
}
}
}
},
"delete": {
"summary": "Delete a team",
"description": "Delete a team. Only allowed if the current user is a member of the team and has the `$delete_team` permission.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams/{team_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
},
"patch": {
"summary": "Update a team",
"description": "Update the team information. Only allowed if the current user is a member of the team and has the `$update_team` permission.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
}
},
"example": {
"display_name": "My Team",
"profile_image_url": "https://example.com/image.jpg",
"client_metadata": {
"key": "value"
}
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams/{team_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
}
}
}
}
}
}
},
"/users/me": {
"get": {
"summary": "Get current user",
"description": "Gets the currently authenticated user.",
"parameters": [],
"tags": [
"Users"
],
"x-full-url": "https://api.hexclave.com/api/v1/users/me",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_team": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
},
"id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"primary_email": {
"type": "string",
"example": "johndoe@example.com",
"description": "Primary email"
},
"primary_email_verified": {
"type": "boolean",
"example": true,
"description": "Whether the primary email has been verified to belong to this user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable user display name. This is not a unique identifier."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for user. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"signed_up_at_millis": {
"type": "number",
"example": 1630000000000,
"description": "The time the user signed up (identify) => `(the number of milliseconds since epoch, January 1, 1970, UTC)`"
},
"selected_team_id": {
"type": "string",
"example": "team-id",
"description": "ID of the team currently selected by the user"
},
"is_anonymous": {
"type": "boolean"
},
"is_restricted": {
"type": "boolean",
"example": false,
"description": "Whether the user is in restricted state (has signed up but not completed onboarding requirements)"
},
"restricted_reason": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"anonymous",
"email_not_verified",
"restricted_by_administrator"
]
}
},
"required": [
"type"
],
"example": null,
"description": "The reason why the user is restricted (e.g., type: \"email_not_verified\", \"anonymous\", or \"restricted_by_administrator\"), null if not restricted"
},
"restricted_by_admin": {
"type": "boolean",
"example": false,
"description": "Whether the user is restricted by an administrator. Can be set manually or by sign-up rules."
},
"restricted_by_admin_reason": {
"type": "string",
"example": null,
"description": "Public reason shown to the user explaining why they are restricted. Optional."
}
},
"required": [
"id",
"primary_email_verified",
"signed_up_at_millis",
"is_anonymous",
"is_restricted",
"restricted_by_admin"
]
}
}
}
}
}
},
"delete": {
"summary": "Delete current user",
"description": "Deletes the currently authenticated user. Use this with caution.",
"parameters": [],
"tags": [
"Users"
],
"x-full-url": "https://api.hexclave.com/api/v1/users/me",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
},
"patch": {
"summary": "Update current user",
"description": "Updates the currently authenticated user. Only the values provided will be updated.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable user display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for user. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"selected_team_id": {
"type": "string",
"example": "team-id",
"description": "ID of the team currently selected by the user"
},
"totp_secret_base64": {
"type": "string",
"example": "dG90cC1zZWNyZXQ=",
"description": "Enables 2FA and sets a TOTP secret for the user. Set to null to disable 2FA."
},
"primary_email": {
"type": "string",
"example": "johndoe@example.com",
"description": "Primary email"
}
},
"example": {
"display_name": "John Doe",
"profile_image_url": "https://example.com/image.jpg",
"client_metadata": {
"key": "value"
},
"selected_team_id": "team-id",
"totp_secret_base64": "dG90cC1zZWNyZXQ=",
"primary_email": "johndoe@example.com"
}
}
}
}
},
"tags": [
"Users"
],
"x-full-url": "https://api.hexclave.com/api/v1/users/me",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_team": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
},
"id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"primary_email": {
"type": "string",
"example": "johndoe@example.com",
"description": "Primary email"
},
"primary_email_verified": {
"type": "boolean",
"example": true,
"description": "Whether the primary email has been verified to belong to this user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable user display name. This is not a unique identifier."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for user. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"signed_up_at_millis": {
"type": "number",
"example": 1630000000000,
"description": "The time the user signed up (identify) => `(the number of milliseconds since epoch, January 1, 1970, UTC)`"
},
"selected_team_id": {
"type": "string",
"example": "team-id",
"description": "ID of the team currently selected by the user"
},
"is_anonymous": {
"type": "boolean"
},
"is_restricted": {
"type": "boolean",
"example": false,
"description": "Whether the user is in restricted state (has signed up but not completed onboarding requirements)"
},
"restricted_reason": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"anonymous",
"email_not_verified",
"restricted_by_administrator"
]
}
},
"required": [
"type"
],
"example": null,
"description": "The reason why the user is restricted (e.g., type: \"email_not_verified\", \"anonymous\", or \"restricted_by_administrator\"), null if not restricted"
},
"restricted_by_admin": {
"type": "boolean",
"example": false,
"description": "Whether the user is restricted by an administrator. Can be set manually or by sign-up rules."
},
"restricted_by_admin_reason": {
"type": "string",
"example": null,
"description": "Public reason shown to the user explaining why they are restricted. Optional."
}
},
"required": [
"id",
"primary_email_verified",
"signed_up_at_millis",
"is_anonymous",
"is_restricted",
"restricted_by_admin"
]
}
}
}
}
}
}
}
}
}