Skip to content

Expire stale pending AI suggestions (POST)

POST
/cron/expire-ai-suggestions
curl --request POST \
--url https://example.com/api/cron/expire-ai-suggestions

Scheduled daily by supabase/migrations/20260803000004_pgcron_expire_ai_suggestions.sql. Protected by CRON_SECRET via the x-cron-secret header only.

TTL sweep result

Media type application/json
object
ok
required

False when the sweep hit a database error; error then carries the message.

boolean
expired
required

Rows actually flipped from pending to expired by this run.

integer
truncated
required

True when a full page was selected — more stale suggestions remain; re-run.

boolean
error

Database error message; present only when ok is false.

string

Missing or invalid CRON_SECRET