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

# Invite people to a workspace

> Invites people to a workspace, as "Invite members" does in the app. Each new person gets an invitation email that is valid for 14 days; accepting it creates their membership with the role, seat type and leaderboard setting sent here. A person who already belongs to the company is not invited again: they are added straight to the workspaces they are missing and keep their seat type. Emails are matched without case and stored in lowercase. If some invitations could not be created, the others are still sent and the failed emails are listed in `failed_emails`. The invitation is sent in the name of the person who created the API key. A workspace the API key cannot access answers 404. Send an `Idempotency-Key` header so a retry never sends a second email. Because it sends email, it also counts against a lower invite rate limit: 5 requests a minute and 20 an hour per API key, 10 a minute and 30 an hour for the whole company. Requires `users.write`.



## OpenAPI

````yaml /public-v2.json post /workspaces/{workspaceId}/invites
openapi: 3.0.3
info:
  title: Triple Session Public API
  version: 2.0.0
  license:
    name: Proprietary
    url: https://triplesession.com/terms-of-service
  description: |
    Public API v2 exposes Triple Session data through stable REST endpoints.
    Requests are authenticated with a public API key sent as a bearer token.
    The API key determines the maximum accessible resource scope.

    Every successful response wraps its result in `data`. Lists add a
    `pagination` object with `page`, `limit`, `total_count` and `total_pages`.
    Errors are `{ "error": { "message": "..." } }`.
    A value that does not exist is `null`, never an empty string.
    Calls marked private are never returned: they are left out of lists and
    answer 404 on detail endpoints.

    Rate limits: each API key may make 120 requests per minute and 3,600 per
    hour. All keys of a company together may make 300 per minute and 9,000 per
    hour. A request over either limit gets a 429 with `Retry-After`.

    Successful responses and 429 responses carry rate-limit headers. Other
    errors (401, 403, 400, 404, 500) may not. `X-RateLimit-Limit`,
    `X-RateLimit-Remaining`, `X-RateLimit-Reset` and
    `X-RateLimit-Active-Window` describe one window: on a successful response,
    the window with the fewest requests remaining; on a 429, the exhausted
    window with the longest wait. Each window also has its own set:
    `X-RateLimit-Minute-*`, `X-RateLimit-Hour-*`,
    `X-RateLimit-Company-Minute-*` and `X-RateLimit-Company-Hour-*`.
servers:
  - url: https://app.triplesession.com/api/public/v2
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Calls
    description: Call report data and artifacts.
  - name: Scorecards
    description: Scorecards and their rubrics.
  - name: Workspaces
    description: The company's workspaces and their members.
  - name: Users
    description: The company's people, with their company role and status.
  - name: Roleplays
    description: Roleplay sessions and the personas members practise with.
  - name: CRM
    description: >-
      The company's CRM objects (deals, companies, contacts, leads), as Pulse
      shows them.
paths:
  /workspaces/{workspaceId}/invites:
    post:
      tags:
        - Workspaces
      summary: Invite people to a workspace
      description: >-
        Invites people to a workspace, as "Invite members" does in the app. Each
        new person gets an invitation email that is valid for 14 days; accepting
        it creates their membership with the role, seat type and leaderboard
        setting sent here. A person who already belongs to the company is not
        invited again: they are added straight to the workspaces they are
        missing and keep their seat type. Emails are matched without case and
        stored in lowercase. If some invitations could not be created, the
        others are still sent and the failed emails are listed in
        `failed_emails`. The invitation is sent in the name of the person who
        created the API key. A workspace the API key cannot access answers 404.
        Send an `Idempotency-Key` header so a retry never sends a second email.
        Because it sends email, it also counts against a lower invite rate
        limit: 5 requests a minute and 20 an hour per API key, 10 a minute and
        30 an hour for the whole company. Requires `users.write`.
      operationId: createWorkspaceInvites
      parameters:
        - $ref: '#/components/parameters/WorkspaceId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceInvitesRequest'
      responses:
        '201':
          description: The invitations were sent and existing members were added.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
            X-RateLimit-Active-Window:
              $ref: '#/components/headers/XRateLimitActiveWindow'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceInvitesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/IdempotencyKeyReused'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    WorkspaceId:
      name: workspaceId
      in: path
      required: true
      description: Workspace ID.
      schema:
        type: string
        format: uuid
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Any unique value, up to 255 characters. A retry with the same key within
        24 hours returns the first answer, with `Idempotent-Replayed: true`,
        instead of doing the work again.
      schema:
        type: string
        maxLength: 255
  schemas:
    CreateWorkspaceInvitesRequest:
      type: object
      required:
        - invites
      properties:
        invites:
          type: array
          minItems: 1
          maxItems: 100
          description: The people to invite. An email listed twice is invited once.
          items:
            $ref: '#/components/schemas/WorkspaceInviteInput'
        additional_workspace_ids:
          type: array
          maxItems: 50
          default: []
          description: >-
            Other workspaces to add the people to. Each must be one the API key
            can access, otherwise 404. A person who already belongs to the
            company joins them at once with the requested `role`. A new person
            joins them as a `member` when they accept, as in the app; `role`
            applies to the workspace in the path.
          items:
            type: string
            format: uuid
      additionalProperties: false
    WorkspaceInvitesResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WorkspaceInvites'
      additionalProperties: false
    WorkspaceInviteInput:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          format: email
        role:
          type: string
          enum:
            - member
            - manager
          default: member
          description: The person's role in the workspaces.
        seat_type:
          type: string
          enum:
            - viewer
            - recording
          default: recording
          description: >-
            The company seat given on accepting. A person who already belongs to
            the company keeps their seat.
        is_in_leaderboard:
          type: boolean
          default: true
      additionalProperties: false
    WorkspaceInvites:
      type: object
      required:
        - workspace_id
        - invited_emails
        - failed_emails
        - added_members
        - existing_members
      properties:
        workspace_id:
          type: string
          format: uuid
        invited_emails:
          type: array
          description: Emails sent an invitation, in lowercase.
          items:
            type: string
        failed_emails:
          type: array
          description: >-
            Emails whose invitation could not be created because of an error on
            our side. Everyone else in the request was still handled, so send
            only these again, with a new `Idempotency-Key`. When no invitation
            could be created at all, the request fails with 500 instead.
          items:
            type: string
        added_members:
          type: array
          description: >-
            Company members added to the workspaces they were missing, without
            an invitation.
          items:
            type: object
            required:
              - user_id
              - email
              - workspace_ids
            properties:
              user_id:
                type: string
                format: uuid
              email:
                type: string
              workspace_ids:
                type: array
                description: The workspaces they were added to.
                items:
                  type: string
                  format: uuid
            additionalProperties: false
        existing_members:
          type: array
          description: >-
            Company members who already belonged to every workspace. Nothing
            changed for them.
          items:
            $ref: '#/components/schemas/WorkspaceInviteMember'
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            message:
              type: string
      additionalProperties: false
    WorkspaceInviteMember:
      type: object
      required:
        - user_id
        - email
      properties:
        user_id:
          type: string
          format: uuid
        email:
          type: string
      additionalProperties: false
  headers:
    XRateLimitLimit:
      description: Limit for the active rate limit window.
      schema:
        type: integer
    XRateLimitRemaining:
      description: Requests remaining in the active rate limit window.
      schema:
        type: integer
    XRateLimitReset:
      description: Unix timestamp when the active rate limit window resets.
      schema:
        type: integer
    XRateLimitActiveWindow:
      description: >-
        The window the main headers describe. On a successful response, the one
        with the fewest requests remaining; on a 429, the exhausted one with the
        longest wait. The `company-` windows count every key of the company.
      schema:
        type: string
        enum:
          - minute
          - hour
          - company-minute
          - company-hour
    RetryAfter:
      description: Seconds until the request may be retried.
      schema:
        type: integer
  responses:
    BadRequest:
      description: >-
        Invalid or unknown path or query parameter. Unknown query parameters are
        rejected, so a misspelt filter never returns unfiltered data.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing, unknown, expired or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        The API key is valid but lacks the required scope, or the workspace is
        outside the key's access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The resource does not exist or the API key cannot see it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: >-
        The request conflicts with the resource's state, or a request with the
        same `Idempotency-Key` is still running.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    IdempotencyKeyReused:
      description: The `Idempotency-Key` was already used for a different request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: >-
        Rate limit exceeded, for this API key or for the company as a whole. The
        message says which.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
        X-RateLimit-Active-Window:
          $ref: '#/components/headers/XRateLimitActiveWindow'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Use a public API key with the endpoint's required scope.

````

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