Test-run a task
Fire the task once as a test. The run does real research and produces real output, but every write-style tool refuses and every configured delivery is captured on the run instead of being sent. Poll the returned run, then read captured_deliveries for the exact message each channel would have received. Called from an agent chat, the chat is signalled when the run ends, so it need not poll.
To test an event-triggered task against a sample record (a fake order, lead or form answer), pass event: the run receives it as its trigger event exactly as it would a real one, with type set to the task's event_conditions.event_type. Test the real task this way; there is no need to copy it onto a temporary webhook source. Without event, an event task runs with no trigger event. The task's condition_script is not applied to a test run.
A test run never counts as a run of the task: it does not advance next_run_at, does not reset or trip the failure breaker, does not count toward autonomy graduation or max_runs_per_day, and does not appear in the run history a later run reads. It does consume credits. 400 if event is malformed or the task is not event-triggered; 422 if the task already has a run in flight or the account is out of AI credits.
Request
- Base URL: https://api.crevio.co/v1
- URL: https://api.crevio.co/v1/tasks/{id}/run_test
- Auth: API key in header Authorization
Path parameters
Task id (task_...)
Headers
Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.
Request body
Response
Accepted — the test run executes in the background; poll GET /task_runs/{id}.
Changes
No recorded changes to this operation across all 2 revisions of this API.