openapi: 3.1.0
info:
  title: llmdrop
  version: 0.2.0-beta
  description: Agent-native paste-to-URL service for Markdown and HTML generated by LLMs.
servers:
  - url: https://llmdrop.fly.dev
components:
  schemas: {}
  parameters: {}
paths:
  /api/documents:
    get:
      parameters:
        - schema:
            type: string
            minLength: 1
          required: false
          name: folder
          in: query
      responses:
        "200":
          description: Documents for the authenticated account
          content:
            application/json:
              schema:
                type: object
                properties:
                  documents:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                        slug:
                          type: string
                          minLength: 1
                        title:
                          type: string
                          minLength: 1
                        url:
                          type: string
                          format: uri
                        visibility:
                          type: string
                          enum:
                            - private
                            - link
                            - public
                        content_type:
                          type: string
                          enum:
                            - markdown
                            - html
                        expires_at:
                          type:
                            - integer
                            - "null"
                          minimum: 0
                        updated_at:
                          type: integer
                          minimum: 0
                      required:
                        - id
                        - slug
                        - title
                        - url
                        - visibility
                        - content_type
                        - expires_at
                        - updated_at
                required:
                  - documents
        "400":
          description: Invalid query
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
        "401":
          description: Authentication required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 300
                content:
                  type: string
                  minLength: 1
                content_type:
                  type: string
                  enum:
                    - markdown
                    - html
                  default: markdown
                folder:
                  type: string
                  minLength: 1
                slug:
                  type: string
                  pattern: ^[a-z0-9-]{3,60}$
                password:
                  type: string
                  minLength: 1
                visibility:
                  type: string
                  enum:
                    - private
                    - link
                    - public
                  default: link
                expires_in_days:
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 10
              required:
                - title
                - content
      responses:
        "201":
          description: Document created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  slug:
                    type: string
                    minLength: 1
                  title:
                    type: string
                    minLength: 1
                  url:
                    type: string
                    format: uri
                  visibility:
                    type: string
                    enum:
                      - private
                      - link
                      - public
                  content_type:
                    type: string
                    enum:
                      - markdown
                      - html
                  folder:
                    type:
                      - string
                      - "null"
                  expires_at:
                    type:
                      - integer
                      - "null"
                    minimum: 0
                  created_at:
                    type: integer
                    minimum: 0
                  updated_at:
                    type: integer
                    minimum: 0
                required:
                  - id
                  - slug
                  - title
                  - url
                  - visibility
                  - content_type
                  - folder
                  - expires_at
                  - created_at
                  - updated_at
        "400":
          description: Invalid JSON or input
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
        "401":
          description: Authentication required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
        "413":
          description: Payload too large
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
  /api/documents/{slug}:
    patch:
      parameters:
        - schema:
            type: string
            minLength: 1
          required: true
          name: slug
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 300
                content:
                  type: string
                  minLength: 1
                content_type:
                  type: string
                  enum:
                    - markdown
                    - html
                password:
                  type:
                    - string
                    - "null"
                  minLength: 1
                visibility:
                  type: string
                  enum:
                    - private
                    - link
                    - public
                extend_days:
                  type: integer
                  minimum: 1
                  maximum: 10
      responses:
        "200":
          description: Document updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  slug:
                    type: string
                    minLength: 1
                  title:
                    type: string
                    minLength: 1
                  url:
                    type: string
                    format: uri
                  visibility:
                    type: string
                    enum:
                      - private
                      - link
                      - public
                  content_type:
                    type: string
                    enum:
                      - markdown
                      - html
                  folder:
                    type:
                      - string
                      - "null"
                  expires_at:
                    type:
                      - integer
                      - "null"
                    minimum: 0
                  created_at:
                    type: integer
                    minimum: 0
                  updated_at:
                    type: integer
                    minimum: 0
                required:
                  - id
                  - slug
                  - title
                  - url
                  - visibility
                  - content_type
                  - folder
                  - expires_at
                  - created_at
                  - updated_at
        "400":
          description: Invalid JSON or input
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
        "401":
          description: Authentication required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
        "404":
          description: Document not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
        "413":
          description: Payload too large
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
    delete:
      parameters:
        - schema:
            type: string
            minLength: 1
          required: true
          name: slug
          in: path
      responses:
        "200":
          description: Document deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted:
                    type: boolean
                    enum:
                      - true
                  slug:
                    type: string
                    minLength: 1
                required:
                  - deleted
                  - slug
        "400":
          description: Invalid path parameter
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
        "401":
          description: Authentication required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
        "404":
          description: Document not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    minLength: 1
                  details: {}
                required:
                  - error
webhooks: {}
