Guides › Get started
Quickstart
5 min · 5 steps · Languages: curl, node, python
Deploy a service of your project from your own code in five minutes: create a key, check it works, start a deployment and follow it until it is live. Prefer a terminal? Install the CLI and run dcloud deploy api --wait.
1. Create a key
On the dashboard, open your project, then Project settings > Developer > Keys and create a key. Choose deploy access for this guide (it can read and deploy, nothing else).
The secret is shown once, starting with dsp_live_. Keep it in your secrets manager or CI variables, never in code.
Note the project id (prj_...) shown on the same page.
2. Check the key
Read your project. Every request sends the key as a bearer token.
cURL
curl https://devapi.dispralabs.com/v1/cloud/projects/prj_01jdk3m9x2v7c4q8w5n6b1t0ra \
-H "Authorization: Bearer dsp_live_YOUR_KEY"
Node
const res = await fetch("https://devapi.dispralabs.com/v1/cloud/projects/prj_01jdk3m9x2v7c4q8w5n6b1t0ra", {
headers: { Authorization: "Bearer dsp_live_YOUR_KEY" },
});
const { data } = await res.json();
console.log(data.name, data.environments);
Python
import requests
res = requests.get("https://devapi.dispralabs.com/v1/cloud/projects/prj_01jdk3m9x2v7c4q8w5n6b1t0ra",
headers={"Authorization": "Bearer dsp_live_YOUR_KEY"})
print(res.json()["data"])
3. Find your service
List the services of an environment. The project's environments and List environments give you the environment ids.
cURL
curl https://devapi.dispralabs.com/v1/cloud/environments/env_01jdk3m9x5h2p8r4t6y1u3i0oa/services \
-H "Authorization: Bearer dsp_live_YOUR_KEY"
Node
const res = await fetch("https://devapi.dispralabs.com/v1/cloud/environments/env_01jdk3m9x5h2p8r4t6y1u3i0oa/services", {
headers: { Authorization: "Bearer dsp_live_YOUR_KEY" },
});
const { data } = await res.json();
for (const s of data.services) console.log(s.name, s.svc, s.dep_state);
Python
import requests
res = requests.get("https://devapi.dispralabs.com/v1/cloud/environments/env_01jdk3m9x5h2p8r4t6y1u3i0oa/services",
headers={"Authorization": "Bearer dsp_live_YOUR_KEY"})
for s in res.json()["data"]["services"]:
print(s["name"], s["svc"], s["dep_state"])
4. Deploy
Start a deployment. Every write carries an Idempotency-Key: if the request times out, send it again with the same key and you get the first answer back, never a second deployment.
cURL
curl https://devapi.dispralabs.com/v1/cloud/services/svc_01jdk3n2f4g6h8j0k2l4z6x8ca/deployments \
-H "Authorization: Bearer dsp_live_YOUR_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"action":"deploy"}'
Node
const res = await fetch("https://devapi.dispralabs.com/v1/cloud/services/svc_01jdk3n2f4g6h8j0k2l4z6x8ca/deployments", {
method: "POST",
headers: {
Authorization: "Bearer dsp_live_YOUR_KEY",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({ action: "deploy" }),
});
const { data } = await res.json();
console.log(data.dep, data.state); // queued
Python
import uuid, requests
res = requests.post("https://devapi.dispralabs.com/v1/cloud/services/svc_01jdk3n2f4g6h8j0k2l4z6x8ca/deployments",
headers={"Authorization": "Bearer dsp_live_YOUR_KEY",
"Idempotency-Key": str(uuid.uuid4())},
json={"action": "deploy"})
print(res.json()["data"]["dep"])
5. Follow it until it is live
Stream the deployment's build log. The stream ends with event: end and the final state: live, or failed (the version that was live keeps serving). You can also poll Get a deployment, or receive the deploy.succeeded webhook event.
cURL
curl -N https://devapi.dispralabs.com/v1/cloud/deployments/dep_01jdk4p7q9w1e3r5t7y9u1i3ob/logs/stream?kind=build \
-H "Authorization: Bearer dsp_live_YOUR_KEY" \
-H "Accept: text/event-stream"
Next steps
Next: read Authentication to choose the right access level, and Webhooks to hear about deployments without polling. To let Claude Code, Codex or Cursor deploy and fix your services, read Use Dispra with AI agents.