/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Delete Organization

Delete Organization

Delete a workspace and its projects.

DELETE/v1/orgs/{orgId}Try it
Session token

Deletes a workspace. All of its live projects are deleted with it, pending invitations are revoked, and the workspace's slug is released so it can be used again.

Note

Requires the owner role and a session JWT. API keys are rejected with 401. An admin or member gets 403 forbidden with details.requiredRole: "owner" — see Role errors. Any plan.

Warning

A workspace on a paid plan can't be deleted while its subscription still renews — the request returns 409 active_subscription. Cancel the subscription in the billing portal first; deleting the workspace does not cancel it for you.

Each project's doc site goes offline and its custom domains are released, the same as when you delete a project: any of those domains can then be added to a project in another workspace.

Path Parameters

NameDescription
orgId:stringpathRequired
The organization ID.

Response — 200 OK

The deletion is recorded in the audit log as org.deleted.

Warnings

If a project's GitHub push webhook can't be removed, the workspace is still deleted, the leftover webhook is recorded for retry, and the response adds a top-level warnings array — the same webhook_teardown_pending warning that Update Project returns:

warnings is omitted when there is nothing to report.

Error Responses

401 Unauthorized

unauthorized for a missing, invalid or expired token (or an API key); session_revoked when the session has been signed out.

403 Forbidden

Returned when you are an admin or member:

json
{
"error": {
"code": "forbidden",
"message": "Only the workspace owner can delete the workspace.",
"details": { "requiredRole": "owner", "currentRole": "admin", "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

Without role details, the 403 means you don't belong to the workspace.

404 Not Found

not_found — the workspace doesn't exist or is already deleted.

409 Conflict

active_subscription — the workspace has a paid subscription that hasn't been cancelled. details.tier names the plan:

json
{
"error": {
"code": "active_subscription",
"message": "Cancel the workspace subscription in the billing portal before deleting the workspace.",
"details": { "tier": "pro", "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

A subscription that is set to cancel at the end of the current period doesn't block deletion.

Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl -X DELETE https://api.syntext.dev/v1/orgs/3f9c2a1e-6b4d-4e8a-a1c7-5d2e9f0b7c13 \
-H "Authorization: Bearer $SYNTEXT_JWT"
Request
jsoncURLJavaScriptPythonGoRubyPHPJavaC#json
{
"data": { "deleted": true },
"warnings": [
{
"code": "webhook_teardown_pending",
"message": "The GitHub webhook on the previous repository could not be removed because GitHub returned an error. It has been recorded and will be retried; connect GitHub or remove it in the repository settings.",
"details": {
"repoUrl": "https://github.com/acme/docs",
"webhookId": 123456789,
"reason": "github_error"
}
}
]
}
Responseapplication/json
200OK
{
"data": {
"deleted": true
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext