API Reference
Programmatically manage your deployments, projects, and domains using the CupaDev REST API.
Authentication
All API requests require authentication using an API token.
Getting Your API Token
- Go to your account settings
- Navigate to API Tokens section
- Click "Generate New Token"
- Give it a descriptive name
- Copy and store it securely
Using the Token
Include your token in the Authorization header:
Authorization: Bearer YOUR_API_TOKENBase URL
All API endpoints are relative to:
https://api.cupadev.com/v1Endpoints
Projects
GET
/projectsList all projects
curl -X GET https://api.cupadev.com/v1/projects \ -H "Authorization: Bearer YOUR_TOKEN"
GET
/projects/:idGet a single project
curl -X GET https://api.cupadev.com/v1/projects/abc123 \ -H "Authorization: Bearer YOUR_TOKEN"
POST
/projectsCreate a new project
curl -X POST https://api.cupadev.com/v1/projects \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-project",
"framework": "nextjs",
"gitUrl": "https://github.com/user/repo"
}'Deployments
GET
/projects/:id/deploymentsList all deployments for a project
curl -X GET https://api.cupadev.com/v1/projects/abc123/deployments \ -H "Authorization: Bearer YOUR_TOKEN"
POST
/projects/:id/deploymentsTrigger a new deployment
curl -X POST https://api.cupadev.com/v1/projects/abc123/deployments \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"branch": "main",
"target": "production"
}'GET
/deployments/:idGet deployment status
curl -X GET https://api.cupadev.com/v1/deployments/dep_abc123 \ -H "Authorization: Bearer YOUR_TOKEN"
Domains
POST
/projects/:id/domainsAdd a custom domain
curl -X POST https://api.cupadev.com/v1/projects/abc123/domains \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "example.com"
}'DELETE
/domains/:idRemove a domain
curl -X DELETE https://api.cupadev.com/v1/domains/dom_abc123 \ -H "Authorization: Bearer YOUR_TOKEN"
Environment Variables
POST
/projects/:id/envAdd environment variable
curl -X POST https://api.cupadev.com/v1/projects/abc123/env \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"key": "API_KEY",
"value": "secret123",
"target": ["production", "preview"]
}'Response Format
All responses are returned in JSON format:
Success Response
{
"data": {
"id": "abc123",
"name": "my-project",
"status": "ready"
}
}Error Response
{
"error": {
"code": "unauthorized",
"message": "Invalid API token"
}
}Rate Limiting
API requests are rate limited to prevent abuse:
- • Free tier: 100 requests per hour
- • Pro tier: 1,000 requests per hour
- • Enterprise: Custom limits
Rate limit headers:
X-RateLimit-Limit: 100X-RateLimit-Remaining: 95X-RateLimit-Reset: 1640000000Official SDKs
Use our official SDKs for easier integration:
Node.js / TypeScript
npm install @cupadev/sdkFull TypeScript support with auto-completion
Python
pip install cupadevPythonic API client with async support