# Content Freeze API reference

Query, set, and lift a content freeze programmatically using the Management API.

A content freeze pauses content creation, editing, and publishing across an environment or an entire project, while schema changes are promoted. This reference covers the `contentFreezes` query and the `setContentFreeze` and `liftContentFreeze` mutations, so you can read, start, and lift a freeze directly through the Management API.

For information on configuring a freeze from Studio and what editors see while one is active, see [Content Freeze](https://hygraph.com/docs/developer-guides/project/content-freeze).

## Authentication

Use a Permanent Auth Token or App Token with the **Management API**.

- **`contentFreezes`**: Any project member can read freeze history.
- **`setContentFreeze`** and **`liftContentFreeze`**: Require the **Allows starting, scheduling, and lifting content freezes** permission. The Admin role includes it by default; you can also grant it on custom roles or PATs.

## Retrieve content freeze

Returns every content freeze for the project, past and present, unless you filter the list. Run the `contentFreezes` query on `project`.

**Parameters**

| Argument | Type | Default | Description |
|---|---|---|---|
| `filter` | `ContentFreezeFilter` | `ALL` | Pass `OPEN` to return only freezes that haven't ended yet. |

`contentFreezes` doesn't take pagination arguments. It returns the full list for the project on every call. It also doesn't filter by environment. If you need freezes for a specific environment, filter the returned list on the `environment` field.

**Fields**

| Field | Type | Description |
|---|---|---|
| `id` | `ID!` | Unique identifier for the freeze. |
| `createdAt` | `DateTime!` | When the freeze record was created. |
| `updatedAt` | `DateTime!` | When the freeze record last changed. |
| `environment` | `Environment` | The environment this freeze applies to. Null for a project-wide freeze. |
| `startAt` | `DateTime!` | When the freeze begins. |
| `endAt` | `DateTime` | When the freeze ends. `null` for an open-ended freeze (no scheduled end). Set to a future time when you schedule an end, or to the current time when the freeze is lifted early. |
| `message` | `String` | Announcement message shown to editors. Null if none was set. |
| `setBy` | `CreatedBy` | Who started the freeze: a project member, Permanent Auth Token, or App Token. |
| `liftedBy` | `CreatedBy` | Who ended the freeze early: a project member, Permanent Auth Token, or App Token. `null` if it reached its scheduled end. |

### Example query

  **Query**

```graphql
query ContentFreezeQuery {
  viewer {
    project(id: "your-project-id") {
      contentFreezes(filter: OPEN) {
        id
        environment {
          name
        }
        startAt
        endAt
        message
        setBy {
          ... on Member {
            profile {
              name
            }
          }
        }
        liftedBy {
          ... on Member {
            id
            profile {
              name
            }
          }
        }
      }
    }
  }
}
```
  
  **Response**

```json
{
  "data": {
    "viewer": {
      "project": {
        "contentFreezes": [
          {
            "id": "fdacc0e66e044724bca5aca736ade52e",
            "environment": {
              "name": "master"
            },
            "startAt": "2026-07-15T22:00:00.000Z",
            "endAt": "2026-07-22T22:00:00.000Z",
            "message": null,
            "setBy": {
              "profile": {
                "name": "Admin User"
              }
            },
            "liftedBy": null
          }
        ]
      }
    }
  }
}
```


## Set content freeze

Use the `setContentFreeze` mutation to start a freeze or reschedule the current freeze. Requires the **Allows starting, scheduling, and lifting content freezes** permission.

**Parameters**

| Argument | Type | Required | Description |
|---|---|---|---|
| `data.projectId` | `ID!` | Yes | The project to freeze. |
| `data.environmentId` | `ID` | No | Target environment. Omit for a project-wide freeze. |
| `data.startAt` | `DateTime` | No | When the freeze begins. Omit to start immediately. |
| `data.endAt` | `DateTime` | No | When the freeze ends. Omit for an open-ended freeze. |
| `data.message` | `String` | No | Announcement message shown to editors. |

Each call applies to a single scope, either one environment or the whole project. To freeze multiple environments, call `setContentFreeze` once per environment ID. Calling it again for the same scope ends any open freeze for that scope and creates a new one.

`startAt` and `endAt` must not be in the past. If you set `endAt`, it must not be before `startAt`.

**Returns**

`ContentFreezePayload`, containing `project`. Query `contentFreezes` to confirm the resulting freeze.

### Examples

- **Set a project-wide freeze, starting immediately, with no end date:**

      **Mutation**

    ```graphql
    mutation SetProjectWideContentFreeze {
      setContentFreeze(data: { projectId: "your-project-id" }) {
        project {
          id
        }
      }
    }
    ```

      
      **Response**

    ```json
    {
      "data": {
        "setContentFreeze": {
          "project": {
            "id": "your-project-id"
          }
        }
      }
    }
    ```


- **Set a freeze scoped to one environment, with a message:**

      **Mutation**

    ```graphql
    mutation SetEnvironmentContentFreeze {
      setContentFreeze(
        data: {
          projectId: "your-project-id"
          environmentId: "your-environment-id"
          message: "Freezing content while we promote schema changes."
        }
      ) {
        project {
          id
        }
      }
    }
    ```

      
      **Response**

    ```json
    {
      "data": {
        "setContentFreeze": {
          "project": {
            "id": "your-project-id"
          }
        }
      }
    }
    ```


## Lift content freeze

Use the `liftContentFreeze` mutation to end the current freeze for a scope before its scheduled end. Requires the **Allows starting, scheduling, and lifting content freezes** permission.

**Parameters**

| Argument | Type | Required | Description |
|---|---|---|---|
| `data.projectId` | `ID!` | Yes | The project whose freeze you're lifting. |
| `data.environmentId` | `ID` | No | Target environment. Omit to lift a project-wide freeze. |

Lifting a freeze sets its `endAt` to the current time. The record isn't deleted; it remains queryable through `contentFreezes` as a record.

**Returns**

`ContentFreezePayload`, containing `project`. Query `contentFreezes` to confirm the freeze ended.

### Examples

- **Lift a project-wide freeze:**

      **Mutation**

        ```graphql
        mutation LiftProjectWideContentFreeze {
          liftContentFreeze(data: { projectId: "your-project-id" }) {
            project {
              id
            }
          }
        }
        ```

          
          **Response**

        ```json
        {
          "data": {
            "liftContentFreeze": {
              "project": {
                "id": "your-project-id"
              }
            }
          }
        }
        ```


- **Lift an environment-scoped freeze:**

      **Query**

    ```graphql
    mutation LiftEnvironmentContentFreeze {
      liftContentFreeze(
        data: {
          projectId: "your-project-id"
          environmentId: "your-environment-id"
        }
      ) {
        project {
          id
        }
      }
    }
    ```

      
      **Response**

    ```json
    {
      "data": {
        "liftContentFreeze": {
          "project": {
            "id": "your-project-id"
          }
        }
      }
    }
    ```


## Related docs

- [Content Freeze](https://hygraph.com/docs/developer-guides/project/content-freeze): Learn what a content freeze does and how to configure it from Studio.
- [Environments](https://hygraph.com/docs/api-reference/basics/environments): Create and manage the environments a freeze can target.
- [Management API permissions](https://hygraph.com/docs/getting-started/access-and-permissions/management-api-permissions): Confirm who holds the **Allows starting, scheduling, and lifting content freezes** permission.
