Skip to main content
POST
Create a sandbox scenario

Authorizations

X-Access-Client-Id
string
header
required

Client ID

X-Access-Secret
string
header
required

Client Access Key

Body

application/json

A new sandbox scenario. At least one matching field is required, and is_refresh alone does not count - a scenario that constrains nothing would answer every input of its data source. No two scenarios of the same data source can have the same matching fields; enabled and products do not make them distinct.

label
string
required

How the scenario is recognized in a list. Unique per data source within your account.

Maximum string length: 128
Example:

"Acme - salaried, biweekly"

data_source
enum<string>

Data source the scenario answers for. Inferred from which matching fields are set when omitted; send it explicitly whenever that set fits more than one source, as username plus password does.

Available options:
payroll,
docs,
financial_accounts,
education,
credit,
insurance
Example:

"payroll"

description
string

Free-form notes about what the case covers.

Maximum string length: 2000
Example:

"Full-time salaried user with two paystubs"

products
enum<string>[]

Products the scenario applies to. Empty, the default, matches every product.

Available options:
income,
employment,
deposit_switch,
pll,
insurance,
transactions,
assets,
admin,
credit,
education
Example:
enabled
boolean
default:true

Whether the scenario takes part in resolution.

Example:

true

username
string

The login the user types, matched exactly. Truv's built-in test credentials are reserved and refused here.

Maximum string length: 255
Example:

"acme.salaried"

password
string

The password the user types. Omit it to match on username alone.

Maximum string length: 255
Example:

"s4ndb0x"

provider_id
string

Narrows the match to one data provider.

Maximum string length: 64
Example:

"adp"

company_domain
string

Narrows the match to one company.

Maximum string length: 128
Example:

"acme.com"

is_refresh
boolean

true matches data refreshes only, false initial verifications only. Omit to match both.

Example:

true

behavior_status
enum<string>
default:done

Terminal status the task settles on.

Available options:
done,
error,
login_error,
account_locked,
mfa_error,
config_error,
no_data,
unavailable,
unable_to_reset,
not_supported
Example:

"done"

behavior_error_message
string

Error message surfaced on a failing task. Empty on a scenario that succeeds.

Maximum string length: 500
Example:

""

behavior_duration_seconds
integer
default:0

Artificial delay before the task settles.

Required range: 0 <= x <= 120
Example:

0

behavior_mfa
object

Multi-factor authentication (MFA) screens replayed before the scenario's data is returned.

Example:
payload
object

Scenario content. The shape depends on the scenario's data_source; the payroll shape is documented here. Required unless behavior_status is a failure status, in which case the scenario carries no data.

Response

A client-authored sandbox case - what it matches on, how it behaves, and the data it returns.

id
string
read-only

Unique identifier of the scenario.

Maximum string length: 64
Example:

"7b9f0c2a4d6e4f1b8c3a5d7e9f0b1c2d"

data_source
enum<string>

Data source the scenario answers for. Inferred from which matching fields are set when omitted, and refused as ambiguous when more than one source accepts that set. Cannot be changed after create - to use another data source, create a new scenario.

Available options:
payroll,
docs,
financial_accounts,
education,
credit,
insurance
Example:

"payroll"

label
string

How the scenario is recognized in a list. Unique per data source within your account.

Maximum string length: 128
Example:

"Acme - salaried, biweekly"

description
string

Free-form notes about what the case covers.

Maximum string length: 2000
Example:

"Full-time salaried user with two paystubs"

products
enum<string>[]

Products the scenario applies to. Payroll scenarios use income, employment, deposit_switch and pll; a scenario pinned only to products its data source never serves never matches. Empty, the default, matches every product.

Available options:
income,
employment,
deposit_switch,
pll,
insurance,
transactions,
assets,
admin,
credit,
education
Example:
enabled
boolean
default:true

Whether the scenario takes part in resolution.

Example:

true

username
string | null

The login the user types, matched exactly.

Maximum string length: 255
Example:

"acme.salaried"

password
string | null

The password the user types. Omit it to match on username alone.

Maximum string length: 255
Example:

"s4ndb0x"

provider_id
string | null

Narrows the match to one data provider. Null when the scenario does not set it.

Maximum string length: 64
Example:

null

company_domain
string | null

Narrows the match to one company. Null when the scenario does not set it.

Maximum string length: 128
Example:

null

is_refresh
boolean | null

true matches data refreshes only, false initial verifications only. Null, the default, matches both. Supported on every data source, but it does not count toward matching fields and cannot be the only field set. It breaks a tie only when matching fields are equal.

Example:

null

filenames
string[]

Uploaded filenames that select this case. Document upload only.

Maximum string length: 255
Example:
ssn_last4
string | null

Last four SSN digits that select this case. Education and credit only, so null on a payroll scenario.

Maximum string length: 4
Example:

null

date_of_birth
string<date> | null

Date of birth that selects this case. Education only, so null on a payroll scenario.

Example:

null

phone
string | null

Phone number that selects this case, stored in E.164. Credit only, so null on a payroll scenario.

Maximum string length: 32
Example:

null

behavior_status
enum<string>
default:done

Terminal status the task settles on.

Available options:
done,
error,
login_error,
account_locked,
mfa_error,
config_error,
no_data,
unavailable,
unable_to_reset,
not_supported
Example:

"done"

behavior_error_message
string

Error message surfaced on a failing task. Empty on a scenario that succeeds.

Maximum string length: 500
Example:

""

behavior_duration_seconds
integer
default:0

Artificial delay before the task settles.

Required range: 0 <= x <= 120
Example:

0

behavior_mfa
object

MFA screens replayed before the data is returned. Empty unless the scenario declares any.

Example:
payload
object

Scenario content. The shape depends on the scenario's data_source; the payroll shape is documented here. Required unless behavior_status is a failure status, in which case the scenario carries no data.

created_at
string<date-time>
read-only

Time when the scenario was created.

Example:

"2026-09-17T10:04:11.482913Z"

updated_at
string<date-time>
read-only

Time when the scenario was last updated.

Example:

"2026-09-17T10:04:11.482931Z"