curl --request POST --fail-with-body --max-time 30 \
"${AMLOK_API_BASE_URL}/v1/sandbox/runs" \
--header "Authorization: Bearer ${AMLOK_API_KEY}" \
--header 'Accept: application/json' \
--header 'Idempotency-Key: createSandboxRun-synthetic-0042' \
--header 'Content-Type: application/json' \
--data '{"scenario_id":"healthy","fixture_id":"maple-retail","catalog_version":"2026-11-07.1"}'import os
import requests
headers = {'Accept': 'application/json', 'Idempotency-Key': 'createSandboxRun-synthetic-0042', 'Content-Type': 'application/json'}
headers["Authorization"] = "Bearer " + os.environ["AMLOK_API_KEY"]
response = requests.request('POST', os.environ["AMLOK_API_BASE_URL"] + '/v1/sandbox/runs', headers=headers, json={'scenario_id': 'healthy', 'fixture_id': 'maple-retail', 'catalog_version': '2026-11-07.1'}, timeout=30, allow_redirects=False)
response.raise_for_status()
print(response.json())
const headers = {"Accept": "application/json", "Idempotency-Key": "createSandboxRun-synthetic-0042", "Content-Type": "application/json"};
headers.Authorization = `Bearer ${process.env.AMLOK_API_KEY}`;
const response = await fetch(process.env.AMLOK_API_BASE_URL + "/v1/sandbox/runs", {
method: "POST", headers, redirect: "error", signal: AbortSignal.timeout(30000),
body: JSON.stringify({"scenario_id": "healthy", "fixture_id": "maple-retail", "catalog_version": "2026-11-07.1"})
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
{
"data": {
"id": "srun_example",
"scenario_id": "healthy",
"fixture_id": "maple-retail",
"catalog_version": "2026-11-07.1",
"status": "queued",
"created_at": "2026-11-07T12:00:00Z",
"updated_at": "2026-11-07T12:00:00Z",
"completed_at": null,
"error": null,
"assertions": [],
"resources": [],
"steps": []
},
"meta": {
"request_id": "req_example",
"schema_version": "1.0.0",
"environment": "sandbox"
}
}{
"error": {
"code": "validation_error",
"message": "Validation error.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "unauthenticated",
"message": "Unauthenticated.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "insufficient_credits",
"message": "Insufficient credits.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "forbidden",
"message": "Forbidden.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "not_found",
"message": "Not found.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "idempotency_conflict",
"message": "Idempotency conflict.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "cursor_expired",
"message": "Cursor expired.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "payload_too_large",
"message": "payload too large",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "unsupported_media_type",
"message": "unsupported media type",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "validation_error",
"message": "Validation error.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limited.",
"retryable": true,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "temporarily_unavailable",
"message": "Temporarily unavailable.",
"retryable": true,
"request_id": "req_synthetic",
"field": null
}
}Run a Sandbox scenario
Run a Sandbox scenario.
curl --request POST --fail-with-body --max-time 30 \
"${AMLOK_API_BASE_URL}/v1/sandbox/runs" \
--header "Authorization: Bearer ${AMLOK_API_KEY}" \
--header 'Accept: application/json' \
--header 'Idempotency-Key: createSandboxRun-synthetic-0042' \
--header 'Content-Type: application/json' \
--data '{"scenario_id":"healthy","fixture_id":"maple-retail","catalog_version":"2026-11-07.1"}'import os
import requests
headers = {'Accept': 'application/json', 'Idempotency-Key': 'createSandboxRun-synthetic-0042', 'Content-Type': 'application/json'}
headers["Authorization"] = "Bearer " + os.environ["AMLOK_API_KEY"]
response = requests.request('POST', os.environ["AMLOK_API_BASE_URL"] + '/v1/sandbox/runs', headers=headers, json={'scenario_id': 'healthy', 'fixture_id': 'maple-retail', 'catalog_version': '2026-11-07.1'}, timeout=30, allow_redirects=False)
response.raise_for_status()
print(response.json())
const headers = {"Accept": "application/json", "Idempotency-Key": "createSandboxRun-synthetic-0042", "Content-Type": "application/json"};
headers.Authorization = `Bearer ${process.env.AMLOK_API_KEY}`;
const response = await fetch(process.env.AMLOK_API_BASE_URL + "/v1/sandbox/runs", {
method: "POST", headers, redirect: "error", signal: AbortSignal.timeout(30000),
body: JSON.stringify({"scenario_id": "healthy", "fixture_id": "maple-retail", "catalog_version": "2026-11-07.1"})
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
{
"data": {
"id": "srun_example",
"scenario_id": "healthy",
"fixture_id": "maple-retail",
"catalog_version": "2026-11-07.1",
"status": "queued",
"created_at": "2026-11-07T12:00:00Z",
"updated_at": "2026-11-07T12:00:00Z",
"completed_at": null,
"error": null,
"assertions": [],
"resources": [],
"steps": []
},
"meta": {
"request_id": "req_example",
"schema_version": "1.0.0",
"environment": "sandbox"
}
}{
"error": {
"code": "validation_error",
"message": "Validation error.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "unauthenticated",
"message": "Unauthenticated.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "insufficient_credits",
"message": "Insufficient credits.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "forbidden",
"message": "Forbidden.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "not_found",
"message": "Not found.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "idempotency_conflict",
"message": "Idempotency conflict.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "cursor_expired",
"message": "Cursor expired.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "payload_too_large",
"message": "payload too large",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "unsupported_media_type",
"message": "unsupported media type",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "validation_error",
"message": "Validation error.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limited.",
"retryable": true,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "temporarily_unavailable",
"message": "Temporarily unavailable.",
"retryable": true,
"request_id": "req_synthetic",
"field": null
}
}Authorizations
Server-to-server API key bound to exactly one workspace, institution tenant and environment. No caller-supplied workspace override is accepted. Do not use in public browser code.
Headers
Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains.
1Sandbox-only deterministic test scenario on borrower creation, persisted for that borrower. On other operations or any Live request, reject before side effects with 400 sandbox_only. Omit for happy_path.
happy_path, source_reauthorization, document_required, missing_financial_input, restricted_report, provider_failure, insufficient_credits, monitoring_alert, payment_return, export_failure Body
Stable scenario identifier from the versioned catalog.
sample_pack, healthy, outside_policy, manual_review, document_required, document_recovery, source_reauthorization, source_recovery, consent_cancelled, consent_revoked, provider_failure, insufficient_credits, monitoring_alert, monitoring_recovery, monitoring_lifecycle, card_success, card_declined, ach_pending, ach_settled, ach_returned, payment_refund, autopay, export_success, export_failure, idempotency, validation_error, pagination, webhook_delivery, webhook_duplicate, webhook_out_of_order Fictional business definition used to create this run.
maple-retail, harbor-logistics, cedar-software, prairie-manufacturing, summit-hospitality, atlas-wholesale Exact catalog version; reject mismatches rather than silently changing test behavior.
Enabled webhook destination in this Sandbox. Required when send_webhooks is true.
Defaults to false. Explicitly opt in to signed HTTP delivery to the selected endpoint.