Projects API
The Projects API creates and deletes your organization’s projects, sets each one’s routing policy, budget, and guardrails, and reads their spend. Use it to drive configuration from Terraform, Pulumi, or scripts.
Send requests to https://api-gateway.merge.dev with a management key as the bearer token; the organization comes from the key, and IDs are UUIDs. Unknown body fields return 422, so a typo fails loudly instead of dropping config.
Endpoints by task
Every endpoint needs the manage_projects scope except these: project usage accepts view_billing or manage_projects, organization usage needs view_billing, and the guardrail overrides also accept manage_security_rules (reads also view_security_rules). See scopes.
To create a project API key, call POST /v1/keys with project_id.
Example: a project with routing and a budget
The response is the project object with its id. Scope inference requests with a project API key or X-Project-Id header set to that ID so the budget applies.