Import crontab
import_crontabReads a crontab and proposes one monitor per scheduled line. Without apply=1 nothing is written; the proposal says what was ignored and why. Passwords in the command are redacted. The body is the crontab itself, as text/plain. Without ?apply=1 nothing is written: you get the proposal — what would become a monitor, what was ignored and why, and what still fits in the free tier. With apply=1 it is all or nothing, under the same rules as POST /api/endpoints. Comments, variables and @reboot are ignored (there is no way to know when to expect a reboot); @daily and friends become the equivalent expression. The command becomes the monitor name, with passwords and tokens redacted first — the name travels in the alert e-mail, in the public dashboard and in the badge. Returns: { applied, recognized, ignored, existing, would_create, created?, free_tier }
Example: crontab -l | curl -s -XPOST "$ORIGIN/api/import/crontab?apply=1" -H "X-Guest-Token: $HP" -H "content-type: text/plain" --data-binary @-
Errors: 400: crontab_sem_agenda — no schedule line was recognised.; 401: No credential, or an invalid one. See this endpoint's auth.; 402: Payment required. The x402 terms (USDC on Base) come in the PAYMENT-REQUIRED header and in accepts[]: pay and repeat the same call with PAYMENT-SIGNATURE (x402 v2) or X-PAYMENT (v1). A standard x402 client such as @x402/fetch does this for you.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | "1" to create the monitors | |
| crontab | Yes | the crontab text | |
| guest_token | Yes | Private owner token returned by guest creation. Sent in X-Guest-Token; reuse it for this owner's resources. |