/sites/{siteId}/archiveArchive a site
Takes a site out of the account: it leaves the site list, its banner stops being served, and its per-site billing line is released.
Auth header
Authorization: Bearer tsk_live_…The key needssites:write
Parameters
siteIdstringin pathrequiredThe site id, from GET /v1/sites.
Example request
curl -X POST "https://app.tagsentry.ai/api/v1/sites/3f6c1b8e-2d4a-4c7e-9a51-0b8f2e6d7c10/archive" \ -H "Authorization: Bearer tsk_live_…"Response 200
idstringrequiredThe site's id. This is what every /v1/sites/{siteId} path takes.
accountIdstringrequireddomainstringrequireddisplayNamestringrequiredregionstringrequiredWhere this site's consent records and tag events are stored. Fixed at creation and never editable -- data residency is not a setting you can flip.
One of
EU,USstatusstringrequiredOne of
pending,active,archivedarchivedAtstring | nullrequiredcreatedAtstringrequiredISO-8601 timestamp, UTC.
updatedAtstringrequiredISO-8601 timestamp, UTC.
Example response
{ "id": "3f6c1b8e-2d4a-4c7e-9a51-0b8f2e6d7c10", "accountId": "3f6c1b8e-2d4a-4c7e-9a51-0b8f2e6d7c10", "domain": "silverpine.example", "displayName": "Silverpine Supply", "region": "EU", "status": "pending", "archivedAt": "2026-09-26T14:02:00.000Z", "createdAt": "2026-09-26T14:02:00.000Z", "updatedAt": "2026-09-26T14:02:00.000Z"}More about this endpoint
The same archive the dashboard's Remove this site makes. To finish undoing an install, take the code off your pages too: until you do, it keeps setting denied Consent Mode defaults and shows no banner.
NOTHING IS DELETED. The site's consent records, tag events and configuration stay in its region for their retention period, because a consent record is the legal proof of what a visitor chose. GET /sites?includeArchived=true still lists it.
IDEMPOTENT. Archiving an archived site answers 200 with the same body and changes nothing.
A site with a paid product can be archived only by a key an account OWNER minted, because it changes the bill: the dashboard's rule, read from the minter's current role. A member's key gets 403 for it and may archive a site that pays for nothing.
Errors401 · 403 · 404 · 500
401Missing, malformed, unknown, revoked or expired API key. These are deliberately indistinguishable in the response -- distinguishing them would confirm to a caller that a token was once real.403The key authenticated but does not carry the scope(s) this operation requires, or (`domain_not_verified`) the site's domain is not verified, so its consent records are not released.404No such resource on this account. A site id belonging to a DIFFERENT account answers 404, never 403 -- a 403 would confirm the id exists somewhere.500Something failed on our side. The requestId in the body is what to quote.
Every error has the same body: { error: { code, message, requestId } }.
From the OpenAPI document, version 2026-08-26. Raw OpenAPI