API reference

Organizations

Organizations are the top-level tenant. Every team, agent, and edge in proton lives inside exactly one organization.

When you receive your API key it is already bound to an organization, so for most workloads you'll fetch it once and proceed. Use the create endpoint when programmatically provisioning new tenants — for example, to give each of your customers their own isolated Mercury org.

GET/api/v1/organizations

List organizations

Returns every organization the calling key has access to. For most keys this is a single org.

curl https://api.mercury.build/api/v1/organizations \
  -H "X-API-Key: $PROTON_API_KEY"

Example response

{
  "organizations": [
    {
      "org_id": "5b2a1c9e-...",
      "org_name": "Acme Robotics",
      "team_count": 1,
      "human_count": 1,
      "is_personal": false
    }
  ]
}
POST/api/v1/organizations

Create an organization

Provision a new organization. The calling key becomes its initial owner. Use this when integrating proton into a multi-tenant product.

Body parameters

org_name
stringrequired
Human-readable name. Visible to all members.
curl https://api.mercury.build/api/v1/organizations \
  -H "X-API-Key: $PROTON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"org_name": "Acme Robotics"}'

Example response

{
  "org_id": "5b2a1c9e-...",
  "org_name": "Acme Robotics",
  "team_count": 0,
  "human_count": 1,
  "is_personal": false
}