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.
Provision an instance. Capacity is allocated asynchronously.
| Field | Type | Description |
|---|---|---|
| name | string | A display name for your instance. |
| agent | openclaw | hermes | claude-code | Agent runtime. |
| tier | basic | plus | pro | max | Managed 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());{
"id": "ins_7b3p", "url": "https://ins_7b3p.hangar.app",
"status": "provisioning", "resources": { "vcpu": 1, "memoryGb": 4, "diskGb": 20 }
}List the instances owned by the authenticated project.
| Field | Type | Description |
|---|---|---|
| status | string, optional | Filter 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());{ "data": [{ "id": "ins_7b3p", "status": "running" }] }Retrieve the current status and instance URL.
| Field | Type | Description |
|---|---|---|
| id | string | Instance 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());{ "id": "ins_7b3p", "status": "running", "url": "https://ins_7b3p.hangar.app" }Stop an instance while preserving its data volume.
| Field | Type | Description |
|---|---|---|
| id | string | Instance 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());{ "id": "ins_7b3p", "status": "stopped" }Start a previously stopped instance.
| Field | Type | Description |
|---|---|---|
| id | string | Instance 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());{ "id": "ins_7b3p", "status": "provisioning" }Permanently delete an instance and its attached data.
| Field | Type | Description |
|---|---|---|
| id | string | Instance 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());{ "id": "ins_7b3p", "status": "deleting" }Scheduled jobs
Schedule a prompt on an instance using a five-field cron expression.
| Field | Type | Description |
|---|---|---|
| cron | string | UTC cron schedule. |
| prompt | string | Prompt 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());{ "id": "job_42", "cron": "0 9 * * 1-5", "prompt": "Prepare the morning brief." }List scheduled jobs for an instance.
| Field | Type | Description |
|---|---|---|
| id | string | Instance 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());{ "data": [{ "id": "job_42", "cron": "0 9 * * 1-5" }] }Remove a scheduled job.
| Field | Type | Description |
|---|---|---|
| id | string | Instance identifier. |
| jobId | string | Job 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());{ "deleted": true }GDPR controls
Request an Article 15 data export for the authenticated account.
| Field | Type | Description |
|---|
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());{ "data": { "instances": [], "jobs": [] } }Begin an Article 17 account erasure request.
| Field | Type | Description |
|---|
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());{ "status": "scheduled" }