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

# Create a group



## OpenAPI

````yaml /docs/api/openapi-v2.yaml post /groups
openapi: 3.1.0
info:
  title: Sleekplan API v2
  version: '2.0'
  description: >-
    The `/v2` namespace sits alongside the existing [`/v1`
    API](/docs/api/overview) — it is not a replacement. The same API key
    authenticates both.


    `/v2` accepts **Bearer tokens only**, and carries no workspace ID in the URL
    because the key identifies the workspace. Changes are additive: fields and
    endpoints are added, never removed or renamed.


    See [API v2](/docs/api/v2) for authentication, the error keys, and the rate
    limit.
servers:
  - url: https://api.sleekplan.com/v2
    description: API Version 2
security:
  - BearerAuth: []
tags:
  - name: Group
    description: B2B groups — companies, accounts or teams — and their members.
  - name: Document
    description: >-
      The thinking behind your feedback — a plan, a spec, research, or the
      record of a decision.
paths:
  /groups:
    post:
      tags:
        - Group
      summary: Create a group
      operationId: v2-create-group
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
              properties:
                id:
                  type: string
                  maxLength: 255
                  description: >-
                    Your own identifier for this group, unique per workspace.
                    `data_id` is accepted as an alias.
                name:
                  type: string
                  maxLength: 255
                  description: Display name in the dashboard. Falls back to `id`.
                type:
                  type: string
                  default: company
                  maxLength: 64
                  description: >-
                    Free-form label, lowercased and hyphenated, e.g. `company`,
                    `team`, `key-account`. Capped at 10 distinct types per
                    workspace; beyond the cap a new type falls back to `company`
                    rather than erroring.
                weight:
                  type: integer
                  minimum: 0
                  maximum: 10
                  default: 1
                  description: How important this group is to you. Clamped to the range.
                mrr:
                  type: integer
                  default: 0
                  description: >-
                    Monthly recurring revenue in whole units of your currency.
                    No minor units, no conversion.
                meta:
                  type: object
                  description: >-
                    Flat key/value custom data, string values only. Up to 20
                    keys, each key and value up to 255 characters.
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupEnvelope'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: That identifier is already used in this workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    GroupEnvelope:
      type: object
      properties:
        status:
          type: string
        data:
          $ref: '#/components/schemas/Group'
    Error:
      type: object
      properties:
        status:
          type: string
          example: error
        data:
          type: object
          properties:
            key:
              type: string
            message:
              type: string
    Group:
      type: object
      description: >-
        The published shape of a group. Fields are added over time and never
        removed — ignore any you do not recognise.
      properties:
        group_id:
          type: integer
          description: The Sleekplan ID. Use it in every other call.
        data_id:
          type: string
          description: Your own identifier, set on create or by Single Sign-On.
        name:
          type: string
        type:
          type: string
          example: company
        weight:
          type: integer
        mrr:
          type: integer
        meta:
          type: object
          description: Your custom key/value data.
        stats:
          type: object
          description: Maintained on a schedule; may lag a change by up to an hour.
          properties:
            users:
              type: integer
            feedback:
              type: integer
            votes:
              type: integer
            comments:
              type: integer
            satisfaction:
              type: number
              description: Average CSAT, 0–5. Non-responders are excluded.
            promoter:
              type: number
              description: Average NPS, 0–10. Non-responders are excluded.
            active:
              type:
                - string
                - 'null'
              description: When a member was last active. `null` if never.
        created:
          type: string
          example: '2026-09-17 14:02:11'
        updated:
          type: string
          example: '2026-09-17 14:05:44'
  responses:
    ValidationError:
      description: A field is missing or malformed
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
              data:
                type: object
                properties:
                  key:
                    type: string
                    example: validation_error
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
    Unauthorized:
      description: Missing, malformed, or non-API-key credential
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The key's user lacks the permission for this action
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Over 300 requests in 60 seconds
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: The write could not be completed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer YOUR_API_KEY`. /v2 accepts no other method.'

````