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

# Upload Attachment

> Upload a file attachment to a card.



## OpenAPI

````yaml /openapi.json post /api/v1/attachments/{board_id}/{card_id}
openapi: 3.1.0
info:
  description: >-
    Okto Pulse REST API schema generated from okto-pulse-core 0.2.0 source for
    docs.oktolabs.ai.
  title: Okto Pulse
  version: 0.2.0
servers: []
security: []
paths:
  /api/v1/attachments/{board_id}/{card_id}:
    post:
      tags:
        - attachments
      summary: Upload Attachment
      description: Upload a file attachment to a card.
      operationId: upload_attachment_api_v1_attachments__board_id___card_id__post
      parameters:
        - in: path
          name: board_id
          required: true
          schema:
            title: Board Id
            type: string
        - in: path
          name: card_id
          required: true
          schema:
            title: Card Id
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_attachment_api_v1_attachments__board_id___card_id__post
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_upload_attachment_api_v1_attachments__board_id___card_id__post:
      properties:
        file:
          contentMediaType: application/octet-stream
          title: File
          type: string
      required:
        - file
      title: Body_upload_attachment_api_v1_attachments__board_id___card_id__post
      type: object
    AttachmentResponse:
      description: Schema for attachment response.
      properties:
        card_id:
          title: Card Id
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        filename:
          title: Filename
          type: string
        id:
          title: Id
          type: string
        mime_type:
          title: Mime Type
          type: string
        original_filename:
          title: Original Filename
          type: string
        size:
          title: Size
          type: integer
        uploaded_by:
          title: Uploaded By
          type: string
      required:
        - id
        - card_id
        - filename
        - original_filename
        - mime_type
        - size
        - uploaded_by
        - created_at
      title: AttachmentResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        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
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````