Skip to content

cancel_test

Cancel a test while it is still in review, before its ads run, with everything paid refunded.

POST/api/agent/tests/{id}/cancel
MCP tool cancel_testFree

cancel_test stops a test that is still in_review. Everything paid, the $29 launch fee included, goes back to the paying wallet in USDC on Base. A sandbox test paid test money, so nothing is owed for it.

Parameters

Name Type Description
id string Required. The test's id.
access_token string Needed when the test was paid without a key. Over REST, send it as the X-Test-Token header or ?token=.

With a key, the key needs the test scope.

Request

curl -X POST -H "Authorization: Bearer deca_sk_…" \
  https://app.decalabs.ai/api/agent/tests/TEST_ID/cancel

Response

The test, now cancelled, with the refund owed:

JSON
{
  "test": {
    "id": "…",
    "state": "cancelled",
    "refund": { "usd": 629, "tx": null, "status": "owed" },
    "next": "Cancelled before it was made. Everything paid, the launch fee included, is refunded to the paying wallet.",
    "…": "…"
  }
}

Calling it again on a cancelled test answers 409 cannot_cancel; the test stays cancelled.

After review

A test past review answers 409 cannot_cancel. Once its ads are being made or are running, write to hello@decalabs.ai to stop it: the ad budget not spent is refunded.