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

# Get chat share link

> Returns the chat's active share link without changing it. The API key acts as its user: the chat must be in the key's workspace and that user must have access to it. Returns 404 when the chat has no active share link.




## OpenAPI

````yaml GET /chats/{chatId}/share
openapi: 3.1.0
info:
  title: TeamAI API
  version: '1.0'
  description: >
    REST API for TeamAI. Run agents and chat completions, and manage projects,
    files, and skills programmatically.
servers:
  - url: https://app.teamai.com/api/v1
security:
  - apiKey: []
tags:
  - name: Chat
  - name: Agents
  - name: Projects
  - name: Skills
paths:
  /chats/{chatId}/share:
    get:
      tags:
        - Chat
      summary: Get chat share link
      description: >
        Returns the chat's active share link without changing it. The API key
        acts as its user: the chat must be in the key's workspace and that user
        must have access to it. Returns 404 when the chat has no active share
        link.
      parameters:
        - $ref: '#/components/parameters/chatId'
      responses:
        '200':
          description: The active share link.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ChatShare'
        '401':
          $ref: '#/components/responses/NotAuthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    chatId:
      name: chatId
      in: path
      required: true
      schema:
        type: string
      description: >
        Chat ID. Must be a chat in the API key's workspace that the key's user
        can access. Organization API keys are bound to the organization's own
        workspace, so chats in its member workspaces return 404; use a workspace
        key.
  schemas:
    ChatShare:
      type: object
      properties:
        id:
          type: string
          description: Share ID.
        title:
          type: string
        shareUrl:
          type: string
          format: uri
          description: Link to give to the people who should open the chat.
        isActive:
          type: boolean
          description: >
            Whether the link currently opens. An inactive link shows "not found"
            until it is switched back on in the app.
        viewCount:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        scope:
          type: string
          enum:
            - workspace
            - organization
            - public
    Error:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code.
          example: bad_request
        message:
          type: string
          description: Human-readable error description.
        details:
          type: object
          additionalProperties: true
          description: Additional error context.
  responses:
    NotAuthenticated:
      description: >
        API key missing or invalid (`not_authenticated`), or valid but not
        permitted to access this resource (`unauthorized`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >
        The API key is not tied to a user, so it cannot perform this action. Use
        a key created by a user.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Requested resource does not exist or is not visible to this key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-teamai-api-key
      description: >
        Secret API key created in Workspace Settings → API Keys (workspace keys)
        or Organization Admin → API Keys (organization keys).

````

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