publishedAt
is removed and replaced by status
In Strapi 5, the Draft & Publish feature has been reworked, and the Content API, including REST, GraphQL, and Document Service APIs accept a new status
parameter.
This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.
🔌 Is this breaking change affecting plugins? | Yes |
---|
🤖 Is this breaking change automatically handled by a codemod? | Yes |
---|
Breaking change description
In Strapi v4
publishedAt
is used in the request body and accepts the following values:
null
sets an entry in draft,- A date string (e.g.,
2021-10-28T16:57:26.352Z
) sets the entry to published status.
In Strapi 5
status
is used as a query parameter and accepts the following values:
draft
sets a in the draft version,published
sets a in the published version.
Migration
This section regroups useful notes and procedures about the introduced breaking change.
Notes
- Additional information about how to use the new
status
parameter can be found in the REST API, GraphQL API, and Document Service API documentation.
Migration procedure
- API calls initiated from the front end (REST API, GraphQL API) that used
publishedAt
need to be manually updated.