Create team
POST
/api/v1/teams
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/teams';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","workspace_id":1,"badge_color":"white"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/%7B%7Bapp_url%7D/api/v1/teams \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "workspace_id": 1, "badge_color": "white" }'Creates a new team.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
name
required
string
workspace_id
required
integer
badge_color
required
string
Responses
Section titled “Responses”Successful
Media typeapplication/json
object
id
required
integer
name
required
string
badge_color
required
string
workspace_id
required
integer
created_at
required
string format: date-time
Example
{ "id": 12345, "name": "Liverpool FC", "badge_color": "white", "workspace_id": 12345, "created_at": "2023-08-23T10:30:00.000Z"}Unauthorized
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Forbidden
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Unprocessable Entity
Media typeapplication/json
object
message
required
string
errors
required
object
key
additional properties
Array<string>
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}