curl -X DELETE \
https://api.agent37.com/v1/instances/ab12cd34ef \
-H "Authorization: Bearer sk_live_..."
import requests
response = requests.delete(
"https://api.agent37.com/v1/instances/ab12cd34ef",
headers={
"Authorization": "Bearer sk_live_..."
},
)
response.raise_for_status()
print(response.json())
const response = await fetch(
"https://api.agent37.com/v1/instances/ab12cd34ef",
{
method: "DELETE",
headers: {
"Authorization": "Bearer sk_live_..."
},
},
);
if (!response.ok) {
throw new Error(await response.text());
}
console.log(await response.json());
{
"id": "ab12cd34ef",
"deleted": true
}
Instances
Delete an instance
Permanently delete an instance and end its billing. Download anything you want to keep first.
DELETE
/
v1
/
instances
/
{id}
curl -X DELETE \
https://api.agent37.com/v1/instances/ab12cd34ef \
-H "Authorization: Bearer sk_live_..."
import requests
response = requests.delete(
"https://api.agent37.com/v1/instances/ab12cd34ef",
headers={
"Authorization": "Bearer sk_live_..."
},
)
response.raise_for_status()
print(response.json())
const response = await fetch(
"https://api.agent37.com/v1/instances/ab12cd34ef",
{
method: "DELETE",
headers: {
"Authorization": "Bearer sk_live_..."
},
},
);
if (!response.ok) {
throw new Error(await response.text());
}
console.log(await response.json());
{
"id": "ab12cd34ef",
"deleted": true
}
curl -X DELETE \
https://api.agent37.com/v1/instances/ab12cd34ef \
-H "Authorization: Bearer sk_live_..."
import requests
response = requests.delete(
"https://api.agent37.com/v1/instances/ab12cd34ef",
headers={
"Authorization": "Bearer sk_live_..."
},
)
response.raise_for_status()
print(response.json())
const response = await fetch(
"https://api.agent37.com/v1/instances/ab12cd34ef",
{
method: "DELETE",
headers: {
"Authorization": "Bearer sk_live_..."
},
},
);
if (!response.ok) {
throw new Error(await response.text());
}
console.log(await response.json());
{
"id": "ab12cd34ef",
"deleted": true
}
Authorization: Bearer sk_live_... on https://api.agent37.com.
Path parameters
string
required
The instance id, returned when you create an instance.
What deletion does
DELETE /v1/instances/{id} returns { "id": "ab12cd34ef", "deleted": true }. It acts once: a repeat delete returns 404. Delete settles the final metered window and billing ends; nothing is ever prepaid, so there is nothing to refund.
Delete is destructive: the instance’s files, memory, sessions, and backups are gone, and no API call brings them back. A backup belongs to the instance, not to your workspace, and restore only ever writes back in place, so download anything you want to keep first. A copy of the instance’s data stays in backup storage for seven days after the delete and is then purged, so allow for that window in any promise to erase your own users’ data. To pause work while keeping everything,
stop it instead. A stopped instance bills its disk alone; delete is what ends billing entirely.