{
  "openapi": "3.1.0",
  "info": {
    "title": "Dock REST API",
    "version": "1.0.1",
    "description": "Dock's REST API. Bearer auth on every endpoint (except auth magic-link send). Returns JSON. Every mutation emits an event that streams over SSE and delivers to org-scoped webhooks.",
    "contact": {
      "name": "Dock Support",
      "url": "https://trydock.ai/docs/support"
    }
  },
  "servers": [
    {
      "url": "https://trydock.ai"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "dk_live_<48 hex>"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Machine-readable code (unauthorized, forbidden, not_found, validation, conflict, rate_limit, payment_required, internal)."
          },
          "message": {
            "type": "string"
          },
          "details": {},
          "requestId": {
            "type": "string"
          }
        }
      },
      "Workspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "table",
              "doc"
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "private",
              "org",
              "unlisted",
              "public"
            ]
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ColumnDef"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ColumnDef": {
        "type": "object",
        "required": [
          "key",
          "label",
          "type",
          "position"
        ],
        "properties": {
          "key": {
            "type": "string",
            "maxLength": 64
          },
          "label": {
            "type": "string",
            "maxLength": 200
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "longtext",
              "number",
              "status",
              "person",
              "date",
              "url",
              "checkbox",
              "select"
            ]
          },
          "position": {
            "type": "integer",
            "minimum": 0
          },
          "width": {
            "type": "integer"
          },
          "hidden": {
            "type": "boolean"
          },
          "description": {
            "type": "string",
            "maxLength": 280
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "color": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Row": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          },
          "createdByPrincipalId": {
            "type": "string"
          },
          "updatedByPrincipalId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BillingSummary": {
        "type": "object",
        "properties": {
          "plan": {
            "type": "string",
            "enum": [
              "free",
              "pro",
              "scale"
            ]
          },
          "monthlyPriceCents": {
            "type": "integer"
          },
          "activeAgents": {
            "type": "integer"
          },
          "agentCap": {
            "type": "integer"
          },
          "activeMembers": {
            "type": "integer"
          },
          "memberCap": {
            "type": "integer"
          },
          "activeWorkspaces": {
            "type": "integer"
          },
          "workspaceCap": {
            "type": "integer"
          },
          "rowsPerWorkspaceCap": {
            "type": "integer"
          },
          "apiCallsPerMonthCap": {
            "type": "integer"
          },
          "webhooksPerMonthCap": {
            "type": "integer"
          },
          "monthlyTotalCents": {
            "type": "integer"
          }
        }
      }
    }
  },
  "paths": {
    "/api/auth": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Send magic-link email",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. Magic link sent, or { waitlisted: true }.",
            "content": {
              "application/json": {}
            }
          },
          "429": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/me": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Current user + org",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Auth"
        ],
        "summary": "Update profile (name, avatarUrl)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "avatarUrl": {
                    "type": "string",
                    "format": "uri",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/me/sessions": {
      "delete": {
        "tags": [
          "Auth"
        ],
        "summary": "Sign out everywhere",
        "responses": {
          "200": {
            "description": "OK. Returns { revokedSessions: number }.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/me/export": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "GDPR data export",
        "responses": {
          "200": {
            "description": "JSON bundle.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/workspaces": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List workspaces accessible to caller",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaces": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Workspace"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Create workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "table",
                      "doc"
                    ],
                    "default": "table"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "private",
                      "org",
                      "unlisted",
                      "public"
                    ]
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ColumnDef"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          },
          "402": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{slug}": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      ],
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Workspace detail",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          },
          "404": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Rename / change mode / visibility",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "table",
                      "doc"
                    ]
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "private",
                      "org",
                      "unlisted",
                      "public"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Delete workspace (owner only)",
        "responses": {
          "204": {
            "description": "Deleted."
          }
        }
      }
    },
    "/api/workspaces/{slug}/rows": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      ],
      "get": {
        "tags": [
          "Rows"
        ],
        "summary": "List rows",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            }
          },
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Row"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Rows"
        ],
        "summary": "Append row",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "position": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Row"
                }
              }
            }
          },
          "402": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{slug}/rows/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        },
        {
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "Rows"
        ],
        "summary": "Partial-merge update",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "position": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Row"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Rows"
        ],
        "summary": "Delete row",
        "responses": {
          "204": {
            "description": "Deleted."
          }
        }
      }
    },
    "/api/workspaces/{slug}/rows/bulk": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      ],
      "patch": {
        "tags": [
          "Rows"
        ],
        "summary": "Bulk partial-merge (up to 500, all-or-nothing)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "updates"
                ],
                "properties": {
                  "updates": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "data"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          },
          "422": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{slug}/rows/{id}/history": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        },
        {
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Rows"
        ],
        "summary": "Recent change events for one row",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/workspaces/{slug}/doc": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      ],
      "get": {
        "tags": [
          "Doc"
        ],
        "summary": "Fetch doc body (JSON / markdown / text)",
        "description": "Default returns ProseMirror JSON in `content`. Pass `?format=markdown` for CommonMark+GFM in `markdown`, or `?format=text` for plain text in `text`. `Accept: text/markdown` and `Accept: text/plain` are also honored when the query param is absent. `?format` overrides `Accept`.",
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "markdown",
                "text"
              ],
              "default": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      },
      "put": {
        "tags": [
          "Doc"
        ],
        "summary": "Replace doc body",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "content"
                ],
                "properties": {
                  "content": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/workspaces/{slug}/columns": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      ],
      "get": {
        "tags": [
          "Columns"
        ],
        "summary": "Column schema",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      },
      "post": {
        "tags": [
          "Columns"
        ],
        "summary": "Append a single column",
        "description": "Append one column to the existing schema. Server auto-computes `position` so the contiguity invariant (0, 1, 2, …) holds. `key` must be unique → 409 on collision. Editor role required.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "column"
                ],
                "properties": {
                  "column": {
                    "$ref": "#/components/schemas/ColumnDef"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          },
          "409": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Columns"
        ],
        "summary": "Replace column schema",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "columns"
                ],
                "properties": {
                  "columns": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ColumnDef"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/workspaces/{slug}/events": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      ],
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Audit log",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "in": "query",
            "name": "action",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/workspaces/{slug}/subscribe": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      ],
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Server-Sent Events stream",
        "responses": {
          "200": {
            "description": "text/event-stream",
            "content": {
              "text/event-stream": {}
            }
          }
        }
      }
    },
    "/api/keys": {
      "get": {
        "tags": [
          "Keys"
        ],
        "summary": "List keys",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      },
      "post": {
        "tags": [
          "Keys"
        ],
        "summary": "Create key (shown once)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentName": {
                    "type": "string"
                  },
                  "workspaceId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. `secret` shown once.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/keys/{id}": {
      "parameters": [
        {
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "Keys"
        ],
        "summary": "Revoke key",
        "responses": {
          "204": {
            "description": "Revoked."
          }
        }
      }
    },
    "/api/orgs/{slug}/webhooks": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        }
      ],
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List org webhooks",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Subscribe (secret shown once)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/billing": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Current plan + usage",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/billing/upgrade": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Upgrade to pro or scale",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "plan"
                ],
                "properties": {
                  "plan": {
                    "type": "string",
                    "enum": [
                      "pro",
                      "scale"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/billing/downgrade": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Schedule downgrade at period end",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/billing/portal": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Stripe customer portal URL",
        "responses": {
          "200": {
            "description": "OK. Returns { url }.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/billing/request-limit-increase": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Ask for a cap past Scale",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agents",
                      "workspaces",
                      "rows",
                      "other"
                    ]
                  },
                  "desiredValue": {
                    "type": "integer"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/support": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "List tickets for your org",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      },
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "File ticket",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "title",
                  "body"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "bug",
                      "feature",
                      "billing",
                      "question",
                      "other"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 200
                  },
                  "body": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 10000
                  },
                  "context": {
                    "type": "object"
                  },
                  "attachmentUrls": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    },
                    "maxItems": 4
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/support/upload": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Upload screenshot (multipart/form-data)",
        "responses": {
          "200": {
            "description": "OK. Returns blob URL.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/referrals/me": {
      "get": {
        "tags": [
          "Referrals"
        ],
        "summary": "Your referral code + progress",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  }
}