API Authentication
All Droplet API requests are authenticated using Bearer tokens. Tokens are scoped per account and must be included in every request.
Obtaining a token
Go to Settings → API Tokens in your dashboard and click Create Token. Give it a name and select the permission scopes you need.
Making requests
cURL
curl https://api.droplet.app/portal/applications \-H "Authorization: Bearer DRP_your_token_here" \-H "Content-Type: application/json"
TypeScript
const response = await fetch('https://api.droplet.app/portal/applications', {headers: {Authorization: `Bearer ${process.env.DROPLET_API_TOKEN}`,'Content-Type': 'application/json',},})const apps = await response.json()
Error responses
| Status | Meaning |
|---|---|
401 | Missing or invalid token |
403 | Token lacks required permission |
429 | Rate limit exceeded — back off and retry |
Example: create a deployment
cURL
curl -X POST https://api.droplet.app/portal/applications/my-app/deployments \-H "Authorization: Bearer DRP_your_token_here" \-H "Content-Type: application/json" \-d '{ "branch": "main", "message": "Trigger via API" }'