Create Team
Create a new team.
Endpoint
POST ${baseUrl}/teamsRequest 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 Code | Description |
|---|---|
| 201 | Team Created |
| 400 | Invalid Request Body |
| 401 | Unauthorized |
| 500 | Server Error |