Member add

Team Member Add

[BETA]

Add new members (either via user_email or user_id) to a team

If user doesn't exist, new user row will also be added to User Table

Only proxy_admin or admin of team, allowed to access this endpoint.


curl -X POST 'http://0.0.0.0:4000/team/member_add'     -H 'Authorization: Bearer sk-1234'     -H 'Content-Type: application/json'     -d '{"team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": {"role": "user", "user_id": "krrish247652@berri.ai"}}'

POST/team/member_add
Authorization
Body
member*Member
team_id*Team Id
max_budget_in_teamMax Budget In Team
Response

Successful Response

Body
team_aliasTeam Alias
team_id*Team Id
organization_idOrganization Id
adminsAdmins
membersMembers
members_with_rolesMembers With Roles
metadataMetadata
tpm_limitTpm Limit
rpm_limitRpm Limit
max_budgetMax Budget
budget_durationBudget Duration
modelsModels
blockedBlocked
spendSpend
max_parallel_requestsMax Parallel Requests
budget_reset_atBudget Reset At
model_idModel Id
litellm_model_tableany of
created_atCreated At
updated_users*Updated Users
updated_team_memberships*Updated Team Memberships
Request
const response = await fetch('/team/member_add', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "member": [
        {
          "role": "admin"
        }
      ],
      "team_id": "text"
    }),
});
const data = await response.json();
Response
{
  "team_alias": "text",
  "team_id": "text",
  "organization_id": "text",
  "admins": [],
  "members": [],
  "members_with_roles": [
    {
      "user_id": "text",
      "user_email": "text",
      "role": "admin"
    }
  ],
  "tpm_limit": 0,
  "rpm_limit": 0,
  "max_budget": 0,
  "budget_duration": "text",
  "models": [],
  "blocked": false,
  "spend": 0,
  "max_parallel_requests": 0,
  "budget_reset_at": "2025-01-29T19:40:46.685Z",
  "model_id": 0,
  "litellm_model_table": {
    "created_by": "text",
    "updated_by": "text"
  },
  "created_at": "2025-01-29T19:40:46.685Z",
  "updated_users": [
    {
      "user_id": "text",
      "max_budget": 0,
      "spend": 0,
      "user_email": "text",
      "models": [],
      "tpm_limit": 0,
      "rpm_limit": 0,
      "user_role": "text",
      "organization_memberships": [
        {
          "user_id": "text",
          "organization_id": "text",
          "user_role": "text",
          "spend": 0,
          "budget_id": "text",
          "created_at": "2025-01-29T19:40:46.685Z",
          "updated_at": "2025-01-29T19:40:46.685Z",
          "litellm_budget_table": {
            "soft_budget": 0,
            "max_budget": 0,
            "max_parallel_requests": 0,
            "tpm_limit": 0,
            "rpm_limit": 0,
            "budget_duration": "text"
          }
        }
      ],
      "teams": [
        "text"
      ]
    }
  ],
  "updated_team_memberships": [
    {
      "user_id": "text",
      "team_id": "text",
      "budget_id": "text",
      "litellm_budget_table": {
        "soft_budget": 0,
        "max_budget": 0,
        "max_parallel_requests": 0,
        "tpm_limit": 0,
        "rpm_limit": 0,
        "budget_duration": "text"
      }
    }
  ]
}