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

# Create a group

> Creates a partner group in a program. Its public_key, the ?group= key of its sign-up link, comes from the name. The subscription plan caps how many groups a program can have.



## OpenAPI

````yaml /api-reference/openapi.json post /v2/groups
openapi: 3.1.0
info:
  title: Tolt Public API
  version: 2.0.0
servers:
  - url: https://platform.tolt.com
    description: Production
security:
  - bearerAuth: []
paths:
  /v2/groups:
    post:
      tags:
        - Groups
      summary: Create a group
      description: >-
        Creates a partner group in a program. Its public_key, the ?group= key of
        its sign-up link, comes from the name. The subscription plan caps how
        many groups a program can have.
      operationId: createGroup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                program_id:
                  type: string
                  minLength: 1
                  description: >-
                    Id of the program to add the group to (prg_...), as returned
                    when listing programs. The subscription plan caps how many
                    groups a program can have.
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Name of the group, up to 255 characters. It also sets
                    public_key, the `?group=` key of the group's sign-up link:
                    the name in lowercase, with spaces turned into hyphens and
                    anything other than letters, digits and hyphens dropped
                    ("VIP Partners" becomes vip-partners). No two groups in a
                    program can have the same key.
                description:
                  type: string
                  maxLength: 200
                  description: >-
                    Short description of the group that partners see on its
                    sign-up page, up to 200 characters.
                website_url:
                  type: string
                  maxLength: 2048
                  format: uri
                  pattern: ^https?:\/\/[^\s/\\]\S*$
                  description: >-
                    Website the referral links of the group's partners point to,
                    starting with http:// or https://. Leave it out to use the
                    program's website.
                is_private:
                  type: boolean
                  description: >-
                    true makes people who sign up through the group's link
                    pending until you approve them; invited partners still join
                    as active. Defaults to false.
                minimum_payout:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                  description: >-
                    Balance a partner in the group must reach before they are
                    paid, as an integer in minor units of the program currency
                    (5000 = 50.00), 0 or more. Above 16777216 it has to be an
                    amount the database stores exactly, such as a round one
                    (20000000). Leave it out to use the program's minimum.
                is_default:
                  type: boolean
                  description: >-
                    true makes this the program's default group, which people
                    join when they sign up without a group link. The previous
                    default group stops being the default. Defaults to false.
              required:
                - program_id
                - name
              additionalProperties: false
              example:
                program_id: prg_T6z8aRW3XCmvFWP972RKxpAd
                name: Influencers
                description: Creators with their own audience
                website_url: https://example.com/creators
                is_private: true
                minimum_payout: 10000
      responses:
        '201':
          description: The created group
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Request successful
                  data:
                    $ref: '#/components/schemas/Group'
                required:
                  - success
                  - message
                  - data
              example:
                success: true
                message: Successfully created group
                data:
                  id: grp_zUQ8Pt281MsbNDApmDPN3Y2a
                  name: Influencers
                  description: Creators with their own audience
                  program_id: prg_T6z8aRW3XCmvFWP972RKxpAd
                  is_default: false
                  public_key: influencers
                  website_url: https://example.com/creators
                  is_private: true
                  allow_manual_lead_submission: false
                  minimum_payout: 10000
                  created_at: '2026-10-01T12:00:00Z'
                  updated_at: '2026-10-01T12:00:00Z'
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
        '400':
          description: >-
            Invalid request, unknown program, or the plan's group limit is
            reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: 'request: Invalid input: expected object, received null'
                code: validation_error
                doc_url: https://docs.tolt.com/errors#validation_error
                errors:
                  - field: request
                    message: 'Invalid input: expected object, received null'
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Unauthorized
                code: unauthorized
                doc_url: https://docs.tolt.com/errors#unauthorized
        '409':
          description: The program already has a group with the public key this name gives
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: >-
                  The program already has a group with the public key
                  "influencers". Choose a different name
                code: already_exists
                doc_url: https://docs.tolt.com/errors#already_exists
                errors:
                  - field: name
                    message: >-
                      The program already has a group with the public key
                      "influencers". Choose a different name
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Group:
      type: object
      properties:
        id:
          type: string
          example: grp_zUQ8Pt281MsbNDApmDPN3Y2a
        name:
          type:
            - string
            - 'null'
          example: Default
        description:
          type:
            - string
            - 'null'
          example: Standard affiliate commission rates
        program_id:
          type:
            - string
            - 'null'
          example: prg_T6z8aRW3XCmvFWP972RKxpAd
        is_default:
          type:
            - boolean
            - 'null'
          example: true
        public_key:
          type:
            - string
            - 'null'
          example: null
        website_url:
          type:
            - string
            - 'null'
          example: https://example.com
        is_private:
          type:
            - boolean
            - 'null'
          example: false
        allow_manual_lead_submission:
          type:
            - boolean
            - 'null'
          example: false
        minimum_payout:
          type:
            - number
            - 'null'
          example: 5000
        created_at:
          type: string
          format: date-time
          example: '2026-10-01T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-10-01T12:00:00Z'
      required:
        - id
        - name
        - description
        - program_id
        - is_default
        - public_key
        - website_url
        - is_private
        - allow_manual_lead_submission
        - minimum_payout
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: Human-readable explanation. May change; branch on code instead.
        code:
          type: string
          enum:
            - bad_request
            - validation_error
            - invalid_reference
            - invalid_cursor
            - unauthorized
            - forbidden
            - not_found
            - conflict
            - already_exists
            - commission_paid
            - commission_frozen
            - transaction_refunded
            - commission_exists
            - rate_limited
            - short_link_unavailable
            - payload_too_large
            - internal_error
          description: Stable machine-readable error code.
          example: not_found
        doc_url:
          type: string
          example: https://docs.tolt.com/errors#not_found
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
          description: >-
            One entry per offending field. Present on validation_error and
            invalid_reference.
      required:
        - success
        - message
        - code
        - doc_url
  headers:
    X-RateLimit-Limit:
      description: Requests allowed in the current window.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests left in the current window.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix time, in seconds, when the window resets.
      schema:
        type: integer
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  responses:
    PayloadTooLarge:
      description: Request body exceeds 1 MB
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Request body exceeds 1 MB
            code: payload_too_large
            doc_url: https://docs.tolt.com/errors#payload_too_large
    RateLimited:
      description: The API key exceeded its rate limit
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Too many requests. Retry after the window resets.
            code: rate_limited
            doc_url: https://docs.tolt.com/errors#rate_limited
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Tolt API key sent as a bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.