Darwa REST API
The same project, source, service, and deployment resources used by the dashboard and CLI, exposed as versioned JSON endpoints.
Authentication
Send an active Darwa access token in the Authorization header. Tokens are workspace-scoped and must never be included in browser bundles or committed source.
curl https://api.darwa.com/api/v1/project-folders \ -H "Authorization: Bearer $DARWA_TOKEN" \ -H "Accept: application/json"
Resource model
Projects are organizational containers. Services are runnable resources. A source connection makes repositories available, while deployments capture immutable builds of a service.
| Resource | API collection | Relationship |
|---|---|---|
| Project | /project-folders | Contains zero or more services |
| Service | /projects | May belong to a project through project_group |
| Source | /source-connections | Provides repositories and branches |
| Deployment | /runtime | Builds and releases one service revision |
Projects
{
"name": "Storefront",
"environment": "production",
"access_mode": "all_members"
}Services
Secret values are write-only. Read responses return variable names and whether a value exists, never the stored value.
GitHub sources
{
"repository_id": "987654321",
"name": "Frontend",
"branch": "main",
"project_group": "Storefront",
"kind": "web_service",
"runtime": "node",
"region": "us-east",
"instance_type": "starter"
}Deployments
CLI deployment bodies use application/zip. Archives are limited to 50 MB compressed, 250 MB expanded, and 20,000 files.
Errors and pagination
Errors use an HTTP status plus a JSON detail field. Collection endpoints use limit and offset where shown.
{
"detail": "Project not found"
}| Status | Meaning | Client action |
|---|---|---|
| 401 | Missing or expired session | Authenticate again |
| 403 | Workspace permission denied | Request workspace access |
| 404 | Resource not found in this workspace | Check the slug or ID |
| 409 | Name, state, or billing conflict | Resolve the reported conflict |
| 422 | Request validation failed | Correct the indicated fields |
| 503 | Runtime temporarily unavailable | Retry with backoff |