Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Partially update a team

Updates only the provided fields of a team. All fields are optional.

How partial updates work:

  • Only include the fields you want to change
  • Omitted fields remain unchanged
  • You can update the name, icon, members, or any combination

Update scenarios:

  • Change team name: Provide only the “name” field
  • Change icon: Provide only the “icon” field
  • Update members: Provide only the “users” array with new user IDs
  • Update multiple fields: Provide any combination of fields

Important notes:

  • When updating members, provide the complete list of user IDs you want in the team
  • The users array replaces the entire team membership (not merged)
  • At least one user must remain in the team after update
  • All user IDs must be valid UUIDs of existing employees

What is returned:

  • Complete updated team details
  • All current team members
  • Updated metadata (name, icon, user count)

Note: Returns 404 if the team does not exist or has been deleted. This endpoint requires the Teams.edit permission.

PATCH/teams/{id}
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Query parameters
fieldsToReturnstring
Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestring
Advanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:compactfull
Header parameters
LT-Response-Shapestring
Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:full
Request body
requiredapplication/json
iconstring
New emoji icon for the team. If provided, replaces the existing team icon. If omitted, the team icon remains unchanged.
namestring
New display name for the team. If provided, replaces the existing team name. If omitted, the team name remains unchanged.
usersstring[]
Complete array of user IDs (UUIDs) that should be members of the team. If provided, this array replaces the entire team membership (it is not merged with existing members). You must include all users you want in the team, including existing members you want to keep. At least one user must be included. If omitted, the team membership remains unchanged. Use User.id values from GET /workspace/users; users should be existing employees in the workspace.
Responses
200Updated team
iconstringrequired
Emoji icon used for visual identification of the team. This icon appears next to the team name in lists and can be used to quickly identify teams. Common examples include: "🧑‍🤝‍🧑" (people holding hands), "💻" (laptop), "🎨" (artist palette).
idstringrequired
Unique identifier for the team (UUID format). Use this ID to reference the team in update, delete, or project assignment operations.
namestringrequired
The display name of the team. This name appears in team lists, project assignments, and throughout the application.
usersTeamUserDto[]required
Complete list of all users who are members of this team. Each user object includes their ID, name, and avatar information. Use the user IDs from this array when you need to reference team members.
Show properties
Array of TeamUserDto
avatarIdobject | nullrequired
Unique identifier for the user avatar image file (UUID format). This ID can be used to retrieve the avatar image through the file API. Null if the user has not uploaded an avatar.
firstNamestringrequired
The user first name as stored in their employee profile.
idstringrequired
Unique identifier for the user (UUID format). Use this ID when assigning users to teams or referencing team members.
lastNamestringrequired
The user last name as stored in their employee profile.
usersCountnumberrequired
Total number of users currently assigned to the team. This count matches the length of the users array and is provided for convenience.
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X PATCH "https://leadtime.app/api/public/teams/string" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "icon": "💻",
  "name": "Updated Team Name",
  "users": [
    "123e4567-e89b-12d3-a456-426614174000",
    "123e4567-e89b-12d3-a456-426614174002"
  ]
}'
Response
{
  "icon": "🧑‍🤝‍🧑",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Development Team",
  "users": [
    {
      "avatarId": "123e4567-e89b-12d3-a456-426614174001",
      "firstName": "John",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "lastName": "Doe"
    }
  ],
  "usersCount": 5
}