Create an SDK patient connection
Starts a connection-oriented Curae Connect flow for the SDK app's authenticated user coordinate, asking for `scope` (SMART App Launch 2.x scopes). The response returns a durable `connection.id` used as `connectionId` in subsequent SDK gateway request bodies, and the granted `scope` in its canonical form. If user action is required, `nextAction` contains the Curae-hosted page to open, once, in the system browser or a top-level browser window; an embedded web view is not supported. A scope that does not parse, that the SDK does not serve, or that lies outside the scope Curae approved the app for is `400` with `code` `invalid_scope` and `details.scope` naming it. An app Curae has not approved for live access is refused `403` `LIVE_ACCESS_NOT_APPROVED`, with either kind of key. If the person taps Don't Allow, nothing is shared: the connection is revoked with the reason `access_denied`, and the person returns to `handoffReturnUrl` with `error=access_denied`.
Starts a connection-oriented Curae Connect flow for the SDK app's authenticated user coordinate, asking for scope (SMART App Launch 2.x scopes). The response returns a durable connection.id used as connectionId in subsequent SDK gateway request bodies, and the granted scope in its canonical form. If user action is required, nextAction contains the Curae-hosted page to open, once, in the system browser or a top-level browser window; an embedded web view is not supported. A scope that does not parse, that the SDK does not serve, or that lies outside the scope Curae approved the app for is 400 with code invalid_scope and details.scope naming it. An app Curae has not approved for live access is refused 403 LIVE_ACCESS_NOT_APPROVED, with either kind of key. If the person taps Don't Allow, nothing is shared: the connection is revoked with the reason access_denied, and the person returns to handoffReturnUrl with error=access_denied.
platformApiKeyAuthorizationBearer <token>Curae Platform API key using the format Bearer . Keys are opaque credentials such as cae_live_..., not JWTs.
Idempotency-Key*stringRequired idempotency key for safe connection-create retries.
^[A-Za-z0-9_-]+$length <= 255application/json- body
appUserId*string1 <= length <= 256brandId?stringOptional 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.
1 <= length <= 2048scope*stringWhat a connection reads and writes: a space-separated list of SMART App Launch 2.x scopes, as an OAuth client sends them (RFC 6749 §3.3). patient/Observation.rs, patient/Condition.rs and patient/Immunization.rs, each optionally narrowed by one US Core category, the type's codes (code, or vaccine-code for Immunization) and a first day (date=ge<YYYY-MM-DD>, or onset-date for Condition); patient/*.rs?_security=http://terminology.hl7.org/CodeSystem/v3-ActCode|<code> for a sensitive category, read for every record type the scope asks for; and patient/Observation.c?code=https://curaeai.com/fhir/CodeSystem/sdk-signal/<namespace>|<code> for a signal the app writes, at any payload version. A scope the SDK does not serve, or outside what Curae approved the app for, is 400 invalid_scope. The connection returns the granted scope in its canonical form: per type, each list in one order, each code with its system. A sensitive category is off on the Curae Connect screen until the person turns it on, so an authorized connection's scope names only the sensitive categories they granted (SMART App Launch: the scope granted may be narrower than the scope requested).
^[!#-\[\]-~]+( [!#-\[\]-~]+)*$1 <= length <= 32768handoffReturnUrl?|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.
urilength <= 2048deviceKeyCnf?|nullrefreshTokenHash?|^[0-9a-f]{64}$sessionTtlSeconds?integer60 <= value <= 900authorizationTtlSeconds?integer300 <= value <= 31536000preferSignup?booleanSDK connection created or recovered from idempotent replay.
application/json- response
connection*nextAction*|nullcurl -X POST 'https://api.curaeai.com/api/sdk/v1/connections' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "appUserId": "string", "scope": "string"}'{ "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" }, "nextAction": { "type": "open_webview", "url": "http://example.com", "expiresAt": "2019-08-24T14:15:22Z" }}Download a connection-scoped records export artifact GET
Redeems a `READY` records export as a short-lived signed URL for the materialized FHIR NDJSON artifact. The export must have been created by the same SDK connection. Returns `409` if the export exists but is not yet `READY` (still `QUEUED`/`RUNNING`) or is no longer downloadable (`EXPIRED`/`FAILED`; or `READY` but queued before a revocation of the app's live access, with `details.reason` `live_access_not_approved`, or assembled under a consent the person has since replaced, with `details.reason` `consent_changed`, or built from records the person has since had erased, with `details.reason` `records_erased`), and `404` if it does not belong to the connection.
Get SDK connection status GET
Returns the current lifecycle state for an app-owned SDK connection. Pending connections self-heal to authorized when their underlying Curae-hosted handoff session has already completed.