Create a new team
Creates a new team with the specified name, icon, and members.
How to create a team:
- Provide a team name (required) - choose any descriptive name
- Select an icon emoji (required) - used for visual identification
- Assign at least one user to the team (required) - provide an array of user IDs
Validation rules:
- Team name must be a non-empty string
- Icon must be a non-empty string (typically an emoji)
- Users array must contain at least one user ID
- All user IDs must be valid UUIDs of existing employees in the workspace
What happens after creation:
- The team is immediately available for project assignments
- Team members can be granted access to projects as a group
- The team appears in team lists and can be used for filtering
- The team can be edited or deleted later
What is returned:
- Complete team details including the generated team ID
- All assigned members with their information
- Team metadata (name, icon, user count)
Note: This endpoint requires the Teams.create permission.
POST
/teamsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredQuery parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced 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:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsoniconstringrequiredEmoji icon for visual identification of the team. This icon appears next to the team name throughout the application. Choose any emoji that represents the team (e.g., "🧑🤝🧑" for teams, "💻" for development, "🎨" for design). The icon must be a non-empty string.
namestringrequiredThe display name for the team. Choose a descriptive name that clearly identifies the team purpose or department. Examples: "Development Team", "Marketing", "Customer Support", "Sales Team". This name will appear in team lists and project assignments.
usersstring[]requiredArray of user IDs (UUIDs) to assign as initial team members. At least one user must be provided. Use User.id values from GET /workspace/users; users should be existing employees in the workspace. You can add or remove members later using the update endpoint.
Responses
200Created team
iconstringrequiredEmoji 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).
idstringrequiredUnique identifier for the team (UUID format). Use this ID to reference the team in update, delete, or project assignment operations.
namestringrequiredThe display name of the team. This name appears in team lists, project assignments, and throughout the application.
usersTeamUserDto[]requiredComplete 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 propertiesHide properties
Array of
TeamUserDtoavatarIdobject | nullrequiredUnique 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.
firstNamestringrequiredThe user first name as stored in their employee profile.
idstringrequiredUnique identifier for the user (UUID format). Use this ID when assigning users to teams or referencing team members.
lastNamestringrequiredThe user last name as stored in their employee profile.
usersCountnumberrequiredTotal number of users currently assigned to the team. This count matches the length of the users array and is provided for convenience.
400Validation errors
errorsobjectmessagestringstatusCodenumber401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/teams" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"icon": "🧑🤝🧑",
"name": "Development Team",
"users": [
"123e4567-e89b-12d3-a456-426614174000",
"123e4567-e89b-12d3-a456-426614174001"
]
}'const response = await fetch("https://leadtime.app/api/public/teams", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"icon": "🧑🤝🧑",
"name": "Development Team",
"users": [
"123e4567-e89b-12d3-a456-426614174000",
"123e4567-e89b-12d3-a456-426614174001"
]
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/teams",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"icon": "🧑🤝🧑",
"name": "Development Team",
"users": [
"123e4567-e89b-12d3-a456-426614174000",
"123e4567-e89b-12d3-a456-426614174001"
]
},
)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
}{
"errors": {
"icon": [
"Icon is required"
],
"name": [
"Name is required"
],
"users": [
"At least one user is required"
]
},
"message": "Bad Request",
"statusCode": 400
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions