curl --request POST \
--url 'https://api-prod.usefini.com/v2/test-sets/44c1f705-8e1a-4f61-8c4c-d519d37fb6b7/runs/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"ruleExecutionMode": "simulate",
"promptVersionId": "9bc3fb9f-85fd-496e-90b3-bcc80ff12d70"
}'
const testSetId = '44c1f705-8e1a-4f61-8c4c-d519d37fb6b7';
const response = await fetch(`https://api-prod.usefini.com/v2/test-sets/${testSetId}/runs/public`, {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ruleExecutionMode: 'simulate',
promptVersionId: '9bc3fb9f-85fd-496e-90b3-bcc80ff12d70'
})
});
const run = await response.json();
import requests
test_set_id = "44c1f705-8e1a-4f61-8c4c-d519d37fb6b7"
response = requests.post(
f"https://api-prod.usefini.com/v2/test-sets/{test_set_id}/runs/public",
headers={
"Authorization": "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
json={
"ruleExecutionMode": "simulate",
"promptVersionId": "9bc3fb9f-85fd-496e-90b3-bcc80ff12d70",
},
)
run = response.json()
{
"id": "5afd818a-a5f9-4e1b-9619-3c7191c12d9a",
"testSetId": "44c1f705-8e1a-4f61-8c4c-d519d37fb6b7",
"status": "running",
"result": null,
"createdBy": null,
"createdAt": "2026-07-28T09:01:14.000Z",
"updatedAt": "2026-07-28T09:01:14.000Z"
}
Test Sets
Start a run
Queue an asynchronous run for one test set.
POST
/
v2
/
test-sets
/
{testSetId}
/
runs
/
public
curl --request POST \
--url 'https://api-prod.usefini.com/v2/test-sets/44c1f705-8e1a-4f61-8c4c-d519d37fb6b7/runs/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"ruleExecutionMode": "simulate",
"promptVersionId": "9bc3fb9f-85fd-496e-90b3-bcc80ff12d70"
}'
const testSetId = '44c1f705-8e1a-4f61-8c4c-d519d37fb6b7';
const response = await fetch(`https://api-prod.usefini.com/v2/test-sets/${testSetId}/runs/public`, {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ruleExecutionMode: 'simulate',
promptVersionId: '9bc3fb9f-85fd-496e-90b3-bcc80ff12d70'
})
});
const run = await response.json();
import requests
test_set_id = "44c1f705-8e1a-4f61-8c4c-d519d37fb6b7"
response = requests.post(
f"https://api-prod.usefini.com/v2/test-sets/{test_set_id}/runs/public",
headers={
"Authorization": "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
json={
"ruleExecutionMode": "simulate",
"promptVersionId": "9bc3fb9f-85fd-496e-90b3-bcc80ff12d70",
},
)
run = response.json()
{
"id": "5afd818a-a5f9-4e1b-9619-3c7191c12d9a",
"testSetId": "44c1f705-8e1a-4f61-8c4c-d519d37fb6b7",
"status": "running",
"result": null,
"createdBy": null,
"createdAt": "2026-07-28T09:01:14.000Z",
"updatedAt": "2026-07-28T09:01:14.000Z"
}
Queues a run and returns the created run with
status: "running" and result: null. Poll Get a run until status becomes completed or failed.
Use
simulate unless live side effects are intentional. execute can call your configured external APIs once for every replayed conversation in the set.Headers
string
required
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs write scope.string
required
application/jsonPath parameters
string
required
Test set ID.
Body parameters
enum
How Rulebook logic runs during the replay. Supported values:
reuse, simulate, and execute. Defaults to simulate.string
Optional Behavior version ID to use for the run. Only valid when
ruleExecutionMode is simulate or execute.Response
Returns the created Run object.curl --request POST \
--url 'https://api-prod.usefini.com/v2/test-sets/44c1f705-8e1a-4f61-8c4c-d519d37fb6b7/runs/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"ruleExecutionMode": "simulate",
"promptVersionId": "9bc3fb9f-85fd-496e-90b3-bcc80ff12d70"
}'
const testSetId = '44c1f705-8e1a-4f61-8c4c-d519d37fb6b7';
const response = await fetch(`https://api-prod.usefini.com/v2/test-sets/${testSetId}/runs/public`, {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ruleExecutionMode: 'simulate',
promptVersionId: '9bc3fb9f-85fd-496e-90b3-bcc80ff12d70'
})
});
const run = await response.json();
import requests
test_set_id = "44c1f705-8e1a-4f61-8c4c-d519d37fb6b7"
response = requests.post(
f"https://api-prod.usefini.com/v2/test-sets/{test_set_id}/runs/public",
headers={
"Authorization": "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
json={
"ruleExecutionMode": "simulate",
"promptVersionId": "9bc3fb9f-85fd-496e-90b3-bcc80ff12d70",
},
)
run = response.json()
{
"id": "5afd818a-a5f9-4e1b-9619-3c7191c12d9a",
"testSetId": "44c1f705-8e1a-4f61-8c4c-d519d37fb6b7",
"status": "running",
"result": null,
"createdBy": null,
"createdAt": "2026-07-28T09:01:14.000Z",
"updatedAt": "2026-07-28T09:01:14.000Z"
}
Was this page helpful?

