Delete a project
const url = 'https://api.perstat.io/projects/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.perstat.io/projects/example \ --header 'Authorization: Bearer <token>'Deletes a project. Without parameters this is a destructive cascade: every monitor in the project, archived monitors included, is deleted together with its incidents, check history, and availability figures, and so is every journey. With the optional reassign_to query parameter, all monitors, archived ones included, and all journeys are first moved to another project the caller can manage; their incidents and check history stay with them. Passing the deleted project itself as reassign_to returns 400. With an API key, reassign_to has to name a project within the key’s organization and resource grants; any other target returns 404.
Deprecated for API keys: Deleting a project that still holds monitors, archived ones included, without reassign_to is deprecated for API keys since 2026-10-02. Until 2027-01-01 the call works as before, and its 204 answer to an API key carries Deprecation: @1790899200, Sunset: Fri, 01 Jan 2027 00:00:00 GMT, and a Link to the announcement (rel="deprecation"). From 2027-01-01, an API key deletes a project only when it holds no monitors or when reassign_to is set; otherwise the call returns 409 with the error code project_has_monitors. Deleting an empty project, or one whose monitors move with reassign_to, is not affected. Accepts API keys with the projects:write scope, subject to current role and resource grants.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Public ID of a target project. Every monitor of the deleted project, archived ones included, and every journey move there first. With an API key, the target has to lie within the key’s organization and grants.
Responses
Section titled “Responses”Project deleted. The response has no body. When an API key deleted monitors with the project, the answer carries the deprecation headers.
reassign_to names the project being deleted.
Authentication is missing or invalid.
The authenticated caller does not have permission to perform this operation.
No accessible project matches the project ID, or, with an API key, reassign_to names a project outside the key’s organization or grants.