PUT/api/orgs/{org_id}/provider-connections/{provider}/accounts/{setup_alias}/groups

Assign a provider account to groups

Chooses which API keys may use one account of the pool (an API key or a ChatGPT or Claude plan). null (the default) serves every key of the organization. A list of group ids serves only keys in one of those groups or in a subgroup of one; a group may hold several accounts and an account may serve several groups. A personal plan also stays limited to its owner's keys: both must admit the key. Ids are deduplicated and sorted. An empty list, or an unknown, disabled or foreign group id, is refused with 422. Takes effect on the next gateway refresh, and GET /v1/models then hides models a key can reach only through accounts it may not use. Needs an org admin, or any key of the org itself.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

    Your organization id (uuid). GET /api/whoami returns it.

  • providerenumrequired

    The provider to connect.

    "openai""anthropic""azure_openai""openrouter""gemini""bedrock""fireworks""modal""vertex""zai""qwen""tencent""meta""cerebras""wafer""huawei""mistral""dashscope""xai""deepseek""cloudflare""typesafe""deepgram""kenari""kiosapi""tokenharbor""groq""nvidia_nim"
  • setup_aliasstringrequired

    The account handle.

Request body

  • group_idsarray | nullrequired

    Null serves every key of the organization; a non-empty list of group ids serves only keys in one of those groups or below one.

Responses

  • 200

    The account's group assignment after the write.

    Response
    • providerstringrequired
    • setup_aliasstringrequired
    • group_idsarray | nullrequired

      The saved group ids, sorted; null for every key of the organization.

  • 401

    Missing, unknown or revoked API key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 403

    The key is valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    The resource does not exist or belongs to another organization.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 422

    An empty list, an unknown field, or a group id that is not an active group of the organization.

Request

curl -X PUT 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai/accounts/claude-team/groups' \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "group_ids": [
    "developers-2b8e51c0",
    "acme-support"
  ]
}'

Response

{
  "provider": "anthropic",
  "setup_alias": "claude-team",
  "group_ids": [
    "developers-2b8e51c0",
    "acme-support"
  ]
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai/accounts/claude-team/groups