Skip to content

API reference

Close the workspace

Other routes API

POST/v1/workspace/closure

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.

  • closedbooleanRequired
  • closedAtstring (date-time)

    When an owner closed it. Only when closed.

  • deletesAtstring (date-time)

    The first day its data may be deleted, 30 days after closing. An invoice of a live company inside its eight years of retention that was not downloaded in the whole-workspace download or its evidence bundle keeps the workspace until those years end. Only when closed.

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.
POST/v1/workspace/closure
Example
curl -X POST https://api.certinvo.com/v1/workspace/closure \
  -H "Authorization: Bearer $CERTINVO_API_KEY"
const response = await fetch(`https://api.certinvo.com/v1/workspace/closure`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
  },
})
console.log(response.status, await response.json())
import os

import requests

response = requests.post(
    "https://api.certinvo.com/v1/workspace/closure",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)
200
application/json
{
  "closed": true,
  "closedAt": "2026-09-17T09:30:00Z",
  "deletesAt": "2026-09-17T09:30:00Z"
}
Success response
POST
/v1/workspace/closure
Close the workspace
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Headers2
›Body
›Code Snippet
curl -X POST "https://api.certinvo.com/v1/workspace/closure" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close