Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Create a new team

Creates a new team with the specified name, icon, and members.

How to create a team:

  1. Provide a team name (required) - choose any descriptive name
  2. Select an icon emoji (required) - used for visual identification
  3. 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/teams
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
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
iconstringrequired
Emoji 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.
namestringrequired
The 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[]required
Array 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
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.
400Validation errors
errorsobject
messagestring
statusCodenumber
401Unauthorized - 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"
  ]
}'
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
}