REST API
Settings
Project API keys, limits, alerts, custom domains and access with the REST API.
#Project API keys
GET /api/projects/:id/keys
POST /api/projects/:id/keys { "name": "Acme", "endpoints": ["e..."], "expiresAt": "2027-01-01T00:00:00Z" }
DELETE /api/projects/:id/keys/:keyId
PUT /api/projects/:id/keys/required { "required": true }endpoints (endpoint ids) and expiresAt are optional; null means all endpoints and no expiry. POST returns the key once. See API keys.
#Limits
PUT /api/projects/:id/limits{
"project": { "perMinute": 600, "perDay": null, "per": "all" },
"endpointDefault": { "perMinute": 60, "perDay": 5000, "per": "client" },
"endpoints": { "e...": { "perMinute": 10, "perDay": null, "per": "client" } }
}per is all (shared) or client (per API key or IP). See Rate limits.
#Alerts
GET /api/projects/:id/alerts
PUT /api/projects/:id/alerts { "enabled": true, "mode": "rate", "threshold": 5, "windowMinutes": 15, "emailTo": ["u..."] }
PUT /api/projects/:id/alerts/slack { "webhookUrl": "https://hooks.slack.com/..." }
POST /api/projects/:id/alerts/testmode is count (errors in the window) or rate (% of requests, from 20 requests).
#Custom domains
GET /api/projects/:id/domains
POST /api/projects/:id/domains { "host": "api.acme.com" }
POST /api/projects/:id/domains/:host/verify
PUT /api/projects/:id/domains/primary { "host": "api.acme.com", "redirectDefault": true }
DELETE /api/projects/:id/domains/:hostSee Custom domains.
#Packages
List, install, pin and remove packages: see Packages.
#Access (Business)
PUT /api/projects/:id/access { "restricted": true, "members": { "u...": "edit", "u...": "view" } }