Skip to content

PATCH   /teams/{teamId}

Update a team by ID

Updates a specific team by its ID. The user must have access to the account that owns the team.

Authentication Required

Authorization: Bearer {token}   header string

This header is required to access this endpoint

Required Parameters

teamId   path integer

The ID of the team to update

Optional Parameters

Click here to view an exhaustive list of all available parameters
x-account-id   header string

The account ID for the request

Request Body

{}

Try it out

Loading...

Output:

Responses

Description

Team updated successfully

{
"id": 0,
"name": "string",
"account_id": "string",
"accountId": "string",
"active": true,
"members": [
{
"userId": 0,
"email": "string",
"name": "string"
}
],
"createdBy": "string",
"updatedBy": "string",
"createdAt": "string",
"updatedAt": "string"
}

References

#/components/parameters/xAccountIdHeader

in: header
name: x-account-id
schema:
type: string
description: The account ID for the request
required: false

#/components/schemas/UpdateTeamInput

type: object
description: Input for updating a team
properties:
name:
type: string
description: Name of the team
active:
type: boolean
description: Whether the team is active
members:
type: array
items:
type: object
properties:
userId:
type: integer
description: ID of the user to add to the team
description: Users to add as members of this team

#/components/schemas/TeamMember

type: object
description: User who is a member of a team
properties:
userId:
type: integer
description: ID of the user
email:
type: string
description: Email of the user
name:
type: string
description: Name of the user
required:
- userId
- email

#/components/schemas/Team

type: object
description: Team object representing a group of users working together
properties:
id:
type: integer
description: Unique identifier for the team
readOnly: true
name:
type: string
description: Name of the team
account_id:
type: string
description: ID of the account that owns this team
accountId:
type: string
description: ID of the account that owns this team
active:
type: boolean
default: true
description: Whether the team is active
members:
type: array
items:
$ref: "#/components/schemas/TeamMember"
description: Users who are members of this team
createdBy:
type: string
description: Email of the user who created the team
updatedBy:
type: string
description: Email of the user who last updated the team
createdAt:
type: string
format: date-time
description: When the team was created
readOnly: true
updatedAt:
type: string
format: date-time
description: When the team was last updated
readOnly: true
required:
- name

Route Source Code

Check out the source code for this route entrypoint here: /teams/[teamId]/route.ts

Or the swagger.yaml spec this documentation was generated from: /teams/swagger.yaml