Skip to content

Archive a site

DELETE
/v1/clients/{clientId}/sites/{id}
curl --request DELETE \
--url https://api2.recruso.co.uk/v1/clients/1/sites/1 \
--header 'Authorization: <Authorization>'

Archives one site belonging to one of your own agency’s clients. This is a soft delete: the row is retained with its history, siteArchivedBy and siteArchivedOn are stamped, and RestoreSite can bring it back.

An archived site drops out of ListSites and out of the sites embedded in ListClientsWithSites, but GetSiteById still returns it with isDeleted true.

The name stays reserved. Creating or renaming another site to the archived site’s name returns 409 until the archived site is restored or renamed.

The site must belong to the client named in the route; otherwise 404. Archiving a site that is already archived is not rejected — it re-stamps the archive audit fields.

Access. Requires a client-credentials access token. Tokens issued through the interactive user login are rejected.

clientId
required
integer format: int32

The clientId path parameter

id
required
integer format: int32

The id path parameter

No Content

Unauthorized

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Forbidden

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}