Projects API
The Projects API lets you manage your organization’s projects programmatically: create and delete them, attach a project-scoped routing policy, set spending limits, and read spend rollups. Use it when you drive Gateway configuration from infrastructure-as-code (Pulumi, Terraform, scripts) or any automation that shouldn’t depend on the dashboard. Every operation is available over the API, including DELETE, and updates are stable for diffing.
All requests go to https://api-gateway.merge.dev with Authorization: Bearer mgmt_<your_management_key>, plus Content-Type: application/json on any request that has a JSON body. IDs are Merge UUIDs and the organization is derived from your key.
Authentication and scopes
Create a management key in the dashboard under Settings → API keys → Management keys; it is shown once at creation. Operations are scope-gated: manage_projects grants the project and routing endpoints, read_usage grants the usage endpoints. Neither is granted to management keys by default, so mint a key with the scopes you need. A management key acts only on its own organization and cannot call the gateway’s model endpoints.
Data models
Each area has its own reference page.
How requests attribute to a project
Requests authenticated with a project-scoped API key attribute to that project automatically, and the project’s routing policy and budget apply. Create project-scoped keys with the Management API keys endpoints by passing project_id.
Quick example
Full endpoint contracts live in the Management API reference.