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

# Add an artifact to a chat

> Attaches a workflow, table, canvas, analytics view or app to a chat you can post in, so Connie can use it. The item must be in the chat's workspace; a canvas must belong to this chat. The same item can't be attached twice.




## OpenAPI

````yaml /openapi/chat.yaml post /ai-chat/conversations/{id}/artifacts
openapi: 3.1.0
info:
  title: Connie Chat API
  version: 1.0.0
  description: >
    Endpoints the Connie web app uses for chat. They authenticate with your
    signed-in browser session — see
    https://docs.connie.ai/api-reference/authentication. These are the app's own
    endpoints and can change when the app changes.
servers:
  - url: https://connie.ai/api
security:
  - sessionCookie: []
tags:
  - name: Chats
    description: List, create, rename, pin and delete chats.
  - name: Turns
    description: Send a message to Connie and stop a running reply.
  - name: Chat messages
    description: Read the saved messages of a chat.
  - name: Artifacts
    description: Workflows, tables, canvases, analytics views and apps attached to a chat.
  - name: Sharing
    description: >-
      Share a chat or a single file or canvas, and read a chat through its
      public link.
paths:
  /ai-chat/conversations/{id}/artifacts:
    post:
      tags:
        - Artifacts
      summary: Add an artifact to a chat
      description: >
        Attaches a workflow, table, canvas, analytics view or app to a chat you
        can post in, so Connie can use it. The item must be in the chat's
        workspace; a canvas must belong to this chat. The same item can't be
        attached twice.
      operationId: addChatArtifact
      parameters:
        - $ref: '#/components/parameters/ConversationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - source_type
                - source_id
              properties:
                source_type:
                  type: string
                  enum:
                    - workflow
                    - table
                    - canvas
                    - analytics
                    - app
                source_id:
                  type: string
                  format: uuid
                  description: Id of the workflow, table, canvas, analytics view or app.
                title:
                  type: string
                  description: Defaults to the item's own name.
      responses:
        '201':
          description: The attached artifact.
          content:
            application/json:
              schema:
                type: object
                properties:
                  artifact:
                    $ref: '#/components/schemas/ChatArtifact'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: This item is already attached to the chat.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    ConversationId:
      name: id
      in: path
      required: true
      description: The conversation (chat) id.
      schema:
        type: string
        format: uuid
  schemas:
    ChatArtifact:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The attachment's own id.
        conversation_id:
          type: string
          format: uuid
        workspace_id:
          type: string
          format: uuid
        source_type:
          type: string
          enum:
            - workflow
            - table
            - canvas
            - analytics
            - app
        source_id:
          type: string
          format: uuid
          description: Id of the workflow, table, canvas, analytics view or app.
        title:
          type: string
        position:
          type: integer
        added_by:
          type: string
          format: uuid
        added_at:
          type: string
          format: date-time
        source_deleted:
          type: boolean
          description: True when the underlying item has been deleted.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable message.
        code:
          type: string
          description: Machine-readable code, when there is one.
      required:
        - error
  responses:
    BadRequest:
      description: A required field is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        No valid session (`UNAUTHORIZED`), or the session has expired
        (`SESSION_EXPIRED`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not found, or you can't open it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: header
      name: Cookie
      description: >-
        The full Cookie header copied from a signed-in connie.ai browser
        request. See the Authentication page.

````

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