curl --request PATCH \
--url https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/ \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"label": "Acme - salaried, biweekly",
"description": "Full-time salaried user with two paystubs",
"products": [
"income"
],
"enabled": false,
"username": "acme.salaried",
"password": "s4ndb0x",
"provider_id": "adp",
"company_domain": "acme.com",
"is_refresh": true,
"behavior_status": "login_error",
"behavior_error_message": "Your account has been locked after too many attempts.",
"behavior_duration_seconds": 45,
"behavior_mfa": {
"challenges": [
{
"type": "TEXT",
"label": "Enter the code we sent to your phone",
"answer": "12345"
},
{
"type": "OPTIONS",
"label": "Where should we send your code?",
"options": [
{
"value": "sms",
"label": "Text message"
},
{
"value": "email",
"label": "Email"
}
],
"answers": [
"sms",
"email"
]
}
]
},
"payload": {
"flags": {
"is_fraudulent": false,
"is_suspicious": true
},
"employments": [
{
"profile": {
"full_name": "Jane Roe",
"first_name": "Jane",
"last_name": "Roe",
"ssn": "991-91-9991",
"date_of_birth": "1988-04-12",
"email": "jane.roe@acme.com",
"phone": "4155554193",
"home_address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"company": {
"name": "Acme Inc.",
"ein": "123456789",
"domain": "acme.com",
"phone": "4155554193",
"address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"job_title": "Staff Engineer",
"job_type": "F",
"start_date": "2022-03-01",
"end_date": null,
"original_hire_date": "2019-07-08",
"is_active": true,
"manager_name": "Jenny McDouglas",
"income": "124800.00",
"income_unit": "YEARLY",
"income_currency": "USD",
"pay_rate": "60.00",
"pay_frequency": "BW",
"bank_accounts": [
{
"bank_name": "Acme CU",
"account_name": "Everyday",
"account_number": "1234567890",
"routing_number": "111000025",
"account_type": "C",
"deposit_type": "A",
"deposit_value": "500.00"
}
],
"paystubs": [
{
"pay_date": "2026-08-14",
"period_start": "2026-08-01",
"period_end": "2026-08-14",
"currency": "USD",
"gross_pay": "4800.00",
"net_pay": "3312.00",
"gross_pay_ytd": "76800.00",
"net_pay_ytd": "52992.00",
"hours": "80.00",
"basis_of_pay": "S",
"earnings": [
{
"name": "Regular",
"amount": "4800.00",
"rate": "60.00",
"units": "80.00"
}
],
"earnings_ytd": [
{
"name": "Regular",
"amount": "76800.00",
"rate": "60.00",
"units": "1280.00"
}
],
"deductions": {
"Federal Tax": "1056.00",
"Social Security": "297.60",
"Medicare": "69.60",
"State Tax": "64.80"
},
"deductions_ytd": {
"Federal Tax": "16896.00",
"Social Security": "4761.60",
"Medicare": "1113.60",
"State Tax": "1036.80"
},
"document_id": "a41d7e9c05b24f6b8e3c1d5a7f92b604"
}
],
"w2s": [
{
"year": "2025",
"document_id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"fields": {
"wages": "124800.00"
}
}
],
"shifts": [
{
"start_date": "2026-08-18",
"end_date": "2026-08-18",
"timezone": "America/Chicago",
"time_entries": [
{
"entry_date": "2026-08-18",
"start": "08:00",
"end": "16:30"
}
]
}
]
}
]
}
}
'import requests
url = "https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/"
payload = {
"label": "Acme - salaried, biweekly",
"description": "Full-time salaried user with two paystubs",
"products": ["income"],
"enabled": False,
"username": "acme.salaried",
"password": "s4ndb0x",
"provider_id": "adp",
"company_domain": "acme.com",
"is_refresh": True,
"behavior_status": "login_error",
"behavior_error_message": "Your account has been locked after too many attempts.",
"behavior_duration_seconds": 45,
"behavior_mfa": { "challenges": [
{
"type": "TEXT",
"label": "Enter the code we sent to your phone",
"answer": "12345"
},
{
"type": "OPTIONS",
"label": "Where should we send your code?",
"options": [
{
"value": "sms",
"label": "Text message"
},
{
"value": "email",
"label": "Email"
}
],
"answers": ["sms", "email"]
}
] },
"payload": {
"flags": {
"is_fraudulent": False,
"is_suspicious": True
},
"employments": [
{
"profile": {
"full_name": "Jane Roe",
"first_name": "Jane",
"last_name": "Roe",
"ssn": "991-91-9991",
"date_of_birth": "1988-04-12",
"email": "jane.roe@acme.com",
"phone": "4155554193",
"home_address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"company": {
"name": "Acme Inc.",
"ein": "123456789",
"domain": "acme.com",
"phone": "4155554193",
"address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"job_title": "Staff Engineer",
"job_type": "F",
"start_date": "2022-03-01",
"end_date": None,
"original_hire_date": "2019-07-08",
"is_active": True,
"manager_name": "Jenny McDouglas",
"income": "124800.00",
"income_unit": "YEARLY",
"income_currency": "USD",
"pay_rate": "60.00",
"pay_frequency": "BW",
"bank_accounts": [
{
"bank_name": "Acme CU",
"account_name": "Everyday",
"account_number": "1234567890",
"routing_number": "111000025",
"account_type": "C",
"deposit_type": "A",
"deposit_value": "500.00"
}
],
"paystubs": [
{
"pay_date": "2026-08-14",
"period_start": "2026-08-01",
"period_end": "2026-08-14",
"currency": "USD",
"gross_pay": "4800.00",
"net_pay": "3312.00",
"gross_pay_ytd": "76800.00",
"net_pay_ytd": "52992.00",
"hours": "80.00",
"basis_of_pay": "S",
"earnings": [
{
"name": "Regular",
"amount": "4800.00",
"rate": "60.00",
"units": "80.00"
}
],
"earnings_ytd": [
{
"name": "Regular",
"amount": "76800.00",
"rate": "60.00",
"units": "1280.00"
}
],
"deductions": {
"Federal Tax": "1056.00",
"Social Security": "297.60",
"Medicare": "69.60",
"State Tax": "64.80"
},
"deductions_ytd": {
"Federal Tax": "16896.00",
"Social Security": "4761.60",
"Medicare": "1113.60",
"State Tax": "1036.80"
},
"document_id": "a41d7e9c05b24f6b8e3c1d5a7f92b604"
}
],
"w2s": [
{
"year": "2025",
"document_id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"fields": { "wages": "124800.00" }
}
],
"shifts": [
{
"start_date": "2026-08-18",
"end_date": "2026-08-18",
"timezone": "America/Chicago",
"time_entries": [
{
"entry_date": "2026-08-18",
"start": "08:00",
"end": "16:30"
}
]
}
]
}
]
}
}
headers = {
"X-Access-Client-Id": "<api-key>",
"X-Access-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Access-Client-Id': '<api-key>',
'X-Access-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
label: 'Acme - salaried, biweekly',
description: 'Full-time salaried user with two paystubs',
products: ['income'],
enabled: false,
username: 'acme.salaried',
password: 's4ndb0x',
provider_id: 'adp',
company_domain: 'acme.com',
is_refresh: true,
behavior_status: 'login_error',
behavior_error_message: 'Your account has been locked after too many attempts.',
behavior_duration_seconds: 45,
behavior_mfa: {
challenges: [
{type: 'TEXT', label: 'Enter the code we sent to your phone', answer: '12345'},
{
type: 'OPTIONS',
label: 'Where should we send your code?',
options: [{value: 'sms', label: 'Text message'}, {value: 'email', label: 'Email'}],
answers: ['sms', 'email']
}
]
},
payload: {
flags: {is_fraudulent: false, is_suspicious: true},
employments: [
{
profile: {
full_name: 'Jane Roe',
first_name: 'Jane',
last_name: 'Roe',
ssn: '991-91-9991',
date_of_birth: '1988-04-12',
email: 'jane.roe@acme.com',
phone: '4155554193',
home_address: {street: '1 Main St', city: 'Austin', state: 'TX', zip: '78701', country: 'US'}
},
company: {
name: 'Acme Inc.',
ein: '123456789',
domain: 'acme.com',
phone: '4155554193',
address: {street: '1 Main St', city: 'Austin', state: 'TX', zip: '78701', country: 'US'}
},
job_title: 'Staff Engineer',
job_type: 'F',
start_date: '2022-03-01',
end_date: null,
original_hire_date: '2019-07-08',
is_active: true,
manager_name: 'Jenny McDouglas',
income: '124800.00',
income_unit: 'YEARLY',
income_currency: 'USD',
pay_rate: '60.00',
pay_frequency: 'BW',
bank_accounts: [
{
bank_name: 'Acme CU',
account_name: 'Everyday',
account_number: '1234567890',
routing_number: '111000025',
account_type: 'C',
deposit_type: 'A',
deposit_value: '500.00'
}
],
paystubs: [
{
pay_date: '2026-08-14',
period_start: '2026-08-01',
period_end: '2026-08-14',
currency: 'USD',
gross_pay: '4800.00',
net_pay: '3312.00',
gross_pay_ytd: '76800.00',
net_pay_ytd: '52992.00',
hours: '80.00',
basis_of_pay: 'S',
earnings: [{name: 'Regular', amount: '4800.00', rate: '60.00', units: '80.00'}],
earnings_ytd: [{name: 'Regular', amount: '76800.00', rate: '60.00', units: '1280.00'}],
deductions: {
'Federal Tax': '1056.00',
'Social Security': '297.60',
Medicare: '69.60',
'State Tax': '64.80'
},
deductions_ytd: {
'Federal Tax': '16896.00',
'Social Security': '4761.60',
Medicare: '1113.60',
'State Tax': '1036.80'
},
document_id: 'a41d7e9c05b24f6b8e3c1d5a7f92b604'
}
],
w2s: [
{
year: '2025',
document_id: '3f1c8a90b7d2416e9a5c0e4f2b8d6a17',
fields: {wages: '124800.00'}
}
],
shifts: [
{
start_date: '2026-08-18',
end_date: '2026-08-18',
timezone: 'America/Chicago',
time_entries: [{entry_date: '2026-08-18', start: '08:00', end: '16:30'}]
}
]
}
]
}
})
};
fetch('https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'label' => 'Acme - salaried, biweekly',
'description' => 'Full-time salaried user with two paystubs',
'products' => [
'income'
],
'enabled' => false,
'username' => 'acme.salaried',
'password' => 's4ndb0x',
'provider_id' => 'adp',
'company_domain' => 'acme.com',
'is_refresh' => true,
'behavior_status' => 'login_error',
'behavior_error_message' => 'Your account has been locked after too many attempts.',
'behavior_duration_seconds' => 45,
'behavior_mfa' => [
'challenges' => [
[
'type' => 'TEXT',
'label' => 'Enter the code we sent to your phone',
'answer' => '12345'
],
[
'type' => 'OPTIONS',
'label' => 'Where should we send your code?',
'options' => [
[
'value' => 'sms',
'label' => 'Text message'
],
[
'value' => 'email',
'label' => 'Email'
]
],
'answers' => [
'sms',
'email'
]
]
]
],
'payload' => [
'flags' => [
'is_fraudulent' => false,
'is_suspicious' => true
],
'employments' => [
[
'profile' => [
'full_name' => 'Jane Roe',
'first_name' => 'Jane',
'last_name' => 'Roe',
'ssn' => '991-91-9991',
'date_of_birth' => '1988-04-12',
'email' => 'jane.roe@acme.com',
'phone' => '4155554193',
'home_address' => [
'street' => '1 Main St',
'city' => 'Austin',
'state' => 'TX',
'zip' => '78701',
'country' => 'US'
]
],
'company' => [
'name' => 'Acme Inc.',
'ein' => '123456789',
'domain' => 'acme.com',
'phone' => '4155554193',
'address' => [
'street' => '1 Main St',
'city' => 'Austin',
'state' => 'TX',
'zip' => '78701',
'country' => 'US'
]
],
'job_title' => 'Staff Engineer',
'job_type' => 'F',
'start_date' => '2022-03-01',
'end_date' => null,
'original_hire_date' => '2019-07-08',
'is_active' => true,
'manager_name' => 'Jenny McDouglas',
'income' => '124800.00',
'income_unit' => 'YEARLY',
'income_currency' => 'USD',
'pay_rate' => '60.00',
'pay_frequency' => 'BW',
'bank_accounts' => [
[
'bank_name' => 'Acme CU',
'account_name' => 'Everyday',
'account_number' => '1234567890',
'routing_number' => '111000025',
'account_type' => 'C',
'deposit_type' => 'A',
'deposit_value' => '500.00'
]
],
'paystubs' => [
[
'pay_date' => '2026-08-14',
'period_start' => '2026-08-01',
'period_end' => '2026-08-14',
'currency' => 'USD',
'gross_pay' => '4800.00',
'net_pay' => '3312.00',
'gross_pay_ytd' => '76800.00',
'net_pay_ytd' => '52992.00',
'hours' => '80.00',
'basis_of_pay' => 'S',
'earnings' => [
[
'name' => 'Regular',
'amount' => '4800.00',
'rate' => '60.00',
'units' => '80.00'
]
],
'earnings_ytd' => [
[
'name' => 'Regular',
'amount' => '76800.00',
'rate' => '60.00',
'units' => '1280.00'
]
],
'deductions' => [
'Federal Tax' => '1056.00',
'Social Security' => '297.60',
'Medicare' => '69.60',
'State Tax' => '64.80'
],
'deductions_ytd' => [
'Federal Tax' => '16896.00',
'Social Security' => '4761.60',
'Medicare' => '1113.60',
'State Tax' => '1036.80'
],
'document_id' => 'a41d7e9c05b24f6b8e3c1d5a7f92b604'
]
],
'w2s' => [
[
'year' => '2025',
'document_id' => '3f1c8a90b7d2416e9a5c0e4f2b8d6a17',
'fields' => [
'wages' => '124800.00'
]
]
],
'shifts' => [
[
'start_date' => '2026-08-18',
'end_date' => '2026-08-18',
'timezone' => 'America/Chicago',
'time_entries' => [
[
'entry_date' => '2026-08-18',
'start' => '08:00',
'end' => '16:30'
]
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Client-Id: <api-key>",
"X-Access-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/"
payload := strings.NewReader("{\n \"label\": \"Acme - salaried, biweekly\",\n \"description\": \"Full-time salaried user with two paystubs\",\n \"products\": [\n \"income\"\n ],\n \"enabled\": false,\n \"username\": \"acme.salaried\",\n \"password\": \"s4ndb0x\",\n \"provider_id\": \"adp\",\n \"company_domain\": \"acme.com\",\n \"is_refresh\": true,\n \"behavior_status\": \"login_error\",\n \"behavior_error_message\": \"Your account has been locked after too many attempts.\",\n \"behavior_duration_seconds\": 45,\n \"behavior_mfa\": {\n \"challenges\": [\n {\n \"type\": \"TEXT\",\n \"label\": \"Enter the code we sent to your phone\",\n \"answer\": \"12345\"\n },\n {\n \"type\": \"OPTIONS\",\n \"label\": \"Where should we send your code?\",\n \"options\": [\n {\n \"value\": \"sms\",\n \"label\": \"Text message\"\n },\n {\n \"value\": \"email\",\n \"label\": \"Email\"\n }\n ],\n \"answers\": [\n \"sms\",\n \"email\"\n ]\n }\n ]\n },\n \"payload\": {\n \"flags\": {\n \"is_fraudulent\": false,\n \"is_suspicious\": true\n },\n \"employments\": [\n {\n \"profile\": {\n \"full_name\": \"Jane Roe\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Roe\",\n \"ssn\": \"991-91-9991\",\n \"date_of_birth\": \"1988-04-12\",\n \"email\": \"jane.roe@acme.com\",\n \"phone\": \"4155554193\",\n \"home_address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"company\": {\n \"name\": \"Acme Inc.\",\n \"ein\": \"123456789\",\n \"domain\": \"acme.com\",\n \"phone\": \"4155554193\",\n \"address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"job_title\": \"Staff Engineer\",\n \"job_type\": \"F\",\n \"start_date\": \"2022-03-01\",\n \"end_date\": null,\n \"original_hire_date\": \"2019-07-08\",\n \"is_active\": true,\n \"manager_name\": \"Jenny McDouglas\",\n \"income\": \"124800.00\",\n \"income_unit\": \"YEARLY\",\n \"income_currency\": \"USD\",\n \"pay_rate\": \"60.00\",\n \"pay_frequency\": \"BW\",\n \"bank_accounts\": [\n {\n \"bank_name\": \"Acme CU\",\n \"account_name\": \"Everyday\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"111000025\",\n \"account_type\": \"C\",\n \"deposit_type\": \"A\",\n \"deposit_value\": \"500.00\"\n }\n ],\n \"paystubs\": [\n {\n \"pay_date\": \"2026-08-14\",\n \"period_start\": \"2026-08-01\",\n \"period_end\": \"2026-08-14\",\n \"currency\": \"USD\",\n \"gross_pay\": \"4800.00\",\n \"net_pay\": \"3312.00\",\n \"gross_pay_ytd\": \"76800.00\",\n \"net_pay_ytd\": \"52992.00\",\n \"hours\": \"80.00\",\n \"basis_of_pay\": \"S\",\n \"earnings\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"4800.00\",\n \"rate\": \"60.00\",\n \"units\": \"80.00\"\n }\n ],\n \"earnings_ytd\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"76800.00\",\n \"rate\": \"60.00\",\n \"units\": \"1280.00\"\n }\n ],\n \"deductions\": {\n \"Federal Tax\": \"1056.00\",\n \"Social Security\": \"297.60\",\n \"Medicare\": \"69.60\",\n \"State Tax\": \"64.80\"\n },\n \"deductions_ytd\": {\n \"Federal Tax\": \"16896.00\",\n \"Social Security\": \"4761.60\",\n \"Medicare\": \"1113.60\",\n \"State Tax\": \"1036.80\"\n },\n \"document_id\": \"a41d7e9c05b24f6b8e3c1d5a7f92b604\"\n }\n ],\n \"w2s\": [\n {\n \"year\": \"2025\",\n \"document_id\": \"3f1c8a90b7d2416e9a5c0e4f2b8d6a17\",\n \"fields\": {\n \"wages\": \"124800.00\"\n }\n }\n ],\n \"shifts\": [\n {\n \"start_date\": \"2026-08-18\",\n \"end_date\": \"2026-08-18\",\n \"timezone\": \"America/Chicago\",\n \"time_entries\": [\n {\n \"entry_date\": \"2026-08-18\",\n \"start\": \"08:00\",\n \"end\": \"16:30\"\n }\n ]\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Access-Client-Id", "<api-key>")
req.Header.Add("X-Access-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"Acme - salaried, biweekly\",\n \"description\": \"Full-time salaried user with two paystubs\",\n \"products\": [\n \"income\"\n ],\n \"enabled\": false,\n \"username\": \"acme.salaried\",\n \"password\": \"s4ndb0x\",\n \"provider_id\": \"adp\",\n \"company_domain\": \"acme.com\",\n \"is_refresh\": true,\n \"behavior_status\": \"login_error\",\n \"behavior_error_message\": \"Your account has been locked after too many attempts.\",\n \"behavior_duration_seconds\": 45,\n \"behavior_mfa\": {\n \"challenges\": [\n {\n \"type\": \"TEXT\",\n \"label\": \"Enter the code we sent to your phone\",\n \"answer\": \"12345\"\n },\n {\n \"type\": \"OPTIONS\",\n \"label\": \"Where should we send your code?\",\n \"options\": [\n {\n \"value\": \"sms\",\n \"label\": \"Text message\"\n },\n {\n \"value\": \"email\",\n \"label\": \"Email\"\n }\n ],\n \"answers\": [\n \"sms\",\n \"email\"\n ]\n }\n ]\n },\n \"payload\": {\n \"flags\": {\n \"is_fraudulent\": false,\n \"is_suspicious\": true\n },\n \"employments\": [\n {\n \"profile\": {\n \"full_name\": \"Jane Roe\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Roe\",\n \"ssn\": \"991-91-9991\",\n \"date_of_birth\": \"1988-04-12\",\n \"email\": \"jane.roe@acme.com\",\n \"phone\": \"4155554193\",\n \"home_address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"company\": {\n \"name\": \"Acme Inc.\",\n \"ein\": \"123456789\",\n \"domain\": \"acme.com\",\n \"phone\": \"4155554193\",\n \"address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"job_title\": \"Staff Engineer\",\n \"job_type\": \"F\",\n \"start_date\": \"2022-03-01\",\n \"end_date\": null,\n \"original_hire_date\": \"2019-07-08\",\n \"is_active\": true,\n \"manager_name\": \"Jenny McDouglas\",\n \"income\": \"124800.00\",\n \"income_unit\": \"YEARLY\",\n \"income_currency\": \"USD\",\n \"pay_rate\": \"60.00\",\n \"pay_frequency\": \"BW\",\n \"bank_accounts\": [\n {\n \"bank_name\": \"Acme CU\",\n \"account_name\": \"Everyday\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"111000025\",\n \"account_type\": \"C\",\n \"deposit_type\": \"A\",\n \"deposit_value\": \"500.00\"\n }\n ],\n \"paystubs\": [\n {\n \"pay_date\": \"2026-08-14\",\n \"period_start\": \"2026-08-01\",\n \"period_end\": \"2026-08-14\",\n \"currency\": \"USD\",\n \"gross_pay\": \"4800.00\",\n \"net_pay\": \"3312.00\",\n \"gross_pay_ytd\": \"76800.00\",\n \"net_pay_ytd\": \"52992.00\",\n \"hours\": \"80.00\",\n \"basis_of_pay\": \"S\",\n \"earnings\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"4800.00\",\n \"rate\": \"60.00\",\n \"units\": \"80.00\"\n }\n ],\n \"earnings_ytd\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"76800.00\",\n \"rate\": \"60.00\",\n \"units\": \"1280.00\"\n }\n ],\n \"deductions\": {\n \"Federal Tax\": \"1056.00\",\n \"Social Security\": \"297.60\",\n \"Medicare\": \"69.60\",\n \"State Tax\": \"64.80\"\n },\n \"deductions_ytd\": {\n \"Federal Tax\": \"16896.00\",\n \"Social Security\": \"4761.60\",\n \"Medicare\": \"1113.60\",\n \"State Tax\": \"1036.80\"\n },\n \"document_id\": \"a41d7e9c05b24f6b8e3c1d5a7f92b604\"\n }\n ],\n \"w2s\": [\n {\n \"year\": \"2025\",\n \"document_id\": \"3f1c8a90b7d2416e9a5c0e4f2b8d6a17\",\n \"fields\": {\n \"wages\": \"124800.00\"\n }\n }\n ],\n \"shifts\": [\n {\n \"start_date\": \"2026-08-18\",\n \"end_date\": \"2026-08-18\",\n \"timezone\": \"America/Chicago\",\n \"time_entries\": [\n {\n \"entry_date\": \"2026-08-18\",\n \"start\": \"08:00\",\n \"end\": \"16:30\"\n }\n ]\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Access-Client-Id"] = '<api-key>'
request["X-Access-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"Acme - salaried, biweekly\",\n \"description\": \"Full-time salaried user with two paystubs\",\n \"products\": [\n \"income\"\n ],\n \"enabled\": false,\n \"username\": \"acme.salaried\",\n \"password\": \"s4ndb0x\",\n \"provider_id\": \"adp\",\n \"company_domain\": \"acme.com\",\n \"is_refresh\": true,\n \"behavior_status\": \"login_error\",\n \"behavior_error_message\": \"Your account has been locked after too many attempts.\",\n \"behavior_duration_seconds\": 45,\n \"behavior_mfa\": {\n \"challenges\": [\n {\n \"type\": \"TEXT\",\n \"label\": \"Enter the code we sent to your phone\",\n \"answer\": \"12345\"\n },\n {\n \"type\": \"OPTIONS\",\n \"label\": \"Where should we send your code?\",\n \"options\": [\n {\n \"value\": \"sms\",\n \"label\": \"Text message\"\n },\n {\n \"value\": \"email\",\n \"label\": \"Email\"\n }\n ],\n \"answers\": [\n \"sms\",\n \"email\"\n ]\n }\n ]\n },\n \"payload\": {\n \"flags\": {\n \"is_fraudulent\": false,\n \"is_suspicious\": true\n },\n \"employments\": [\n {\n \"profile\": {\n \"full_name\": \"Jane Roe\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Roe\",\n \"ssn\": \"991-91-9991\",\n \"date_of_birth\": \"1988-04-12\",\n \"email\": \"jane.roe@acme.com\",\n \"phone\": \"4155554193\",\n \"home_address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"company\": {\n \"name\": \"Acme Inc.\",\n \"ein\": \"123456789\",\n \"domain\": \"acme.com\",\n \"phone\": \"4155554193\",\n \"address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"job_title\": \"Staff Engineer\",\n \"job_type\": \"F\",\n \"start_date\": \"2022-03-01\",\n \"end_date\": null,\n \"original_hire_date\": \"2019-07-08\",\n \"is_active\": true,\n \"manager_name\": \"Jenny McDouglas\",\n \"income\": \"124800.00\",\n \"income_unit\": \"YEARLY\",\n \"income_currency\": \"USD\",\n \"pay_rate\": \"60.00\",\n \"pay_frequency\": \"BW\",\n \"bank_accounts\": [\n {\n \"bank_name\": \"Acme CU\",\n \"account_name\": \"Everyday\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"111000025\",\n \"account_type\": \"C\",\n \"deposit_type\": \"A\",\n \"deposit_value\": \"500.00\"\n }\n ],\n \"paystubs\": [\n {\n \"pay_date\": \"2026-08-14\",\n \"period_start\": \"2026-08-01\",\n \"period_end\": \"2026-08-14\",\n \"currency\": \"USD\",\n \"gross_pay\": \"4800.00\",\n \"net_pay\": \"3312.00\",\n \"gross_pay_ytd\": \"76800.00\",\n \"net_pay_ytd\": \"52992.00\",\n \"hours\": \"80.00\",\n \"basis_of_pay\": \"S\",\n \"earnings\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"4800.00\",\n \"rate\": \"60.00\",\n \"units\": \"80.00\"\n }\n ],\n \"earnings_ytd\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"76800.00\",\n \"rate\": \"60.00\",\n \"units\": \"1280.00\"\n }\n ],\n \"deductions\": {\n \"Federal Tax\": \"1056.00\",\n \"Social Security\": \"297.60\",\n \"Medicare\": \"69.60\",\n \"State Tax\": \"64.80\"\n },\n \"deductions_ytd\": {\n \"Federal Tax\": \"16896.00\",\n \"Social Security\": \"4761.60\",\n \"Medicare\": \"1113.60\",\n \"State Tax\": \"1036.80\"\n },\n \"document_id\": \"a41d7e9c05b24f6b8e3c1d5a7f92b604\"\n }\n ],\n \"w2s\": [\n {\n \"year\": \"2025\",\n \"document_id\": \"3f1c8a90b7d2416e9a5c0e4f2b8d6a17\",\n \"fields\": {\n \"wages\": \"124800.00\"\n }\n }\n ],\n \"shifts\": [\n {\n \"start_date\": \"2026-08-18\",\n \"end_date\": \"2026-08-18\",\n \"timezone\": \"America/Chicago\",\n \"time_entries\": [\n {\n \"entry_date\": \"2026-08-18\",\n \"start\": \"08:00\",\n \"end\": \"16:30\"\n }\n ]\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "7b9f0c2a4d6e4f1b8c3a5d7e9f0b1c2d",
"data_source": "payroll",
"label": "Acme - salaried, biweekly",
"description": "Full-time salaried user with two paystubs",
"products": [
"income"
],
"enabled": true,
"username": "acme.salaried",
"password": "s4ndb0x",
"provider_id": null,
"company_domain": null,
"is_refresh": null,
"filenames": [],
"ssn_last4": null,
"date_of_birth": null,
"phone": null,
"behavior_status": "done",
"behavior_error_message": "",
"behavior_duration_seconds": 0,
"behavior_mfa": {
"challenges": [
{
"type": "TEXT",
"label": "Enter the code we sent to your phone",
"answer": "12345"
},
{
"type": "OPTIONS",
"label": "Where should we send your code?",
"options": [
{
"value": "sms",
"label": "Text message"
},
{
"value": "email",
"label": "Email"
}
],
"answers": [
"sms",
"email"
]
}
]
},
"payload": {
"flags": {
"is_fraudulent": false,
"is_suspicious": true
},
"employments": [
{
"profile": {
"full_name": "Jane Roe",
"first_name": "Jane",
"last_name": "Roe",
"ssn": "991-91-9991",
"date_of_birth": "1988-04-12",
"email": "jane.roe@acme.com",
"phone": "4155554193",
"home_address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"company": {
"name": "Acme Inc.",
"ein": "123456789",
"domain": "acme.com",
"phone": "4155554193",
"address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"job_title": "Staff Engineer",
"job_type": "F",
"start_date": "2022-03-01",
"end_date": null,
"original_hire_date": "2019-07-08",
"is_active": true,
"manager_name": "Jenny McDouglas",
"income": "124800.00",
"income_unit": "YEARLY",
"income_currency": "USD",
"pay_rate": "60.00",
"pay_frequency": "BW",
"bank_accounts": [
{
"bank_name": "Acme CU",
"account_name": "Everyday",
"account_number": "1234567890",
"routing_number": "111000025",
"account_type": "C",
"deposit_type": "A",
"deposit_value": "500.00"
}
],
"paystubs": [
{
"pay_date": "2026-08-14",
"period_start": "2026-08-01",
"period_end": "2026-08-14",
"currency": "USD",
"gross_pay": "4800.00",
"net_pay": "3312.00",
"gross_pay_ytd": "76800.00",
"net_pay_ytd": "52992.00",
"hours": "80.00",
"basis_of_pay": "S",
"earnings": [
{
"name": "Regular",
"amount": "4800.00",
"rate": "60.00",
"units": "80.00"
}
],
"earnings_ytd": [
{
"name": "Regular",
"amount": "76800.00",
"rate": "60.00",
"units": "1280.00"
}
],
"deductions": {
"Federal Tax": "1056.00",
"Social Security": "297.60",
"Medicare": "69.60",
"State Tax": "64.80"
},
"deductions_ytd": {
"Federal Tax": "16896.00",
"Social Security": "4761.60",
"Medicare": "1113.60",
"State Tax": "1036.80"
},
"document_id": "a41d7e9c05b24f6b8e3c1d5a7f92b604"
}
],
"w2s": [
{
"year": "2025",
"document_id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"fields": {
"wages": "124800.00"
}
}
],
"shifts": [
{
"start_date": "2026-08-18",
"end_date": "2026-08-18",
"timezone": "America/Chicago",
"time_entries": [
{
"entry_date": "2026-08-18",
"start": "08:00",
"end": "16:30"
}
]
}
]
}
]
},
"created_at": "2026-09-17T10:04:11.482913Z",
"updated_at": "2026-09-17T10:04:11.482931Z"
}{
"error": {
"code": "reserved_credential",
"message": "Username 'goodlogin' is reserved for Truv's documented sandbox logins."
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "env_not_sandbox",
"message": "Sandbox configuration requires a sandbox key; this key is 'prod'."
}
}{
"error": {
"code": "not_found",
"message": "Requested object not found."
}
}Update a sandbox scenario
Partially updates a sandbox scenario. A top-level key present in the body replaces that key entirely and an absent key is left untouched, payload included - send the complete payload object rather than a fragment. PUT behaves identically.
You cannot change data_source after creating a scenario. To use another data source, create a new scenario with that source and a compatible payload.
curl --request PATCH \
--url https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/ \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"label": "Acme - salaried, biweekly",
"description": "Full-time salaried user with two paystubs",
"products": [
"income"
],
"enabled": false,
"username": "acme.salaried",
"password": "s4ndb0x",
"provider_id": "adp",
"company_domain": "acme.com",
"is_refresh": true,
"behavior_status": "login_error",
"behavior_error_message": "Your account has been locked after too many attempts.",
"behavior_duration_seconds": 45,
"behavior_mfa": {
"challenges": [
{
"type": "TEXT",
"label": "Enter the code we sent to your phone",
"answer": "12345"
},
{
"type": "OPTIONS",
"label": "Where should we send your code?",
"options": [
{
"value": "sms",
"label": "Text message"
},
{
"value": "email",
"label": "Email"
}
],
"answers": [
"sms",
"email"
]
}
]
},
"payload": {
"flags": {
"is_fraudulent": false,
"is_suspicious": true
},
"employments": [
{
"profile": {
"full_name": "Jane Roe",
"first_name": "Jane",
"last_name": "Roe",
"ssn": "991-91-9991",
"date_of_birth": "1988-04-12",
"email": "jane.roe@acme.com",
"phone": "4155554193",
"home_address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"company": {
"name": "Acme Inc.",
"ein": "123456789",
"domain": "acme.com",
"phone": "4155554193",
"address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"job_title": "Staff Engineer",
"job_type": "F",
"start_date": "2022-03-01",
"end_date": null,
"original_hire_date": "2019-07-08",
"is_active": true,
"manager_name": "Jenny McDouglas",
"income": "124800.00",
"income_unit": "YEARLY",
"income_currency": "USD",
"pay_rate": "60.00",
"pay_frequency": "BW",
"bank_accounts": [
{
"bank_name": "Acme CU",
"account_name": "Everyday",
"account_number": "1234567890",
"routing_number": "111000025",
"account_type": "C",
"deposit_type": "A",
"deposit_value": "500.00"
}
],
"paystubs": [
{
"pay_date": "2026-08-14",
"period_start": "2026-08-01",
"period_end": "2026-08-14",
"currency": "USD",
"gross_pay": "4800.00",
"net_pay": "3312.00",
"gross_pay_ytd": "76800.00",
"net_pay_ytd": "52992.00",
"hours": "80.00",
"basis_of_pay": "S",
"earnings": [
{
"name": "Regular",
"amount": "4800.00",
"rate": "60.00",
"units": "80.00"
}
],
"earnings_ytd": [
{
"name": "Regular",
"amount": "76800.00",
"rate": "60.00",
"units": "1280.00"
}
],
"deductions": {
"Federal Tax": "1056.00",
"Social Security": "297.60",
"Medicare": "69.60",
"State Tax": "64.80"
},
"deductions_ytd": {
"Federal Tax": "16896.00",
"Social Security": "4761.60",
"Medicare": "1113.60",
"State Tax": "1036.80"
},
"document_id": "a41d7e9c05b24f6b8e3c1d5a7f92b604"
}
],
"w2s": [
{
"year": "2025",
"document_id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"fields": {
"wages": "124800.00"
}
}
],
"shifts": [
{
"start_date": "2026-08-18",
"end_date": "2026-08-18",
"timezone": "America/Chicago",
"time_entries": [
{
"entry_date": "2026-08-18",
"start": "08:00",
"end": "16:30"
}
]
}
]
}
]
}
}
'import requests
url = "https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/"
payload = {
"label": "Acme - salaried, biweekly",
"description": "Full-time salaried user with two paystubs",
"products": ["income"],
"enabled": False,
"username": "acme.salaried",
"password": "s4ndb0x",
"provider_id": "adp",
"company_domain": "acme.com",
"is_refresh": True,
"behavior_status": "login_error",
"behavior_error_message": "Your account has been locked after too many attempts.",
"behavior_duration_seconds": 45,
"behavior_mfa": { "challenges": [
{
"type": "TEXT",
"label": "Enter the code we sent to your phone",
"answer": "12345"
},
{
"type": "OPTIONS",
"label": "Where should we send your code?",
"options": [
{
"value": "sms",
"label": "Text message"
},
{
"value": "email",
"label": "Email"
}
],
"answers": ["sms", "email"]
}
] },
"payload": {
"flags": {
"is_fraudulent": False,
"is_suspicious": True
},
"employments": [
{
"profile": {
"full_name": "Jane Roe",
"first_name": "Jane",
"last_name": "Roe",
"ssn": "991-91-9991",
"date_of_birth": "1988-04-12",
"email": "jane.roe@acme.com",
"phone": "4155554193",
"home_address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"company": {
"name": "Acme Inc.",
"ein": "123456789",
"domain": "acme.com",
"phone": "4155554193",
"address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"job_title": "Staff Engineer",
"job_type": "F",
"start_date": "2022-03-01",
"end_date": None,
"original_hire_date": "2019-07-08",
"is_active": True,
"manager_name": "Jenny McDouglas",
"income": "124800.00",
"income_unit": "YEARLY",
"income_currency": "USD",
"pay_rate": "60.00",
"pay_frequency": "BW",
"bank_accounts": [
{
"bank_name": "Acme CU",
"account_name": "Everyday",
"account_number": "1234567890",
"routing_number": "111000025",
"account_type": "C",
"deposit_type": "A",
"deposit_value": "500.00"
}
],
"paystubs": [
{
"pay_date": "2026-08-14",
"period_start": "2026-08-01",
"period_end": "2026-08-14",
"currency": "USD",
"gross_pay": "4800.00",
"net_pay": "3312.00",
"gross_pay_ytd": "76800.00",
"net_pay_ytd": "52992.00",
"hours": "80.00",
"basis_of_pay": "S",
"earnings": [
{
"name": "Regular",
"amount": "4800.00",
"rate": "60.00",
"units": "80.00"
}
],
"earnings_ytd": [
{
"name": "Regular",
"amount": "76800.00",
"rate": "60.00",
"units": "1280.00"
}
],
"deductions": {
"Federal Tax": "1056.00",
"Social Security": "297.60",
"Medicare": "69.60",
"State Tax": "64.80"
},
"deductions_ytd": {
"Federal Tax": "16896.00",
"Social Security": "4761.60",
"Medicare": "1113.60",
"State Tax": "1036.80"
},
"document_id": "a41d7e9c05b24f6b8e3c1d5a7f92b604"
}
],
"w2s": [
{
"year": "2025",
"document_id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"fields": { "wages": "124800.00" }
}
],
"shifts": [
{
"start_date": "2026-08-18",
"end_date": "2026-08-18",
"timezone": "America/Chicago",
"time_entries": [
{
"entry_date": "2026-08-18",
"start": "08:00",
"end": "16:30"
}
]
}
]
}
]
}
}
headers = {
"X-Access-Client-Id": "<api-key>",
"X-Access-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Access-Client-Id': '<api-key>',
'X-Access-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
label: 'Acme - salaried, biweekly',
description: 'Full-time salaried user with two paystubs',
products: ['income'],
enabled: false,
username: 'acme.salaried',
password: 's4ndb0x',
provider_id: 'adp',
company_domain: 'acme.com',
is_refresh: true,
behavior_status: 'login_error',
behavior_error_message: 'Your account has been locked after too many attempts.',
behavior_duration_seconds: 45,
behavior_mfa: {
challenges: [
{type: 'TEXT', label: 'Enter the code we sent to your phone', answer: '12345'},
{
type: 'OPTIONS',
label: 'Where should we send your code?',
options: [{value: 'sms', label: 'Text message'}, {value: 'email', label: 'Email'}],
answers: ['sms', 'email']
}
]
},
payload: {
flags: {is_fraudulent: false, is_suspicious: true},
employments: [
{
profile: {
full_name: 'Jane Roe',
first_name: 'Jane',
last_name: 'Roe',
ssn: '991-91-9991',
date_of_birth: '1988-04-12',
email: 'jane.roe@acme.com',
phone: '4155554193',
home_address: {street: '1 Main St', city: 'Austin', state: 'TX', zip: '78701', country: 'US'}
},
company: {
name: 'Acme Inc.',
ein: '123456789',
domain: 'acme.com',
phone: '4155554193',
address: {street: '1 Main St', city: 'Austin', state: 'TX', zip: '78701', country: 'US'}
},
job_title: 'Staff Engineer',
job_type: 'F',
start_date: '2022-03-01',
end_date: null,
original_hire_date: '2019-07-08',
is_active: true,
manager_name: 'Jenny McDouglas',
income: '124800.00',
income_unit: 'YEARLY',
income_currency: 'USD',
pay_rate: '60.00',
pay_frequency: 'BW',
bank_accounts: [
{
bank_name: 'Acme CU',
account_name: 'Everyday',
account_number: '1234567890',
routing_number: '111000025',
account_type: 'C',
deposit_type: 'A',
deposit_value: '500.00'
}
],
paystubs: [
{
pay_date: '2026-08-14',
period_start: '2026-08-01',
period_end: '2026-08-14',
currency: 'USD',
gross_pay: '4800.00',
net_pay: '3312.00',
gross_pay_ytd: '76800.00',
net_pay_ytd: '52992.00',
hours: '80.00',
basis_of_pay: 'S',
earnings: [{name: 'Regular', amount: '4800.00', rate: '60.00', units: '80.00'}],
earnings_ytd: [{name: 'Regular', amount: '76800.00', rate: '60.00', units: '1280.00'}],
deductions: {
'Federal Tax': '1056.00',
'Social Security': '297.60',
Medicare: '69.60',
'State Tax': '64.80'
},
deductions_ytd: {
'Federal Tax': '16896.00',
'Social Security': '4761.60',
Medicare: '1113.60',
'State Tax': '1036.80'
},
document_id: 'a41d7e9c05b24f6b8e3c1d5a7f92b604'
}
],
w2s: [
{
year: '2025',
document_id: '3f1c8a90b7d2416e9a5c0e4f2b8d6a17',
fields: {wages: '124800.00'}
}
],
shifts: [
{
start_date: '2026-08-18',
end_date: '2026-08-18',
timezone: 'America/Chicago',
time_entries: [{entry_date: '2026-08-18', start: '08:00', end: '16:30'}]
}
]
}
]
}
})
};
fetch('https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'label' => 'Acme - salaried, biweekly',
'description' => 'Full-time salaried user with two paystubs',
'products' => [
'income'
],
'enabled' => false,
'username' => 'acme.salaried',
'password' => 's4ndb0x',
'provider_id' => 'adp',
'company_domain' => 'acme.com',
'is_refresh' => true,
'behavior_status' => 'login_error',
'behavior_error_message' => 'Your account has been locked after too many attempts.',
'behavior_duration_seconds' => 45,
'behavior_mfa' => [
'challenges' => [
[
'type' => 'TEXT',
'label' => 'Enter the code we sent to your phone',
'answer' => '12345'
],
[
'type' => 'OPTIONS',
'label' => 'Where should we send your code?',
'options' => [
[
'value' => 'sms',
'label' => 'Text message'
],
[
'value' => 'email',
'label' => 'Email'
]
],
'answers' => [
'sms',
'email'
]
]
]
],
'payload' => [
'flags' => [
'is_fraudulent' => false,
'is_suspicious' => true
],
'employments' => [
[
'profile' => [
'full_name' => 'Jane Roe',
'first_name' => 'Jane',
'last_name' => 'Roe',
'ssn' => '991-91-9991',
'date_of_birth' => '1988-04-12',
'email' => 'jane.roe@acme.com',
'phone' => '4155554193',
'home_address' => [
'street' => '1 Main St',
'city' => 'Austin',
'state' => 'TX',
'zip' => '78701',
'country' => 'US'
]
],
'company' => [
'name' => 'Acme Inc.',
'ein' => '123456789',
'domain' => 'acme.com',
'phone' => '4155554193',
'address' => [
'street' => '1 Main St',
'city' => 'Austin',
'state' => 'TX',
'zip' => '78701',
'country' => 'US'
]
],
'job_title' => 'Staff Engineer',
'job_type' => 'F',
'start_date' => '2022-03-01',
'end_date' => null,
'original_hire_date' => '2019-07-08',
'is_active' => true,
'manager_name' => 'Jenny McDouglas',
'income' => '124800.00',
'income_unit' => 'YEARLY',
'income_currency' => 'USD',
'pay_rate' => '60.00',
'pay_frequency' => 'BW',
'bank_accounts' => [
[
'bank_name' => 'Acme CU',
'account_name' => 'Everyday',
'account_number' => '1234567890',
'routing_number' => '111000025',
'account_type' => 'C',
'deposit_type' => 'A',
'deposit_value' => '500.00'
]
],
'paystubs' => [
[
'pay_date' => '2026-08-14',
'period_start' => '2026-08-01',
'period_end' => '2026-08-14',
'currency' => 'USD',
'gross_pay' => '4800.00',
'net_pay' => '3312.00',
'gross_pay_ytd' => '76800.00',
'net_pay_ytd' => '52992.00',
'hours' => '80.00',
'basis_of_pay' => 'S',
'earnings' => [
[
'name' => 'Regular',
'amount' => '4800.00',
'rate' => '60.00',
'units' => '80.00'
]
],
'earnings_ytd' => [
[
'name' => 'Regular',
'amount' => '76800.00',
'rate' => '60.00',
'units' => '1280.00'
]
],
'deductions' => [
'Federal Tax' => '1056.00',
'Social Security' => '297.60',
'Medicare' => '69.60',
'State Tax' => '64.80'
],
'deductions_ytd' => [
'Federal Tax' => '16896.00',
'Social Security' => '4761.60',
'Medicare' => '1113.60',
'State Tax' => '1036.80'
],
'document_id' => 'a41d7e9c05b24f6b8e3c1d5a7f92b604'
]
],
'w2s' => [
[
'year' => '2025',
'document_id' => '3f1c8a90b7d2416e9a5c0e4f2b8d6a17',
'fields' => [
'wages' => '124800.00'
]
]
],
'shifts' => [
[
'start_date' => '2026-08-18',
'end_date' => '2026-08-18',
'timezone' => 'America/Chicago',
'time_entries' => [
[
'entry_date' => '2026-08-18',
'start' => '08:00',
'end' => '16:30'
]
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Client-Id: <api-key>",
"X-Access-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/"
payload := strings.NewReader("{\n \"label\": \"Acme - salaried, biweekly\",\n \"description\": \"Full-time salaried user with two paystubs\",\n \"products\": [\n \"income\"\n ],\n \"enabled\": false,\n \"username\": \"acme.salaried\",\n \"password\": \"s4ndb0x\",\n \"provider_id\": \"adp\",\n \"company_domain\": \"acme.com\",\n \"is_refresh\": true,\n \"behavior_status\": \"login_error\",\n \"behavior_error_message\": \"Your account has been locked after too many attempts.\",\n \"behavior_duration_seconds\": 45,\n \"behavior_mfa\": {\n \"challenges\": [\n {\n \"type\": \"TEXT\",\n \"label\": \"Enter the code we sent to your phone\",\n \"answer\": \"12345\"\n },\n {\n \"type\": \"OPTIONS\",\n \"label\": \"Where should we send your code?\",\n \"options\": [\n {\n \"value\": \"sms\",\n \"label\": \"Text message\"\n },\n {\n \"value\": \"email\",\n \"label\": \"Email\"\n }\n ],\n \"answers\": [\n \"sms\",\n \"email\"\n ]\n }\n ]\n },\n \"payload\": {\n \"flags\": {\n \"is_fraudulent\": false,\n \"is_suspicious\": true\n },\n \"employments\": [\n {\n \"profile\": {\n \"full_name\": \"Jane Roe\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Roe\",\n \"ssn\": \"991-91-9991\",\n \"date_of_birth\": \"1988-04-12\",\n \"email\": \"jane.roe@acme.com\",\n \"phone\": \"4155554193\",\n \"home_address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"company\": {\n \"name\": \"Acme Inc.\",\n \"ein\": \"123456789\",\n \"domain\": \"acme.com\",\n \"phone\": \"4155554193\",\n \"address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"job_title\": \"Staff Engineer\",\n \"job_type\": \"F\",\n \"start_date\": \"2022-03-01\",\n \"end_date\": null,\n \"original_hire_date\": \"2019-07-08\",\n \"is_active\": true,\n \"manager_name\": \"Jenny McDouglas\",\n \"income\": \"124800.00\",\n \"income_unit\": \"YEARLY\",\n \"income_currency\": \"USD\",\n \"pay_rate\": \"60.00\",\n \"pay_frequency\": \"BW\",\n \"bank_accounts\": [\n {\n \"bank_name\": \"Acme CU\",\n \"account_name\": \"Everyday\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"111000025\",\n \"account_type\": \"C\",\n \"deposit_type\": \"A\",\n \"deposit_value\": \"500.00\"\n }\n ],\n \"paystubs\": [\n {\n \"pay_date\": \"2026-08-14\",\n \"period_start\": \"2026-08-01\",\n \"period_end\": \"2026-08-14\",\n \"currency\": \"USD\",\n \"gross_pay\": \"4800.00\",\n \"net_pay\": \"3312.00\",\n \"gross_pay_ytd\": \"76800.00\",\n \"net_pay_ytd\": \"52992.00\",\n \"hours\": \"80.00\",\n \"basis_of_pay\": \"S\",\n \"earnings\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"4800.00\",\n \"rate\": \"60.00\",\n \"units\": \"80.00\"\n }\n ],\n \"earnings_ytd\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"76800.00\",\n \"rate\": \"60.00\",\n \"units\": \"1280.00\"\n }\n ],\n \"deductions\": {\n \"Federal Tax\": \"1056.00\",\n \"Social Security\": \"297.60\",\n \"Medicare\": \"69.60\",\n \"State Tax\": \"64.80\"\n },\n \"deductions_ytd\": {\n \"Federal Tax\": \"16896.00\",\n \"Social Security\": \"4761.60\",\n \"Medicare\": \"1113.60\",\n \"State Tax\": \"1036.80\"\n },\n \"document_id\": \"a41d7e9c05b24f6b8e3c1d5a7f92b604\"\n }\n ],\n \"w2s\": [\n {\n \"year\": \"2025\",\n \"document_id\": \"3f1c8a90b7d2416e9a5c0e4f2b8d6a17\",\n \"fields\": {\n \"wages\": \"124800.00\"\n }\n }\n ],\n \"shifts\": [\n {\n \"start_date\": \"2026-08-18\",\n \"end_date\": \"2026-08-18\",\n \"timezone\": \"America/Chicago\",\n \"time_entries\": [\n {\n \"entry_date\": \"2026-08-18\",\n \"start\": \"08:00\",\n \"end\": \"16:30\"\n }\n ]\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Access-Client-Id", "<api-key>")
req.Header.Add("X-Access-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"Acme - salaried, biweekly\",\n \"description\": \"Full-time salaried user with two paystubs\",\n \"products\": [\n \"income\"\n ],\n \"enabled\": false,\n \"username\": \"acme.salaried\",\n \"password\": \"s4ndb0x\",\n \"provider_id\": \"adp\",\n \"company_domain\": \"acme.com\",\n \"is_refresh\": true,\n \"behavior_status\": \"login_error\",\n \"behavior_error_message\": \"Your account has been locked after too many attempts.\",\n \"behavior_duration_seconds\": 45,\n \"behavior_mfa\": {\n \"challenges\": [\n {\n \"type\": \"TEXT\",\n \"label\": \"Enter the code we sent to your phone\",\n \"answer\": \"12345\"\n },\n {\n \"type\": \"OPTIONS\",\n \"label\": \"Where should we send your code?\",\n \"options\": [\n {\n \"value\": \"sms\",\n \"label\": \"Text message\"\n },\n {\n \"value\": \"email\",\n \"label\": \"Email\"\n }\n ],\n \"answers\": [\n \"sms\",\n \"email\"\n ]\n }\n ]\n },\n \"payload\": {\n \"flags\": {\n \"is_fraudulent\": false,\n \"is_suspicious\": true\n },\n \"employments\": [\n {\n \"profile\": {\n \"full_name\": \"Jane Roe\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Roe\",\n \"ssn\": \"991-91-9991\",\n \"date_of_birth\": \"1988-04-12\",\n \"email\": \"jane.roe@acme.com\",\n \"phone\": \"4155554193\",\n \"home_address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"company\": {\n \"name\": \"Acme Inc.\",\n \"ein\": \"123456789\",\n \"domain\": \"acme.com\",\n \"phone\": \"4155554193\",\n \"address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"job_title\": \"Staff Engineer\",\n \"job_type\": \"F\",\n \"start_date\": \"2022-03-01\",\n \"end_date\": null,\n \"original_hire_date\": \"2019-07-08\",\n \"is_active\": true,\n \"manager_name\": \"Jenny McDouglas\",\n \"income\": \"124800.00\",\n \"income_unit\": \"YEARLY\",\n \"income_currency\": \"USD\",\n \"pay_rate\": \"60.00\",\n \"pay_frequency\": \"BW\",\n \"bank_accounts\": [\n {\n \"bank_name\": \"Acme CU\",\n \"account_name\": \"Everyday\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"111000025\",\n \"account_type\": \"C\",\n \"deposit_type\": \"A\",\n \"deposit_value\": \"500.00\"\n }\n ],\n \"paystubs\": [\n {\n \"pay_date\": \"2026-08-14\",\n \"period_start\": \"2026-08-01\",\n \"period_end\": \"2026-08-14\",\n \"currency\": \"USD\",\n \"gross_pay\": \"4800.00\",\n \"net_pay\": \"3312.00\",\n \"gross_pay_ytd\": \"76800.00\",\n \"net_pay_ytd\": \"52992.00\",\n \"hours\": \"80.00\",\n \"basis_of_pay\": \"S\",\n \"earnings\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"4800.00\",\n \"rate\": \"60.00\",\n \"units\": \"80.00\"\n }\n ],\n \"earnings_ytd\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"76800.00\",\n \"rate\": \"60.00\",\n \"units\": \"1280.00\"\n }\n ],\n \"deductions\": {\n \"Federal Tax\": \"1056.00\",\n \"Social Security\": \"297.60\",\n \"Medicare\": \"69.60\",\n \"State Tax\": \"64.80\"\n },\n \"deductions_ytd\": {\n \"Federal Tax\": \"16896.00\",\n \"Social Security\": \"4761.60\",\n \"Medicare\": \"1113.60\",\n \"State Tax\": \"1036.80\"\n },\n \"document_id\": \"a41d7e9c05b24f6b8e3c1d5a7f92b604\"\n }\n ],\n \"w2s\": [\n {\n \"year\": \"2025\",\n \"document_id\": \"3f1c8a90b7d2416e9a5c0e4f2b8d6a17\",\n \"fields\": {\n \"wages\": \"124800.00\"\n }\n }\n ],\n \"shifts\": [\n {\n \"start_date\": \"2026-08-18\",\n \"end_date\": \"2026-08-18\",\n \"timezone\": \"America/Chicago\",\n \"time_entries\": [\n {\n \"entry_date\": \"2026-08-18\",\n \"start\": \"08:00\",\n \"end\": \"16:30\"\n }\n ]\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/sandbox/scenarios/{scenario_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Access-Client-Id"] = '<api-key>'
request["X-Access-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"Acme - salaried, biweekly\",\n \"description\": \"Full-time salaried user with two paystubs\",\n \"products\": [\n \"income\"\n ],\n \"enabled\": false,\n \"username\": \"acme.salaried\",\n \"password\": \"s4ndb0x\",\n \"provider_id\": \"adp\",\n \"company_domain\": \"acme.com\",\n \"is_refresh\": true,\n \"behavior_status\": \"login_error\",\n \"behavior_error_message\": \"Your account has been locked after too many attempts.\",\n \"behavior_duration_seconds\": 45,\n \"behavior_mfa\": {\n \"challenges\": [\n {\n \"type\": \"TEXT\",\n \"label\": \"Enter the code we sent to your phone\",\n \"answer\": \"12345\"\n },\n {\n \"type\": \"OPTIONS\",\n \"label\": \"Where should we send your code?\",\n \"options\": [\n {\n \"value\": \"sms\",\n \"label\": \"Text message\"\n },\n {\n \"value\": \"email\",\n \"label\": \"Email\"\n }\n ],\n \"answers\": [\n \"sms\",\n \"email\"\n ]\n }\n ]\n },\n \"payload\": {\n \"flags\": {\n \"is_fraudulent\": false,\n \"is_suspicious\": true\n },\n \"employments\": [\n {\n \"profile\": {\n \"full_name\": \"Jane Roe\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Roe\",\n \"ssn\": \"991-91-9991\",\n \"date_of_birth\": \"1988-04-12\",\n \"email\": \"jane.roe@acme.com\",\n \"phone\": \"4155554193\",\n \"home_address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"company\": {\n \"name\": \"Acme Inc.\",\n \"ein\": \"123456789\",\n \"domain\": \"acme.com\",\n \"phone\": \"4155554193\",\n \"address\": {\n \"street\": \"1 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"zip\": \"78701\",\n \"country\": \"US\"\n }\n },\n \"job_title\": \"Staff Engineer\",\n \"job_type\": \"F\",\n \"start_date\": \"2022-03-01\",\n \"end_date\": null,\n \"original_hire_date\": \"2019-07-08\",\n \"is_active\": true,\n \"manager_name\": \"Jenny McDouglas\",\n \"income\": \"124800.00\",\n \"income_unit\": \"YEARLY\",\n \"income_currency\": \"USD\",\n \"pay_rate\": \"60.00\",\n \"pay_frequency\": \"BW\",\n \"bank_accounts\": [\n {\n \"bank_name\": \"Acme CU\",\n \"account_name\": \"Everyday\",\n \"account_number\": \"1234567890\",\n \"routing_number\": \"111000025\",\n \"account_type\": \"C\",\n \"deposit_type\": \"A\",\n \"deposit_value\": \"500.00\"\n }\n ],\n \"paystubs\": [\n {\n \"pay_date\": \"2026-08-14\",\n \"period_start\": \"2026-08-01\",\n \"period_end\": \"2026-08-14\",\n \"currency\": \"USD\",\n \"gross_pay\": \"4800.00\",\n \"net_pay\": \"3312.00\",\n \"gross_pay_ytd\": \"76800.00\",\n \"net_pay_ytd\": \"52992.00\",\n \"hours\": \"80.00\",\n \"basis_of_pay\": \"S\",\n \"earnings\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"4800.00\",\n \"rate\": \"60.00\",\n \"units\": \"80.00\"\n }\n ],\n \"earnings_ytd\": [\n {\n \"name\": \"Regular\",\n \"amount\": \"76800.00\",\n \"rate\": \"60.00\",\n \"units\": \"1280.00\"\n }\n ],\n \"deductions\": {\n \"Federal Tax\": \"1056.00\",\n \"Social Security\": \"297.60\",\n \"Medicare\": \"69.60\",\n \"State Tax\": \"64.80\"\n },\n \"deductions_ytd\": {\n \"Federal Tax\": \"16896.00\",\n \"Social Security\": \"4761.60\",\n \"Medicare\": \"1113.60\",\n \"State Tax\": \"1036.80\"\n },\n \"document_id\": \"a41d7e9c05b24f6b8e3c1d5a7f92b604\"\n }\n ],\n \"w2s\": [\n {\n \"year\": \"2025\",\n \"document_id\": \"3f1c8a90b7d2416e9a5c0e4f2b8d6a17\",\n \"fields\": {\n \"wages\": \"124800.00\"\n }\n }\n ],\n \"shifts\": [\n {\n \"start_date\": \"2026-08-18\",\n \"end_date\": \"2026-08-18\",\n \"timezone\": \"America/Chicago\",\n \"time_entries\": [\n {\n \"entry_date\": \"2026-08-18\",\n \"start\": \"08:00\",\n \"end\": \"16:30\"\n }\n ]\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "7b9f0c2a4d6e4f1b8c3a5d7e9f0b1c2d",
"data_source": "payroll",
"label": "Acme - salaried, biweekly",
"description": "Full-time salaried user with two paystubs",
"products": [
"income"
],
"enabled": true,
"username": "acme.salaried",
"password": "s4ndb0x",
"provider_id": null,
"company_domain": null,
"is_refresh": null,
"filenames": [],
"ssn_last4": null,
"date_of_birth": null,
"phone": null,
"behavior_status": "done",
"behavior_error_message": "",
"behavior_duration_seconds": 0,
"behavior_mfa": {
"challenges": [
{
"type": "TEXT",
"label": "Enter the code we sent to your phone",
"answer": "12345"
},
{
"type": "OPTIONS",
"label": "Where should we send your code?",
"options": [
{
"value": "sms",
"label": "Text message"
},
{
"value": "email",
"label": "Email"
}
],
"answers": [
"sms",
"email"
]
}
]
},
"payload": {
"flags": {
"is_fraudulent": false,
"is_suspicious": true
},
"employments": [
{
"profile": {
"full_name": "Jane Roe",
"first_name": "Jane",
"last_name": "Roe",
"ssn": "991-91-9991",
"date_of_birth": "1988-04-12",
"email": "jane.roe@acme.com",
"phone": "4155554193",
"home_address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"company": {
"name": "Acme Inc.",
"ein": "123456789",
"domain": "acme.com",
"phone": "4155554193",
"address": {
"street": "1 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
},
"job_title": "Staff Engineer",
"job_type": "F",
"start_date": "2022-03-01",
"end_date": null,
"original_hire_date": "2019-07-08",
"is_active": true,
"manager_name": "Jenny McDouglas",
"income": "124800.00",
"income_unit": "YEARLY",
"income_currency": "USD",
"pay_rate": "60.00",
"pay_frequency": "BW",
"bank_accounts": [
{
"bank_name": "Acme CU",
"account_name": "Everyday",
"account_number": "1234567890",
"routing_number": "111000025",
"account_type": "C",
"deposit_type": "A",
"deposit_value": "500.00"
}
],
"paystubs": [
{
"pay_date": "2026-08-14",
"period_start": "2026-08-01",
"period_end": "2026-08-14",
"currency": "USD",
"gross_pay": "4800.00",
"net_pay": "3312.00",
"gross_pay_ytd": "76800.00",
"net_pay_ytd": "52992.00",
"hours": "80.00",
"basis_of_pay": "S",
"earnings": [
{
"name": "Regular",
"amount": "4800.00",
"rate": "60.00",
"units": "80.00"
}
],
"earnings_ytd": [
{
"name": "Regular",
"amount": "76800.00",
"rate": "60.00",
"units": "1280.00"
}
],
"deductions": {
"Federal Tax": "1056.00",
"Social Security": "297.60",
"Medicare": "69.60",
"State Tax": "64.80"
},
"deductions_ytd": {
"Federal Tax": "16896.00",
"Social Security": "4761.60",
"Medicare": "1113.60",
"State Tax": "1036.80"
},
"document_id": "a41d7e9c05b24f6b8e3c1d5a7f92b604"
}
],
"w2s": [
{
"year": "2025",
"document_id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"fields": {
"wages": "124800.00"
}
}
],
"shifts": [
{
"start_date": "2026-08-18",
"end_date": "2026-08-18",
"timezone": "America/Chicago",
"time_entries": [
{
"entry_date": "2026-08-18",
"start": "08:00",
"end": "16:30"
}
]
}
]
}
]
},
"created_at": "2026-09-17T10:04:11.482913Z",
"updated_at": "2026-09-17T10:04:11.482931Z"
}{
"error": {
"code": "reserved_credential",
"message": "Username 'goodlogin' is reserved for Truv's documented sandbox logins."
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "env_not_sandbox",
"message": "Sandbox configuration requires a sandbox key; this key is 'prod'."
}
}{
"error": {
"code": "not_found",
"message": "Requested object not found."
}
}Authorizations
Client ID
Client Access Key
Path Parameters
Body
A partial update. A top-level key present in the body replaces that key entirely, and an absent key is left untouched - payload included, so send the complete object rather than a fragment. PUT behaves identically. data_source cannot be changed after create.
How the scenario is recognized in a list.
128"Acme - salaried, biweekly"
Free-form notes about what the case covers.
2000"Full-time salaried user with two paystubs"
Products the scenario applies to. Empty matches every product.
income, employment, deposit_switch, pll, insurance, transactions, assets, admin, credit, education ["income"]
Whether the scenario takes part in resolution.
false
The login the user types, matched exactly.
255"acme.salaried"
The password the user types.
255"s4ndb0x"
Narrows the match to one data provider.
64"adp"
Narrows the match to one company.
128"acme.com"
Narrows the match to refreshes or to initial verifications.
true
Terminal status the task settles on.
done, error, login_error, account_locked, mfa_error, config_error, no_data, unavailable, unable_to_reset, not_supported "login_error"
Error message surfaced on a failing task.
500"Your account has been locked after too many attempts."
Artificial delay before the task settles.
0 <= x <= 12045
Multi-factor authentication (MFA) screens replayed before the scenario's data is returned.
Show child attributes
Show child attributes
{
"challenges": [
{
"type": "TEXT",
"label": "Enter the code we sent to your phone",
"answer": "12345"
},
{
"type": "OPTIONS",
"label": "Where should we send your code?",
"options": [
{ "value": "sms", "label": "Text message" },
{ "value": "email", "label": "Email" }
],
"answers": ["sms", "email"]
}
]
}
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.
Show child attributes
Show child attributes
Response
A client-authored sandbox case - what it matches on, how it behaves, and the data it returns.
Unique identifier of the scenario.
64"7b9f0c2a4d6e4f1b8c3a5d7e9f0b1c2d"
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.
payroll, docs, financial_accounts, education, credit, insurance "payroll"
How the scenario is recognized in a list. Unique per data source within your account.
128"Acme - salaried, biweekly"
Free-form notes about what the case covers.
2000"Full-time salaried user with two paystubs"
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.
income, employment, deposit_switch, pll, insurance, transactions, assets, admin, credit, education ["income"]
Whether the scenario takes part in resolution.
true
The login the user types, matched exactly.
255"acme.salaried"
The password the user types. Omit it to match on username alone.
255"s4ndb0x"
Narrows the match to one data provider. Null when the scenario does not set it.
64null
Narrows the match to one company. Null when the scenario does not set it.
128null
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.
null
Uploaded filenames that select this case. Document upload only.
255[]
Last four SSN digits that select this case. Education and credit only, so null on a payroll scenario.
4null
Date of birth that selects this case. Education only, so null on a payroll scenario.
null
Phone number that selects this case, stored in E.164. Credit only, so null on a payroll scenario.
32null
Terminal status the task settles on.
done, error, login_error, account_locked, mfa_error, config_error, no_data, unavailable, unable_to_reset, not_supported "done"
Error message surfaced on a failing task. Empty on a scenario that succeeds.
500""
Artificial delay before the task settles.
0 <= x <= 1200
MFA screens replayed before the data is returned. Empty unless the scenario declares any.
Show child attributes
Show child attributes
{
"challenges": [
{
"type": "TEXT",
"label": "Enter the code we sent to your phone",
"answer": "12345"
},
{
"type": "OPTIONS",
"label": "Where should we send your code?",
"options": [
{ "value": "sms", "label": "Text message" },
{ "value": "email", "label": "Email" }
],
"answers": ["sms", "email"]
}
]
}
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.
Show child attributes
Show child attributes
Time when the scenario was created.
"2026-09-17T10:04:11.482913Z"
Time when the scenario was last updated.
"2026-09-17T10:04:11.482931Z"
Was this page helpful?