Skip to content
TriedDocs
Account

Delete workspace

Permanently delete the workspace and everything in it.

POSThttps://api.tried.com.au/workspace/delete

Deletes the workspace and all of its data: members, sessions, API keys, agents, calls, numbers, settings, SCIM and SAML configuration, and the rest. This cannot be undone. To confirm, you send the workspace name. Admin only.

Request#

Field Type Required Description
confirm string Yes Must equal the workspace name exactly (leading and trailing spaces are ignored).

Example request#

curl -X POST https://api.tried.com.au/workspace/delete \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm": "Harbour Dental"
  }'
const res = await fetch("https://api.tried.com.au/workspace/delete", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "confirm": "Harbour Dental"
  }),
});
const result = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/workspace/delete",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "confirm": "Harbour Dental",
    },
)
result = res.json()

Response#

200 OK

{
  "deleted": "ws_3f9a1c7e5b2d4086a1c9e7f2",
  "me": {
    "user": {
      "user_id": "user_2b4d6f8a0c1e3a5b7d9f1e2c",
      "email": "priya@harbourdental.com.au",
      "name": "priya"
    },
    "workspace": {
      "workspace_id": "ws_6e8a0c2e4b6d8f0a2c4e6b8d",
      "name": "Priya's workspace",
      "webhook_url": null,
      "concurrency_limit": 20,
      "created_timestamp": 1756684800000
    },
    "role": "admin",
    "workspaces": [
      {
        "workspace_id": "ws_6e8a0c2e4b6d8f0a2c4e6b8d",
        "name": "Priya's workspace",
        "webhook_url": null,
        "concurrency_limit": 20,
        "created_timestamp": 1756684800000,
        "role": "admin"
      }
    ]
  }
}
Field Type Description
deleted string ID of the deleted workspace.
me object or null The signed-in user's next workspace: user, workspace, role and workspaces. The session moves to the user's oldest remaining workspace. null when the user has none left (the session is signed out) or when you call with an API key.

Errors#

Status When
400 Type the workspace name "<name>" to confirm, or confirm: Required when the field is missing.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the admin scope. A dashboard user without the right role gets Requires role: admin. API keys act as admin.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.

Important

The API key you call with belongs to the workspace, so it is deleted too. Later requests with it return 401.