Create Team
POST
/api/orgs/{org_id}/teams
const url = 'https://example.com/api/orgs/example/teams';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","slug":"example"}'};
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/api/orgs/example/teams \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "slug": "example" }'Create a team within the organization.
Requires owner or admin role. Returns 422 if (org_id, slug) already exists.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org_id
required
Org Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
TeamResponse
object
id
required
Id
string
team_id
required
Team Id
string
org_id
required
Org Id
string
name
required
Name
string
slug
required
Slug
string
created_at
required
Created At
string
Examplegenerated
{ "id": "example", "team_id": "example", "org_id": "example", "name": "example", "slug": "example", "created_at": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}