PLANS / update-team-directory-group-via-admin-api

Plans

Update a team directory group with the Admin API

Rename a Team directory group or set its per-member monthly spend cap with PATCH https://api.cursor.com/teams/directory-groups/:groupId. Official reference: Admin API → Update Team directory group.

Authenticate with a team Admin API key (Basic auth, key as username, empty password). Writes need admin:*. Rate limit: 20 requests per minute per team.

Updates are partial: send at least one field. Omitted fields keep their current value.

Rename and set a spend limit

curl -X PATCH https://api.cursor.com/teams/directory-groups/team_group_01k2ja2000e0080000000000n2 \
  -u YOUR_API_KEY: \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Platform Engineering",
    "monthlySpendingLimitDollars": 500
  }'
Field Rules
name New unique name among active directory groups on the team. Whitespace trimmed
monthlySpendingLimitDollars Whole dollars from 0 to 2147483647 for each group member
clearMonthlySpendingLimitDollars true removes the group spend limit. Do not send this with monthlySpendingLimitDollars in the same body
{
  "group": {
    "id": "team_group_01k2ja2000e0080000000000n2",
    "name": "Platform Engineering",
    "memberCount": 12,
    "monthlySpendingLimitDollars": 500,
    "createdAt": "2026-01-15T10:30:00.000Z",
    "updatedAt": "2026-01-20T14:22:00.000Z"
  }
}

Clear the spend limit

curl -X PATCH https://api.cursor.com/teams/directory-groups/team_group_01k2ja2000e0080000000000n2 \
  -u YOUR_API_KEY: \
  -H "Content-Type: application/json" \
  -d '{
    "clearMonthlySpendingLimitDollars": true
  }'

Errors

Status When
400 No update fields, invalid value, name already used by another active group, or both set and clear spend limit in one request
401 Key missing admin:*
404 Unknown team_group_… id on this team

Pitfalls

  • Sending monthlySpendingLimitDollars and clearMonthlySpendingLimitDollars together
  • Passing decimal dollar amounts — only whole dollars are accepted
  • Confusing this per-member group cap with Billing Group cycle spend on /teams/groups, or with the per-user POST /teams/user-spend-limit route