Skip to main content
POST
/
teams
Create a team
curl --request POST \
  --url https://api.stack-auth.com/api/v1/teams \
  --header 'Content-Type: application/json' \
  --data '
{
  "display_name": "My Team",
  "creator_user_id": "me",
  "profile_image_url": "https://example.com/image.jpg",
  "client_metadata": {
    "key": "value"
  }
}
'
{
  "id": "ad962777-8244-496a-b6a2-e0c6a449c79e",
  "display_name": "My Team",
  "profile_image_url": "https://example.com/image.jpg",
  "client_metadata": {
    "key": "value"
  },
  "client_read_only_metadata": {
    "key": "value"
  }
}

Documentation Index

Fetch the complete documentation index at: https://stackauth-e0affa27-chore-move-mcp-to-a-sep-app.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
display_name
string
required

Human-readable team display name. This is not a unique identifier.

Example:

"My Team"

creator_user_id
string

The ID of the creator of the team. If not specified, the user will not be added to the team. Can be either "me" or the ID of the user. Only used on the client side.

Example:

"me"

profile_image_url
string

URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in.

Example:

"https://example.com/image.jpg"

client_metadata
object

Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client.

Example:
{ "key": "value" }

Response

201 - application/json

Successful response

id
string
required

The unique identifier of the team

Example:

"ad962777-8244-496a-b6a2-e0c6a449c79e"

display_name
string
required

Human-readable team display name. This is not a unique identifier.

Example:

"My Team"

profile_image_url
string

URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in.

Example:

"https://example.com/image.jpg"

client_metadata
object

Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client.

Example:
{ "key": "value" }
client_read_only_metadata
object

Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status.

Example:
{ "key": "value" }