---
title: "Run scheduled fires only when a URL's content changed [write]"
method: PUT
path: "/routines/{id}/precheck"
---

# Run scheduled fires only when a URL's content changed \[write\]

`PUT /routines/{id}/precheck`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/routines/{id}/precheck`
- Auth: HTTP bearer

Before each scheduled fire the platform GETs `url` and compares its content with the content at the last scheduled fire that ran. The same content skips the fire: it is recorded as a run with error.type `precheck_unchanged` and no session, and nothing is charged. New content, and the first check, run the fire. A check that cannot be completed (a redirect, a status outside 2xx, more than 256 KiB, more than 5 seconds, a host that is not on the public internet) never skips: the fire runs and the reason is kept in `last_error`. Manual runs, API runs and inbound-URL runs never consult it. The URL must be https on the default port, with no user name or password, and must not point at a private, loopback or link-local address (400 otherwise); it is fetched with no credentials. Setting a URL forgets what the earlier check remembered. An archived routine answers 409.

## Path parameters

- `id` string, required

## Request body

- object
  - `url` string, required

## Response `200`

OK

- object
  - `precheck` object, required
    - `routine_id` string, required
    - `url` string, required
    - `created_at` string, required
    - `last_checked_at` string, nullable, required: When the URL was last checked before a scheduled fire
    - `last_result` 'changed' | 'unchanged' | 'failed' | 'null', nullable, required: changed: the fire ran. unchanged: the fire was skipped. failed: the check could not be completed and the fire ran anyway.
    - `last_error` object, nullable, required: {type, message} when last_result is failed. Types: address_not_allowed · dns_failed · redirect · http_status · too_large · timeout · network.

## Other responses

- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/routines/:id/precheck/put.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
