---
title: "Close the workspace"
description: "Other routes API"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.certinvo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Close the workspace

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="post">POST</span>
<code class="cvo-op-path-code">/v1/workspace/closure</code>
</div>
</div>

Closes the workspace. 30 days later every invoice, file, setting and key of the workspace is deleted, in both environments, and the people who belong to no other workspace lose their login. Until then the workspace processes nothing new (403 `workspace_closed`), every invoice can still be read and downloaded, and an owner can reopen it. Closing a closed workspace changes nothing. Only an owner, signed in, can close it.

## Response

A `200` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `200` | The workspace is closed; the body names the day it is deleted. |
| `401` | No usable credential was sent (`invalid_credentials`), or an API key was used (`session_required`). |
| `403` | The person is not an owner of this workspace (`role_required`). Nothing was done. |
| `409` | Other workspaces sit under this one (`workspace_has_workspaces`). Nothing was done; Certinvo closes such a workspace. |
| `501` | This deployment has no database (`no_database`). Sending the same request again will not help. |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/other/close-the-workspace/index.mdx
