/Documentation

How to use Stape API

Updated Sep 29, 2026

  1. 1.
  2. 2.
Click the Authorize button
Click Authorize

How to use the API playground

  1. 1.
Click the Try it out button
Enter the parameters
Responses

JS example

  1. 1.
const API_HOST = "https://api.app.stape.io"; const API_KEY = process.env.STAPE_API_KEY; const apiBase = `${API_HOST}/api/v2`;
async function stapeRequest(path, options = {}) { const res = await fetch(`${apiBase}${path}`, { headers: { Authorization: API_KEY, "Content-Type": "application/json", }, ...options, });
const body = await res.json().catch(() => null); if (!res.ok) { const message = body?.error?.message || `HTTP ${res.status}`; throw new Error(`Stape API error: ${message}`); } return body; }
async function listContainers() { const containers = await stapeRequest("/containers"); console.log(containers); return containers; }
listContainers().catch((err) => console.error(err.message));
const API_HOST = "https://api.app.stape.io"; const API_KEY = process.env.STAPE_API_KEY; const apiBase = `${API_HOST}/api/v2`; async function stapeRequest(path, options = {}) { const res = await fetch(`${apiBase}${path}`, { headers: { Authorization: API_KEY, "Content-Type": "application/json", }, ...options, }); const body = await res.json().catch(() => null); if (!res.ok) { const message = body?.error?.message || `HTTP ${res.status}`; throw new Error(`Stape API error: ${message}`); } return body; } async function listContainers() { const containers = await stapeRequest("/containers"); console.log(containers); return containers; } listContainers().catch((err) => console.error(err.message));

Was this article helpful?

Comments

Can’t find what you are looking for?