multi-router.aidocs

API Reference

OrganizationsEnterprise

Listing, creating, renaming and deleting organizations.

The organizations endpoints manage the named organizations in an account. The account itself is listed as an organization with is_account true. Creating and deleting need a key of the account organization, and keys limited to some routers cannot use these endpoints. See Organizations.

MethodPathDescriptionScope
GET/v1/organizationsList the organizations the key can see. Paginated.organizations:read
POST/v1/organizationsCreate an organization with a name of 2 to 80 characters. Returns 201. Accepts an Idempotency-Key.organizations:write
GET/v1/organizations/{id}Get an organization, with counts of its contents.organizations:read
PATCH/v1/organizations/{id}Rename it. Accepts dry_run.organizations:write
DELETE/v1/organizations/{id}Delete an empty organization.organizations:delete

contents counts the organization's routers, API keys, provider keys, prompt repos, prompts and people. An organization is deleted only when every count is zero.

Create an organizationbash
curl -X POST https://api.multi-router.ai/v1/organizations \
  -H "Authorization: Bearer $MR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Engineering" }'
CodeStatusMeaning
account_token_required403A create or delete uses a key of a named organization.
router_scoped_token403The key is limited to some routers.
organization_not_found404No organization has that id in the account.
organization_not_empty409A delete names an organization that still holds something. contents gives the counts.
account_organization409The account organization cannot be renamed or deleted.
organization_limit_reached409The account has its maximum number of organizations.
organization_changed409The organization changed at the same time. Retry.
AgentsInvites
Was this helpful?