Skip to main content
POST
/
v1
/
teams
{
  "name": "Acme Corporation",
  "username": "acme-corp",
  "about": "Leading provider of innovative solutions"
}
{
  "success": true,
  "data": {
    "id": 1,
    "name": "Acme Corporation",
    "username": "acme-corp",
    "about": "Leading provider of innovative solutions",
    "logo": null
  }
}
Create a new team. The authenticated user will automatically be assigned as the team owner.
Users can only create one team. If you already have a team, this request will fail with an access denied error.
The username field must be unique across both teams and users. If the username is already taken, the request will fail.

Request Body

name
string
required
The name of the team. Maximum 55 characters.
username
string
required
The unique username for the team. Must be unique across teams and users. Maximum 255 characters. Must match pattern: ^[a-zA-Z0-9\-\_]+$ (letters, numbers, hyphens, and underscores only).
about
string
Description or about text for the team. Maximum 5000 characters.
avatar
file
Logo image file for the team. Accepted formats: JPEG, PNG, JPG, SVG. Maximum file size: 2MB.

Example Request

{
  "name": "Acme Corporation",
  "username": "acme-corp",
  "about": "Leading provider of innovative solutions"
}

Example Response

{
  "success": true,
  "data": {
    "id": 1,
    "name": "Acme Corporation",
    "username": "acme-corp",
    "about": "Leading provider of innovative solutions",
    "logo": null
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "ACCESS_DENIED",
    "message": "You already have a team."
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The given data was invalid.",
    "details": {
      "username": ["The username has already been taken."]
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Team to create

name
string
required

The name of the team

Maximum string length: 55
username
string
required

The unique username for the team (must be unique across teams and users)

Maximum string length: 255
about
string

Description or about text for the team

Maximum string length: 5000

Response

Team created

success
boolean
required

Indicates whether the request was successful

Example:

true

data
object
required

The response data. Can be an object, array, or null