Set or clear flag expiry
set_flag_expirySet or clear the removal date for a feature flag so stale flags are reported as expired once that date passes. Takes a date or ISO-8601 timestamp, or null to clear.
Instructions
Set the date a flag is expected to be removed by, or pass expiresAtUtc: null to clear it. Expiry is advisory: evaluation never changes. Once the date passes, find_stale_flags reports the flag as expired. expiresAtUtc takes a date (2026-12-31), which means the end of that day in UTC, the same as picking it in the dashboard, or a full ISO-8601 timestamp, which is stored exactly. Refused with EXPIRY_IN_PAST for a time that has already passed (today's date is allowed), with FEATURE_NOT_ENABLED while flag expiration is not enabled for the organization, and with PERMANENT_FLAG_HAS_EXPIRY on a permanent flag (make it temporary first with set_flag_permanent). Clearing is always allowed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flag | Yes | Flag key or id | |
| project | Yes | Project key | |
| expiresAtUtc | Yes | Date (YYYY-MM-DD, end of that UTC day) or ISO-8601 timestamp, or null to clear the expiry |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flag | Yes | ||
| project | Yes | ||
| expiresAtUtc | Yes |