# Sandbox triggers Make something happen in the sandbox on demand, so you can test your alert handling without waiting. Sandbox only: these routes exist for `sk_test_` keys. A live key gets `404 not_found`. A trigger never writes a notice itself. It makes a real change to a sandbox listing through the same pipeline as any other change, and the notice, the webhook delivery and the [events list](endpoints/list-events.md) follow as they would on live. ## When a trigger fails A trigger is checked when you send it, and the change is made a moment later. Something can change in between, and where a matching listing can sit is only known when it is placed. So a trigger that was accepted with `202` can still end as `failed`, with a `reason`. **Failures that count against the limit.** These six are about your request or your data. The trigger counts as one of the key's 10 an hour, like one that was done: | `reason` | What it means | | ------------------------- | ----------------------------------------------------------------------------------------------------------- | | `criteria_unsatisfiable` | No made-up listing could be placed to match the search, for example a location outside the sandbox's region. | | `saved_search_gone` | The saved search was deleted before the change was made. | | `saved_search_not_active` | The saved search was paused before the change was made. | | `account_gone` | The account no longer exists. | | `listing_gone` | The listing was removed before the change was made. | | `change_not_possible` | The listing changed meanwhile, and that change can no longer be made to it. | **Failures that don't count.** Any other `reason`, such as `worker_error` or `no_notice`, means the fault is ours. The trigger is given back: it doesn't count against the limit, and you can send it again. ## What is refused A refused request changes nothing and doesn't count against the limit: | Answer | When | | -------------------------------------- | ---------------------------------------------------------------------------------------- | | `404 not_found` | The saved search or favorite belongs to another consumer or account. | | `409 sandbox_listing_protected` | A named edge case (keys starting `SBX9`), or removing a listing your triggers didn't make. | | `409 saved_search_not_active` | The saved search is paused; `status` says how. | | `409 sandbox_trigger_not_possible` | `reason` is `alerts_off`, `criteria_unsatisfiable` (with `field`) or `change_not_possible`. | | `429 rate_limited`, with `Retry-After` | More than 10 triggers for one key within an hour. Triggers that were done count, and so do the failures listed above. | ## Good to know - **The sandbox is shared.** A trigger's change is real for everyone using the sandbox, so another developer's saved search may match your listing too, and yours may match theirs. - **Clean-up.** Listings a trigger made are removed after 24 hours. - **The sandbox also changes by itself.** Every 5 minutes a few listings get a new price, status, photo or open house, new listings arrive, and once an hour some are removed. You can test against that without sending any trigger. ## Endpoints Each has its own page, with its parameters, its answers field by field and its errors: - [`POST /v1/sandbox/triggers`](endpoints/create-sandbox-trigger.md) - [`GET /v1/sandbox/triggers/{id}`](endpoints/get-sandbox-trigger.md)