Skip to main content

Endpoint reference

Base URL: https://app.tpastream.com/connect/v1

Every request needs the headers described in Authentication. Every request except POST /tpastream_sdk must also identify the member.

All successful responses are wrapped in a data envelope:

{ "data": { } }

Endpoints at a glance

MethodPathPurpose
POST/tpastream_sdkBootstrap the member; list carriers
GET/payer/{employer_id}/{payer_id}Carrier detail and credential schema
GET/terms_of_serviceCurrent terms of use HTML
POST/policy_holder_sdk/policy_holderSubmit credentials, start validation
PUT/policy_holder_sdk/policy_holder/{id}Resubmit credentials for an existing connection
GET/policy_holder_sdk/policy_holder/{id}Connection status
GET/validate-credentials/{ph_id}/{task_id}Validation state
PUT/validate-credentials/{ph_id}/{task_id}Supply an MFA method or code
GET/fix-credentialsAll of the member's connections
GET POST/interopPatient Access API (OAuth carriers)

POST /tpastream_sdk

Creates or resolves the member, attaches them to the employer, and returns the carriers available to them. The only endpoint that may reference a member who does not exist yet.

Body

FieldTypeRequiredNotes
system_keystringYesYour identifier for the employer.
vendorstringYesYour vendor label.
employer_namestringYesDisplay name; used if the employer is being created.
user_emailstringYesThe member's email. Becomes their identity for every later call.
user_first_namestringYes
user_last_namestringYes
date_of_birthstringNoYYYY-MM-DD.
phone_numberstringNo
member_system_keystringNoYour identifier for the member.

Responsedata.user, data.employer, data.tenant, data.payers (array of {id, name, logo_url}).

Safe to call repeatedly for the same member; it resolves rather than duplicating.


GET /payer/{employer_id}/{payer_id}

Carrier detail, including the schema for its credential form.

Queryemail (required), referer (optional, free-form attribution string).

Response

FieldNotes
id, name, logo_urlDisplay basics.
onboard_formJSON Schema for the carrier's credential fields.
onboard_ui_schemaPresentation hints for those fields.
has_security_questionsWhether the carrier may ask security questions.
supports_interoperability_apistrue means OAuth redirect, not credentials. See Patient Access API.
register_urlWhere a member with no carrier account should sign up.
website_home_url_netlocThe carrier's portal host, for display.
redirect_vendor_nameSet when the carrier authenticates through a third party.
blogsOptional help articles: id, title, article.

Drive your form from onboard_form rather than hard-coding per-carrier fields, so carrier changes don't require a deploy.


GET /terms_of_service

Queryemail (required).

Responsedata.html_string, the current terms of use as HTML.

Fetch and render this rather than reproducing the text. The member's acceptance is recorded through accept and tenants_accept on the credential submit.


POST /policy_holder_sdk/policy_holder

Submits credentials, creates the connection, and dispatches a validation against the carrier.

Body

FieldTypeRequiredNotes
user_emailstringYesIdentifies the member. May be supplied as user.email instead.
employer_idintegerYesFrom the bootstrap response.
payer_idintegerYesMay also be supplied as payer.id.
usernamestringUsuallyWhatever the carrier calls it.
passwordstringUsually
date_of_birthstringCarrier-dependentYYYY-MM-DD, or null.
member_idintegerNoAttach to a specific member record.
acceptbooleanYesMember accepted the terms of use. Falsy returns 403.
tenants_acceptarrayYesNon-empty array of tenant ids the member consented to. A string is rejected.

Any additional fields declared by the carrier's onboard_form go at the top level of the same object. They are validated against that schema; failures return 422 with per-field detail.

Response

FieldNotes
policy_holder_idThe connection. Persist this.
task_idThe running validation. Poll it.
task_tokenOnly needed for the event stream.

PUT /policy_holder_sdk/policy_holder/{policy_holder_id}

Identical body and response to the POST. Use when the member is fixing credentials on a connection that already exists rather than making a new one.

Changing username to one already used by another connection at the same carrier returns 403.


GET /policy_holder_sdk/policy_holder/{policy_holder_id}

Queryemail (required), employer_id (required).

Response

FieldNotes
policy_holder_id, uuidIdentifiers.
payer_idThe carrier.
login_problemnull when healthy; otherwise names the issue.
login_needs_correctiontrue when the member must act.
login_correction_messageWhat to tell them.
last_successful_crawl_endTimestamp of the last successful data pull, or null.
claims_synced_countClaims retrieved so far.
most_recent_claim_dateDate of the newest claim.
membersid, first_name, last_name.

Note that login_problem and its siblings read as null while a validation is still running. Do not interpret an all-null response mid-validation as success — drive off the validation task instead.


GET /validate-credentials/{policy_holder_id}/{task_id}

The polling endpoint. See Multi-factor authentication for the full state machine.

Queryemail (required).

Response

FieldNotes
idThe task id.
stateSee the state table.
infoPresent on MFA states. Carries method_list on WAITING_FOR_METHOD_CHOICE.
credentials_are_validOn terminal states. true means the carrier accepted the login.
pendingtrue means no verdict yet and we will keep trying.
messageMember-safe explanation on failures and code rejections.

message is always safe to show a member. Internal error detail is never returned here.


PUT /validate-credentials/{policy_holder_id}/{task_id}

Supplies one piece of MFA input. Send exactly one of method or code per call.

Body

FieldTypeNotes
user_emailstringRequired.
methodstringThe exact string from info.method_list.
codestringThe one-time code the member received.

Keep polling the GET after each call; this endpoint acknowledges the input rather than reporting the outcome.


GET /fix-credentials

Every connection belonging to the member, with current status. This is what a "manage my carriers" screen is built from.

Queryemail (required). Headers — requires X-Connect-Access-Token.

Responsedata.user with the member's policy holders and their status fields.


Patient Access API

Carriers with supports_interoperability_apis: true authenticate through their own OAuth flow instead of accepting credentials. The member signs in on the carrier's website and is redirected back to your application.

This step requires a browser. There is no server-to-server equivalent, because the member authenticates directly with the carrier.

Both endpoints require the X-SDK-State-Id header — an opaque string you generate per member session and reuse across the flow.

POST /interop

Bodyuser_email (required).

Begins the flow and returns the carrier authorization URL to send the member to.

GET /interop

Queryemail (required).

Reports where the flow stands. Returns status, plus ph_id once a connection exists, or error if it failed.

The redirect back

The carrier returns the member to your application with query parameters, notably accessToken. Strip these from the URL once read — leaving them in browser history is unnecessary exposure.

Poll GET /interop after the redirect until status reports the connection is established, then treat ph_id like any other policy_holder_id.


Response headers worth reading

HeaderNotes
X-Request-IdLog this. It is how we find your request in our logs.
X-Set-Connect-Access-TokenA rolling replacement connect access token. Use it on subsequent requests instead of re-minting.