> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hexclave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a team

> Create a new team and optionally add the current user as a member.



## OpenAPI

````yaml /openapi/server.json post /teams
openapi: 3.1.0
info:
  title: Hexclave REST API
  version: 1.0.0
  description: >-
    The Hexclave REST API. All request headers are documented as canonical
    `X-Hexclave-*`; the equivalent `X-Stack-*` aliases are accepted on every
    endpoint for backwards compatibility. Response headers
    `X-Hexclave-actual-status`, `X-Hexclave-known-error`, and
    `X-Hexclave-request-id` are emitted alongside their legacy `X-Stack-*`
    equivalents.
servers:
  - url: https://api.hexclave.com/api/v1
    description: Hexclave REST API
security: []
paths:
  /teams:
    post:
      tags:
        - Teams
      summary: Create a team
      description: Create a new team and optionally add the current user as a member.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                display_name:
                  type: string
                  example: My Team
                  description: >-
                    Human-readable team display name. This is not a unique
                    identifier.
                creator_user_id:
                  type: string
                  example: me
                  description: >-
                    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.
                client_read_only_metadata:
                  type: object
                  example:
                    key: value
                  description: >-
                    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.
                server_metadata:
                  type: object
                  example:
                    key: value
                  description: >-
                    Server metadata. Used as a data store, only accessible from
                    the server side. You can store secret information related to
                    the team here.
                profile_image_url:
                  type: string
                  example: https://example.com/image.jpg
                  description: >-
                    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.
                client_metadata:
                  type: object
                  example:
                    key: value
                  description: >-
                    Client metadata. Used as a data store, accessible from the
                    client side. Do not store information that should not be
                    exposed to the client.
              required:
                - display_name
              example:
                display_name: My Team
                creator_user_id: me
                client_read_only_metadata:
                  key: value
                server_metadata:
                  key: value
                profile_image_url: https://example.com/image.jpg
                client_metadata:
                  key: value
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  created_at_millis:
                    type: number
                    example: 1630000000000
                    description: >-
                      The time the team was created (the number of milliseconds
                      since epoch, January 1, 1970, UTC)
                  server_metadata:
                    type: object
                    example:
                      key: value
                    description: >-
                      Server metadata. Used as a data store, only accessible
                      from the server side. You can store secret information
                      related to the team here.
                  id:
                    type: string
                    example: ad962777-8244-496a-b6a2-e0c6a449c79e
                    description: The unique identifier of the team
                  display_name:
                    type: string
                    example: My Team
                    description: >-
                      Human-readable team display name. This is not a unique
                      identifier.
                  profile_image_url:
                    type: string
                    example: https://example.com/image.jpg
                    description: >-
                      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.
                  client_metadata:
                    type: object
                    example:
                      key: value
                    description: >-
                      Client metadata. Used as a data store, accessible from the
                      client side. Do not store information that should not be
                      exposed to the client.
                  client_read_only_metadata:
                    type: object
                    example:
                      key: value
                    description: >-
                      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.
                required:
                  - created_at_millis
                  - id
                  - display_name

````