Curae Platform
API referenceSDK Connections

Reconnect an SDK patient connection

Starts a connection lifecycle recovery flow for an expired, revoked, or action-required SDK connection. An active connection is not reconnected (`409`). A pending connection whose person signed in at their hospital in Curae Connect, with only Curae's approval left, is completed: `202` with the connection `AUTHORIZED` and `nextAction` `null`. Any other pending connection is refused `409`; `:revoke` ends it. The connection's scope, or the `scope` the request asks for instead, must lie within the scope Curae approved the app for now (`400` `invalid_scope` otherwise); a different scope is a new request the person reviews. An app Curae has not approved for live access is refused `403` `LIVE_ACCESS_NOT_APPROVED`, with either kind of key.

POST
/api/sdk/v1/connections/{connectionId}:reconnect

Starts a connection lifecycle recovery flow for an expired, revoked, or action-required SDK connection. An active connection is not reconnected (409). A pending connection whose person signed in at their hospital in Curae Connect, with only Curae's approval left, is completed: 202 with the connection AUTHORIZED and nextAction null. Any other pending connection is refused 409; :revoke ends it. The connection's scope, or the scope the request asks for instead, must lie within the scope Curae approved the app for now (400 invalid_scope otherwise); a different scope is a new request the person reviews. An app Curae has not approved for live access is refused 403 LIVE_ACCESS_NOT_APPROVED, with either kind of key.

Authorization

platformApiKey
headerAuthorizationBearer <token>

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

Path Parameters

connectionId*string
Formatuuid

Header Parameters

Idempotency-Key*string

Required idempotency key for safe connection-reconnect retries.

Match^[A-Za-z0-9_-]+$
Lengthlength <= 255

Request Body

application/json
  1. body
scope?string

The scope to ask for now; omitted, the connection's own. Either way it must lie within what Curae approved the app for. A scope other than the connection's is a new request the person reviews.

Match^[!#-\[\]-~]+( [!#-\[\]-~]+)*$
Length1 <= length <= 32768
brandId?string

Optional opaque SdkCatalogBrand.id from the public catalog. On the silent limited-account path, the hosted Connect flow attempts this institution directly and falls back to its manual picker if the ID is invalid or stale. Other connection paths ignore this hint.

Length1 <= length <= 2048
handoffReturnUrl?|

Where the Curae Connect handoff sends the person back. 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
deviceKeyCnf?|null
refreshTokenHash?|
Match^[0-9a-f]{64}$
sessionTtlSeconds?integer
Range60 <= value <= 900
authorizationTtlSeconds?integer
Range300 <= value <= 31536000
preferSignup?boolean

Response Body

SDK connection reconnect started.

application/json
  1. response
connection*
previousConnectionId*|
Formatuuid
nextAction*|null
Example Request
curl -X POST 'https://api.curaeai.com/api/sdk/v1/connections/497f6eca-6276-4993-bfeb-53cbbbba6f08:reconnect' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "connection": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "customerAccountId": "d8c60791-7301-441c-98e8-5bea9a162d9b",    "appUserId": "string",    "status": "PENDING",    "scope": "string",    "authorizedAt": "2019-08-24T14:15:22Z",    "expiresAt": "2019-08-24T14:15:22Z",    "revokedAt": "2019-08-24T14:15:22Z",    "actionRequiredReason": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "previousConnectionId": "38b1e704-2bb7-4d51-8125-6969ed2cfce7",  "nextAction": {    "type": "open_webview",    "url": "http://example.com",    "expiresAt": "2019-08-24T14:15:22Z"  }}

Revoke an SDK connection POST

Monotonically revokes an app-owned SDK connection and terminates connection-authorized access. Internal enforcement artifacts are not exposed on the public API.

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.