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 Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”Successful Response
Media type application/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
Example generated
{ "id": "example", "team_id": "example", "org_id": "example", "name": "example", "slug": "example", "created_at": "example"}Validation Error
Media type application/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
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}