---
title: "Sets or removes the project's default flag lifetime, in days (1–3650; null removes it)."
method: PUT
path: "/api/v1/orgs/{org}/projects/{project}/default-flag-lifetime"
tags: ["Projects"]
---

# Sets or removes the project's default flag lifetime, in days (1–3650; null removes it).

`PUT /api/v1/orgs/{org}/projects/{project}/default-flag-lifetime`

## Request

- Base URL: `https://api.featureflip.io`
- URL: `https://api.featureflip.io/api/v1/orgs/{org}/projects/{project}/default-flag-lifetime`
- Auth: API key in header `Authorization`

Temporary
flags with no expiry date of their own then expire that many days after they were created, reported
as `expirySource: "project-default"`. Takes effect at the next hourly staleness run. Requires at
least Member, and the default-flag-lifetime feature to set one (400 `FEATURE_NOT_ENABLED`);
removing one is always allowed. `days` is required; send `{"days": null}` to remove.

## Path parameters

- `org` string, required
- `project` string, required

## Request body

- PublicSetDefaultFlagLifetimeRequest: Request body for `PUT /api/v1/orgs/{org}/projects/{project}/default-flag-lifetime`. `days` is 1–3650, or an explicit null to remove the default. `days` is required: a body without it (`{}`, or a misspelled field) is a `validation_failed` 400, never a removal, so a typo can't silently wipe the setting (#3788). A request with no body is rejected too.
  - `days` integer, nullable, required

## Response `204`

No Content

## Other responses

- `400`: The request is malformed, or it carries an If-Match header, which this endpoint can't evaluate. Send no If-Match, or `*`.
- `401`: Authentication is required, or the supplied API token is invalid or expired.
- `403`: Forbidden
- `404`: Not Found
- `429`: Rate limit exceeded. Retry after the interval indicated by the Retry-After header.

---

[API](https://skmtc.dev/featureflip/apis/management-api.md) · [All operations](https://skmtc.dev/featureflip/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/featureflip/apis/management-api/revisions/8a77e8581a45?raw)
