hangar DOCS
API reference

Control plane API

Provision, operate, schedule, and govern agent instances at https://api.hangar.dev.

Authentication & limits

Authenticate every request with Authorization: Bearer <key>. A 429 response includes Retry-After; honor it before retrying. API keys never grant access to the instance plane unless supplied there too.

POST /v1/instances

Provision an instance. Capacity is allocated asynchronously.

FieldTypeDescription
namestringA display name for your instance.
agentopenclaw | hermes | claude-codeAgent runtime.
tierbasic | plus | pro | maxManaged resource tier.
region"eu"German data-residency region.
curl -X POST https://api.hangar.dev/v1/instances \
  -H "Authorization: Bearer $HANGAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Support concierge","agent":"openclaw","tier":"plus","region":"eu"}'
import requests

response = requests.request(
  "POST", "https://api.hangar.dev/v1/instances",
  headers={"Authorization": "Bearer " + api_key},
  json={"name":"Support concierge","agent":"openclaw","tier":"plus","region":"eu"},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/instances", {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json"},
  body: JSON.stringify({"name":"Support concierge","agent":"openclaw","tier":"plus","region":"eu"})
});
console.log(await response.json());
201 Created
{
  "id": "ins_7b3p", "url": "https://ins_7b3p.hangar.app",
  "status": "provisioning", "resources": { "vcpu": 1, "memoryGb": 4, "diskGb": 20 }
}
GET /v1/instances

List the instances owned by the authenticated project.

FieldTypeDescription
statusstring, optionalFilter by lifecycle status.
curl -X GET https://api.hangar.dev/v1/instances \
  -H "Authorization: Bearer $HANGAR_API_KEY"
import requests

response = requests.request(
  "GET", "https://api.hangar.dev/v1/instances",
  headers={"Authorization": "Bearer " + api_key},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/instances", {
  method: "GET",
  headers: { Authorization: `Bearer ${apiKey}`}
});
console.log(await response.json());
Response
{ "data": [{ "id": "ins_7b3p", "status": "running" }] }
GET /v1/instances/:id

Retrieve the current status and instance URL.

FieldTypeDescription
idstringInstance identifier.
curl -X GET https://api.hangar.dev/v1/instances/ins_7b3p \
  -H "Authorization: Bearer $HANGAR_API_KEY"
import requests

response = requests.request(
  "GET", "https://api.hangar.dev/v1/instances/ins_7b3p",
  headers={"Authorization": "Bearer " + api_key},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/instances/ins_7b3p", {
  method: "GET",
  headers: { Authorization: `Bearer ${apiKey}`}
});
console.log(await response.json());
Response
{ "id": "ins_7b3p", "status": "running", "url": "https://ins_7b3p.hangar.app" }
POST /v1/instances/:id/stop

Stop an instance while preserving its data volume.

FieldTypeDescription
idstringInstance identifier.
curl -X POST https://api.hangar.dev/v1/instances/ins_7b3p/stop \
  -H "Authorization: Bearer $HANGAR_API_KEY"
import requests

response = requests.request(
  "POST", "https://api.hangar.dev/v1/instances/ins_7b3p/stop",
  headers={"Authorization": "Bearer " + api_key},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/instances/ins_7b3p/stop", {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}`}
});
console.log(await response.json());
Response
{ "id": "ins_7b3p", "status": "stopped" }
POST /v1/instances/:id/start

Start a previously stopped instance.

FieldTypeDescription
idstringInstance identifier.
curl -X POST https://api.hangar.dev/v1/instances/ins_7b3p/start \
  -H "Authorization: Bearer $HANGAR_API_KEY"
import requests

response = requests.request(
  "POST", "https://api.hangar.dev/v1/instances/ins_7b3p/start",
  headers={"Authorization": "Bearer " + api_key},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/instances/ins_7b3p/start", {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}`}
});
console.log(await response.json());
Response
{ "id": "ins_7b3p", "status": "provisioning" }
DELETE /v1/instances/:id

Permanently delete an instance and its attached data.

FieldTypeDescription
idstringInstance identifier.
curl -X DELETE https://api.hangar.dev/v1/instances/ins_7b3p \
  -H "Authorization: Bearer $HANGAR_API_KEY"
import requests

response = requests.request(
  "DELETE", "https://api.hangar.dev/v1/instances/ins_7b3p",
  headers={"Authorization": "Bearer " + api_key},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/instances/ins_7b3p", {
  method: "DELETE",
  headers: { Authorization: `Bearer ${apiKey}`}
});
console.log(await response.json());
Response
{ "id": "ins_7b3p", "status": "deleting" }

Scheduled jobs

POST /v1/instances/:id/jobs

Schedule a prompt on an instance using a five-field cron expression.

FieldTypeDescription
cronstringUTC cron schedule.
promptstringPrompt delivered at execution time.
curl -X POST https://api.hangar.dev/v1/instances/ins_7b3p/jobs \
  -H "Authorization: Bearer $HANGAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cron":"0 9 * * 1-5","prompt":"Prepare the morning brief."}'
import requests

response = requests.request(
  "POST", "https://api.hangar.dev/v1/instances/ins_7b3p/jobs",
  headers={"Authorization": "Bearer " + api_key},
  json={"cron":"0 9 * * 1-5","prompt":"Prepare the morning brief."},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/instances/ins_7b3p/jobs", {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json"},
  body: JSON.stringify({"cron":"0 9 * * 1-5","prompt":"Prepare the morning brief."})
});
console.log(await response.json());
Response
{ "id": "job_42", "cron": "0 9 * * 1-5", "prompt": "Prepare the morning brief." }
GET /v1/instances/:id/jobs

List scheduled jobs for an instance.

FieldTypeDescription
idstringInstance identifier.
curl -X GET https://api.hangar.dev/v1/instances/ins_7b3p/jobs \
  -H "Authorization: Bearer $HANGAR_API_KEY"
import requests

response = requests.request(
  "GET", "https://api.hangar.dev/v1/instances/ins_7b3p/jobs",
  headers={"Authorization": "Bearer " + api_key},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/instances/ins_7b3p/jobs", {
  method: "GET",
  headers: { Authorization: `Bearer ${apiKey}`}
});
console.log(await response.json());
Response
{ "data": [{ "id": "job_42", "cron": "0 9 * * 1-5" }] }
DELETE /v1/instances/:id/jobs/:jobId

Remove a scheduled job.

FieldTypeDescription
idstringInstance identifier.
jobIdstringJob identifier.
curl -X DELETE https://api.hangar.dev/v1/instances/ins_7b3p/jobs/job_42 \
  -H "Authorization: Bearer $HANGAR_API_KEY"
import requests

response = requests.request(
  "DELETE", "https://api.hangar.dev/v1/instances/ins_7b3p/jobs/job_42",
  headers={"Authorization": "Bearer " + api_key},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/instances/ins_7b3p/jobs/job_42", {
  method: "DELETE",
  headers: { Authorization: `Bearer ${apiKey}`}
});
console.log(await response.json());
Response
{ "deleted": true }

GDPR controls

GET /v1/gdpr/export

Request an Article 15 data export for the authenticated account.

FieldTypeDescription
curl -X GET https://api.hangar.dev/v1/gdpr/export \
  -H "Authorization: Bearer $HANGAR_API_KEY"
import requests

response = requests.request(
  "GET", "https://api.hangar.dev/v1/gdpr/export",
  headers={"Authorization": "Bearer " + api_key},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/gdpr/export", {
  method: "GET",
  headers: { Authorization: `Bearer ${apiKey}`}
});
console.log(await response.json());
Response
{ "data": { "instances": [], "jobs": [] } }
POST /v1/gdpr/delete

Begin an Article 17 account erasure request.

FieldTypeDescription
curl -X POST https://api.hangar.dev/v1/gdpr/delete \
  -H "Authorization: Bearer $HANGAR_API_KEY"
import requests

response = requests.request(
  "POST", "https://api.hangar.dev/v1/gdpr/delete",
  headers={"Authorization": "Bearer " + api_key},
)
print(response.json())
const response = await fetch("https://api.hangar.dev/v1/gdpr/delete", {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}`}
});
console.log(await response.json());
Response
{ "status": "scheduled" }