> ## 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.

# Revoke chat share link

> Permanently revokes the chat's share link. The URL stops working for good. Sharing the chat again creates a new link with a new URL. To turn a link off and back on without changing its URL, use the share dialog in the app.

The API key acts as its user: the chat must be in the key's workspace and that user must have access to it.

Deleting a chat also permanently deletes its share links.




## OpenAPI

````yaml DELETE /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:
    delete:
      tags:
        - Chat
      summary: Revoke chat share link
      description: >
        Permanently revokes the chat's share link. The URL stops working for
        good. Sharing the chat again creates a new link with a new URL. To turn
        a link off and back on without changing its URL, use the share dialog in
        the app.


        The API key acts as its user: the chat must be in the key's workspace
        and that user must have access to it.


        Deleting a chat also permanently deletes its share links.
      parameters:
        - $ref: '#/components/parameters/chatId'
      responses:
        '200':
          description: Revocation confirmation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Chat share deleted successfully
        '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.
  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'
  schemas:
    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.
  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.