Skip to main content

Create Team

Create a new team. The authenticated user will automatically become the team owner.

Endpoint

POST /api/teams

Headers

Authorization
string
required
Bearer token for authentication

Request Body

name
string
required
Team name (max 50 characters)

Response

id
string
Team UUID
name
string
Team name
accessCode
string
Unique access code for inviting members (format: team_ + 16 random characters)
createdAt
string
ISO 8601 timestamp of creation

Example Request

curl -X POST https://your-umami-instance.com/api/teams \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Engineering Team"}'

Example Response

{
  "id": "660e8400-e29b-41d4-a716-446655440001",
  "name": "Engineering Team",
  "accessCode": "team_abc123def456789",
  "createdAt": "2024-03-15T14:30:00.000Z"
}

Access Code

The accessCode returned in the response can be used to invite members to join the team. Share this code with users who should have access to the team.
The user who creates the team automatically becomes the team owner with full permissions. You can later add more members using the Add Team Member endpoint.
Keep the access code secure. Anyone with the access code can request to join the team.

Build docs developers (and LLMs) love