Curae Platform
API referenceSDK Curae Connect

Mint a graduation handoff token for an existing LIMITED user

SDK consumers surface a `<CuraeUpgradeCard>` whenever the current user is in the `LIMITED` lifecycle state; a tap on the upgrade CTA proxies to this route via the consumer backend. The platform mints a fresh server-signed `GRADUATION_HANDOFF` JWT that pins the LIMITED `User.id` and returns the Curae-hosted `/graduate#handoff=<token>` webview URL the SDK navigates the user to (the token rides the URL fragment, which the browser never sends). The credential-binding ceremony (passkey, magic link, password) runs inside that webview. Idempotency-Key is REJECTED because every call MUST mint a fresh short-lived JWT — replays would return a stale token whose TTL may have elapsed. Rate-limited at 10 req / customer-account / appUserId / minute (same cap as `/initiate`) to close the LIMITED-binding enumeration side channel.

POST
/api/sdk/v1/curae-connect/graduation-handoff

SDK consumers surface a <CuraeUpgradeCard> whenever the current user is in the LIMITED lifecycle state; a tap on the upgrade CTA proxies to this route via the consumer backend. The platform mints a fresh server-signed GRADUATION_HANDOFF JWT that pins the LIMITED User.id and returns the Curae-hosted /graduate#handoff=<token> webview URL the SDK navigates the user to (the token rides the URL fragment, which the browser never sends). The credential-binding ceremony (passkey, magic link, password) runs inside that webview. Idempotency-Key is REJECTED because every call MUST mint a fresh short-lived JWT — replays would return a stale token whose TTL may have elapsed. Rate-limited at 10 req / customer-account / appUserId / minute (same cap as /initiate) to close the LIMITED-binding enumeration side channel.

Authorization

platformApiKey
headerAuthorizationBearer <token>

Curae Platform API key using the format Bearer . Keys are opaque credentials such as cae_live_..., not JWTs.

Request Body

application/json
  1. body
appUserId*string

Opaque SDK user id. Must be canonical: no leading or trailing whitespace and no control characters.

Length1 <= length <= 256
handoffReturnUrl?|

Optional return URL the /graduate webview redirects back to after the graduation ceremony succeeds. One of the return addresses registered for the app on Account settings in Curae Platform, exactly as listed there; any other is 400 with code invalid_redirect_uri. Curae sends the person back to it only while it is still registered and the app's website domain is still verified.

Formaturi
Lengthlength <= 2048
ttlSeconds?integer

Optional handoff-token TTL override, in seconds. Defaults to 5 minutes server-side.

Range60 <= value <= 900

Response Body

Graduation handoff token minted with absolute webview URL.

application/json
  1. response
handoffUrl*string

Absolute Curae-domain URL the SDK navigates the user to. Composition is server-driven so a future Curae release (e.g. regional path prefix) does not require an SDK bump.

Formaturi
handoffToken*string

Raw server-signed JWT. The SDK does NOT need to inspect this directly under normal flow — the handoffUrl already carries it in the URL fragment (#handoff=) — but it is returned for diagnostics. A custom webview launcher opens handoffUrl; it never puts this token in a path or query string.

handoffTokenExpiresAt*string

ISO 8601 expiry of the handoff token.

Formatdate-time
subjectUserId*string

The LIMITED User.id the handoff token is bound to. Surfaced to the SDK so consumers can correlate the token to the user without re-resolving the binding.

Formatuuid
Example Request
curl -X POST 'https://api.curaeai.com/api/sdk/v1/curae-connect/graduation-handoff' \  -H 'Content-Type: application/json' \  -d '{  "appUserId": "string"}'
Example Response
{  "handoffUrl": "http://example.com",  "handoffToken": "string",  "handoffTokenExpiresAt": "2019-08-24T14:15:22Z",  "subjectUserId": "296d2d93-03fc-4d0e-b7e7-4f7600664125"}

Initiate a Curae Connect entry-flow session (Path A / B / C selection) POST

Mints a fresh CuraeConnectSession for the SDK app's (customerAccountId, appUserId) coordinate. Path selection is deterministic from the bound `LimitedAccountAppBinding`: existing-ACTIVE → Path A (`EXISTING_ACTIVE_HANDOFF`, handoff lands in-tx), no-binding + `preferSignup: true` → Path B (`NEW_ACTIVE_SIGNUP_HANDOFF`, requires `completeHandoff`), else → Path C (`SILENT_LIMITED`, reuses the coordinate's LIMITED user, or opens a session whose LIMITED user is created only when the person accepts Curae's documents at `/select`; this route creates no account). When the app's user asks to manage their sharing, send `manageSharing: true`: for a Path C person whose account exists, `handoffUrl` is then the link that opens Curae Connect's Manage sharing screen, where the person sees what they share with the app, gets a copy of each authorization they signed, stops sharing, or deletes their Curae Connect account. The app is told of a stop or a deletion by `connection.revoked`. Open `handoffUrl` in the system browser (`ASWebAuthenticationSession` on iOS, Custom Tabs on Android) or a top-level browser window; an embedded web view is not supported. The link works once: the first browser to open it holds the session, and every later step runs in that browser. An app Curae has not approved for live access is refused `403` `LIVE_ACCESS_NOT_APPROVED`, with either kind of key. The route requires `connection:write` scope and an `Idempotency-Key` (retries replay the original response verbatim). Rate-limited at 10 req / customer-account / appUserId / minute on top of the standard Platform API buckets.

Resolve the lifecycle state of an SDK app-user coordinate (read-only) GET

Read-only probe used by the SDK's `<CuraeAIAccountProvider>` to decide which onboarding / lifecycle UI to render for the current user. Resolves `(customerAccountId, appUserId)` to one of `UNLINKED`, `LIMITED`, `ACTIVE`, or `TOMBSTONED` without minting a `CuraeConnectSession` row, provisioning a LIMITED user, emitting any outbox event, or counting against the per-coordinate `/initiate` rate-limit bucket. Supports RFC 7232 conditional GET — pass the previously-received ETag in `If-None-Match` to receive a `304 Not Modified` when the state has not moved. Designed for high-frequency polling (every page mount, every browser tab visibility-change).