DocsTeamsCreate

Create Team

Create a new team.

Endpoint

POST ${baseUrl}/teams

Request Body

interface CreateTeamRequest {
  name: string
}

Response

interface CreateTeamResponse {
  success: boolean
  data: {
    id: number
    name: string
  }
}

Example Request

const response = await fetch('${baseUrl}/teams', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Basic YOUR_API_KEY',
  },
  body: JSON.stringify({
    name: 'Engineering Team',
  }),
})
 
const data = await response.json()

Error Codes

Status CodeDescription
201Team Created
400Invalid Request Body
401Unauthorized
500Server Error