/api/orgs/{org_id}/provider-connections/{provider}/accounts/{setup_alias}/groupsAssign 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_idstringrequiredYour organization id (uuid).
GET /api/whoamireturns it.providerenumrequiredThe provider to connect.
setup_aliasstringrequiredThe account handle.
Request body
group_idsarray | nullrequiredNull 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
200The account's group assignment after the write.
Response
providerstringrequiredsetup_aliasstringrequiredgroup_idsarray | nullrequiredThe saved group ids, sorted; null for every key of the organization.
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The 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
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404The resource does not exist or belongs to another organization.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422An 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