POST /protect/compute

Compute a Protect Trust Index score for a user. The model selected determines what is scored and what additional fields the response contains. For example, ti-link-session-2.0 scores a completed Link session for fraud risk; cash-advance-onboarding-1.0 scores repayment risk for a first-time cash advance and additionally populates per-amount-bucket subscores. Cash-advance models require that the user have a Plaid Item with Transactions enabled, or an Assets Report, before scoring.

The endpoint returns HTTP 400 with error_type = INVALID_REQUEST and error_code = FAILED_PRECONDITION when a required precondition is not met: for link-session models, when the Link session has not completed; for cash-advance models, when the user has not successfully linked any Item.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
client_id String No

Your Plaid API client_id. The client_id is required and may be provided either in the PLAID-CLIENT-ID header or as part of a request body.

user Object Yes

Represents an end user for /protect/compute requests.

user.user_id String No

The Plaid User ID returned from a previous call to /user/create. This or client_user_id can be provided, not both.

user.client_user_id String No

A unique ID representing the end user, previously passed to /user/create. Maximum of 128 characters. Typically this will be a user ID number from your application. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id.

model String Yes

The name of the Trust Index model to use for scoring, with a major.minor version suffix. Examples: ti-link-session-2.0 (link-session fraud), ti-identity-2.0 (identity fraud), cash-advance-onboarding-1.0 (first cash advance), and cash-advance-ongoing-1.0 (subsequent cash advances). The model specified may require certain fields within model_inputs; for example, ti-link-session-2.0 requires the link field. Cash-advance models do not use model_inputs.

secret String No

Your Plaid API secret. The secret is required and may be provided either in the PLAID-SECRET header or as part of a request body.

model_inputs Object No

Inputs required by certain Trust Index models. The link field is required for link-session models. Other model families (including cash-advance) are identified by user alone and do not use this object.

model_inputs.link Object No

Inputs for link session Trust Index models.

model_inputs.link.require_extracted_data Boolean No

Controls whether transaction extraction must be complete before scoring. If false (default), returns a score whether or not transaction extraction is complete, as long as the link session is finished; if data has been extracted it will still be included in the score computation. If true, returns HTTP 400 with error_type = INVALID_REQUEST and error_code = FAILED_PRECONDITION if extraction is still in progress; once data is ready a score will be returned normally.

model_inputs.link.link_session_id String Yes

A unique identifier for the Link session, used to compute a Trust Index score and fraud attributes.

model_inputs.sdk Object No

Inputs for Protect SDK Trust Index models.

model_inputs.sdk.sdk_session_id String Yes

A unique identifier for the Protect SDK session, used to compute a Trust Index score and fraud attributes.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.