---
title: "Apply the post-tax-filing immutability lock to a closed GL period"
method: POST
path: "/companies/{companyId}/gl-periods/{id}/file-lock"
tags: ["GL Periods"]
---

# Apply the post-tax-filing immutability lock to a closed GL period

`POST /companies/{companyId}/gl-periods/{id}/file-lock`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/gl-periods/{id}/file-lock`
- Auth: HTTP bearer

Filing-lock is the only period lock, applied AFTER a tax return has
been submitted. Closing a period is a reconciliation marker that
still accepts postings and voids; a filing-locked period rejects ALL
journal writes at the DB level, with no bypass (#2411). Requires
role >= admin in a signed-in session; API keys are refused with 403.

## Response `200`

Period filing-locked

- GlPeriodResponse
  - `success` boolean
  - `data` GlPeriod
    - `id` string, uuid
    - `companyId` string, uuid
    - `startDate` string, date
    - `endDate` string, date
    - `status` 'open' | 'closed'
    - `closedAt` string, date-time, nullable
    - `closedByUserId` string, uuid, nullable
    - `filingLockedAt` string, date-time, nullable
    - `filingLockedByUserId` string, uuid, nullable

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: GL period not found
- `422`: Period is not closed, or is already filing-locked.

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
