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

# Attach Ai Ticket Workspace



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/org/ai-tickets/{ticket_id}/workspace
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/org/ai-tickets/{ticket_id}/workspace:
    post:
      tags:
        - AI Tickets API
      summary: Attach Ai Ticket Workspace
      operationId: >-
        attach_ai_ticket_workspace_api_v1_org_ai_tickets__ticket_id__workspace_post
      parameters:
        - in: path
          name: ticket_id
          required: true
          schema:
            format: uuid
            type: string
            title: Ticket Id
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ankra-Organisation-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiTicketWorkspaceAttachRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTicketResponse'
          description: Successful Response
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    AiTicketWorkspaceAttachRequest:
      properties:
        workspace_id:
          format: uuid
          type: string
          title: Workspace Id
      required:
        - workspace_id
      title: AiTicketWorkspaceAttachRequest
      type: object
    AiTicketResponse:
      properties:
        id:
          format: uuid
          type: string
          title: Id
        ticket_number:
          type: integer
          title: Ticket Number
        title:
          type: string
          title: Title
        body:
          type: string
          title: Body
        kind:
          type: string
          title: Kind
        status:
          type: string
          title: Status
        priority:
          type: string
          title: Priority
        assignee_agent_task_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Assignee Agent Task Id
        assignee_agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee Agent Name
        assignee_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee User Id
        assignee_user_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee User Email
        parent_ticket_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Parent Ticket Id
        parent_ticket_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parent Ticket Number
        sub_ticket_count:
          type: integer
          title: Sub Ticket Count
        open_sub_ticket_count:
          type: integer
          title: Open Sub Ticket Count
        cluster_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Cluster Id
        cluster_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Cluster Name
        cluster_archived:
          title: Cluster Archived
          type: boolean
        alert_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Alert Id
        source_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Kind
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
        plan_document:
          anyOf:
            - type: string
            - type: 'null'
          title: Plan Document
        plan_status:
          type: string
          title: Plan Status
        workspace_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Workspace Id
        slack_channel_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Channel Id
        slack_thread_ts:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Thread Ts
        teams_conversation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Teams Conversation Id
        labels:
          items:
            type: string
          type: array
          title: Labels
        created_by_kind:
          type: string
          title: Created By Kind
        created_by:
          type: string
          title: Created By
        resolution:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolution
        recurrence_count:
          type: integer
          title: Recurrence Count
        last_event_sequence:
          type: integer
          title: Last Event Sequence
        created_at:
          format: date-time
          type: string
          title: Created At
        updated_at:
          format: date-time
          type: string
          title: Updated At
        closed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Closed At
        status_changed_at:
          format: date-time
          type: string
          title: Status Changed At
      required:
        - id
        - ticket_number
        - title
        - body
        - kind
        - status
        - priority
        - assignee_agent_task_id
        - assignee_agent_name
        - assignee_user_id
        - assignee_user_email
        - parent_ticket_id
        - parent_ticket_number
        - sub_ticket_count
        - open_sub_ticket_count
        - cluster_id
        - cluster_name
        - cluster_archived
        - alert_id
        - source_kind
        - source_id
        - plan_document
        - plan_status
        - workspace_id
        - slack_channel_id
        - slack_thread_ts
        - teams_conversation_id
        - labels
        - created_by_kind
        - created_by
        - resolution
        - recurrence_count
        - last_event_sequence
        - created_at
        - updated_at
        - closed_at
        - status_changed_at
      title: AiTicketResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````