DomainsDelete domains
Payment pages
Events
- HOOKWebhooks
- S3 exportSoon
Delete domains
DELETE /v1/domains removes up to 100 domains from a team by domain ID and reports, per ID, whether it was deleted or not found.
DELETE /v1/domains removes 1 to 100 domains from a team. It takes domain IDs, not hostnames: get them from List domains. Needs the domains:delete scope. Organization keys must pass team_id; a team key always acts on its own team.
With an organization key:
curl -X DELETE https://data.scriptmonitoring.com/v1/domains/ \
-H "Authorization: Bearer sm_org_14829305716342_…" \
-H "Content-Type: application/json" \
-d '{"team_id": "YOUR_TEAM_ID", "domains": ["456"]}'
With a team key, no team_id:
curl -X DELETE https://data.scriptmonitoring.com/v1/domains/ \
-H "Authorization: Bearer sm_team_10937462815530_…" \
-H "Content-Type: application/json" \
-d '{"domains": ["456"]}'
Which keys work?#
| Key | Accepted |
|---|---|
Organization key (sm_org_…) | Yes, with domains:delete and a team_id in the body. |
Team key (sm_team_…) | Yes, with domains:delete, on its own team. It doesn't need team_id. |
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:
{ "error": "unauthorized", "message": "Missing or invalid bearer token." }
Request body#
| Field | Type | Description |
|---|---|---|
domains | string[] | 1 to 100 domain IDs (digits). |
team_id | string | The team's ID. Required with an organization key. |
Response#
{
"data": {
"results": [{ "status": "deleted", "domainId": "456", "domain": "shop.example.com" }],
"totals": { "deleted": 1, "not_found": 0 }
}
}
status is deleted or not_found. Errors: 400, 401, 403, 404 team_not_found, 429, 503 domain_deletion_unavailable.
Questions? Ask in the chat, or in the dashboard.View as Markdown