Archive an environment
const url = 'https://beta-api.plune.ai/v1/environments/example/archive';const options = {method: 'POST', 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 POST \ --url https://beta-api.plune.ai/v1/environments/example/archive \ --header 'Authorization: Bearer <token>'The project owner’s. It stays in its place in the list with its runs counted, marked as one not to offer for new runs; its runs keep it, and a run that reports it is still taken. Archiving an archived one changes nothing.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”The archived environment
An environment of the project’s list (#1252, ADR 0071): an option of its system field, whose name is the value a run carries in environment.
object
The option’s id: never changes and is never reused.
Set while archived: one not to offer for new runs. The runs keep it, and a run that reports it is still taken.
The live runs of the project whose environment is this name lower-cased and trimmed of spaces, tabs, carriage returns and line feeds: «Staging» and «staging » count as one.
When the newest of those runs started.
Example
{ "id": "opt_5e1a9c07d2", "name": "staging", "archivedAt": "2026-09-16T09:12:04.151Z", "runs": 48, "lastRunAt": "2026-09-16T09:12:04.151Z"}No / invalid token or session
You are in the project, but not as its owner
object
Example
{ "error": "project owner only"}No such environment in the project
object
Example generated
{ "error": "example"}Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over