TeamsDelete a team
Payment pages
Events
- HOOKWebhooks
- S3 exportSoon
Delete a team
DELETE /v1/teams deletes a team and its domains by team ID. Needs an organization key with teams:delete; a team with a subscription can't be deleted.
DELETE /v1/teams deletes a team and its domains. Organization keys only (sm_org_…), with the teams:delete scope; a team key gets 401. A team with a subscription attached is refused with 409 team_subscription_attached.
curl -X DELETE https://data.scriptmonitoring.com/v1/teams/ \
-H "Authorization: Bearer sm_org_14829305716342_…" \
-H "Content-Type: application/json" \
-d '{"team_id": "YOUR_TEAM_ID"}'
Which keys work?#
| Key | Accepted |
|---|---|
Organization key (sm_org_…) | Yes, with teams:delete. |
Team key (sm_team_…) | No: 401. |
A missing, mistyped or revoked key, a key whose prefix doesn't match its type, or a key created before the sm_org_ / sm_team_ format gets 401 with this body, and so does a team key:
{ "error": "unauthorized", "message": "Missing or invalid bearer token." }
Request body#
| Field | Type | Description |
|---|---|---|
team_id | string | The team's ID (digits). |
Response#
{ "data": { "status": "deleted", "teamId": "14827391650423", "deletedDomains": 2 } }
Errors: 400, 401, 403, 404 team_not_found, 409 team_subscription_attached, 429, 503 team_deletion_unavailable.
Questions? Ask in the chat, or in the dashboard.View as Markdown