{
  "openapi": "3.1.0",
  "info": {
    "title": "Thimble public documents",
    "version": "1.1.0",
    "description": "Public read-only documents. Stable JSON reads use /api/v1. Compatible fields may be added within v1; breaking changes require a new major path. Any future removal is announced with migration instructions, Deprecation and Sunset headers at least 90 days in advance. No removal is scheduled. Shop records remain in the signed-in interface; no customer integration or delegated access endpoints are offered."
  },
  "servers": [
    {
      "url": "https://stitchtrack-216967.cofounder.company"
    }
  ],
  "security": [],
  "paths": {
    "/": {
      "get": {
        "operationId": "readThimbleOverview",
        "summary": "Read the alteration shop product overview",
        "security": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Document"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "405": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "500": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "description": "Send Accept: application/json for typed JSON. The existing browser/Markdown representation remains available; prefer the versioned document API for new integrations.",
        "parameters": [
          {
            "in": "header",
            "name": "Accept",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["application/json"]
            }
          }
        ]
      }
    },
    "/index.md": {
      "get": {
        "operationId": "readThimbleMarkdown",
        "summary": "Read the Markdown product overview",
        "security": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Document"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "405": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "500": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "description": "Send Accept: application/json for typed JSON. The existing browser/Markdown representation remains available; prefer the versioned document API for new integrations.",
        "parameters": [
          {
            "in": "header",
            "name": "Accept",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["application/json"]
            }
          }
        ]
      }
    },
    "/auth.md": {
      "get": {
        "operationId": "readThimblePermissions",
        "summary": "Read browser sign-in and shop role permissions",
        "security": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Document"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "405": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "500": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "description": "Send Accept: application/json for typed JSON. The existing browser/Markdown representation remains available; prefer the versioned document API for new integrations.",
        "parameters": [
          {
            "in": "header",
            "name": "Accept",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["application/json"]
            }
          }
        ]
      }
    },
    "/agents/shop-workflow.md": {
      "get": {
        "operationId": "readThimbleWorkflow",
        "summary": "Read the authorized garment workflow",
        "security": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Document"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "405": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "500": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "description": "Send Accept: application/json for typed JSON. The existing browser/Markdown representation remains available; prefer the versioned document API for new integrations.",
        "parameters": [
          {
            "in": "header",
            "name": "Accept",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["application/json"]
            }
          }
        ]
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "readThimbleIndex",
        "summary": "Find Thimble documentation",
        "security": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Document"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "405": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "500": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "description": "Send Accept: application/json for typed JSON. The existing browser/Markdown representation remains available; prefer the versioned document API for new integrations.",
        "parameters": [
          {
            "in": "header",
            "name": "Accept",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["application/json"]
            }
          }
        ]
      }
    },
    "/api/v1/documents": {
      "get": {
        "operationId": "listPublicDocuments",
        "summary": "List public document identifiers",
        "security": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DocumentIndex"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "405": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "500": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/documents/{document}": {
      "get": {
        "operationId": "readPublicDocument",
        "summary": "Read one public document as JSON",
        "security": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Document"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "405": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "500": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "document",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "overview",
                "markdown-overview",
                "permissions",
                "workflow",
                "documentation-index"
              ]
            }
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DocumentSummary": {
        "type": "object",
        "required": ["id", "title", "url", "apiUrl"],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "apiUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Document": {
        "type": "object",
        "required": ["id", "title", "url", "format", "content"],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "format": {
            "type": "string",
            "enum": ["text/markdown", "text/plain"]
          },
          "content": {
            "type": "string"
          }
        }
      },
      "DocumentIndex": {
        "type": "object",
        "required": ["version", "documents"],
        "additionalProperties": false,
        "properties": {
          "version": {
            "type": "string",
            "const": "1"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentSummary"
            }
          }
        }
      },
      "Problem": {
        "type": "object",
        "required": ["type", "title", "status", "code", "detail", "instance"],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "enum": [404, 405, 429, 500]
          },
          "code": {
            "type": "string",
            "enum": [
              "document_not_found",
              "method_not_allowed",
              "rate_limit_exceeded",
              "document_unavailable"
            ]
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string",
            "maxLength": 256
          }
        }
      }
    },
    "responses": {
      "Problem": {
        "description": "Typed RFC 9457 problem details. Read the code and detail; 429 includes Retry-After.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait after a 429.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "Document": {
        "description": "Public document data",
        "headers": {
          "API-Version": {
            "description": "Major JSON API version.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit-Policy": {
            "description": "120 requests per 60 seconds, shared per server instance.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit": {
            "description": "Current remaining quota and reset delay.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit-Limit": {
            "description": "Current window quota.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit-Remaining": {
            "description": "Requests remaining on the current server instance.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit-Reset": {
            "description": "Seconds until this quota resets.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Document"
            }
          }
        }
      },
      "DocumentIndex": {
        "description": "Public document data",
        "headers": {
          "API-Version": {
            "description": "Major JSON API version.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit-Policy": {
            "description": "120 requests per 60 seconds, shared per server instance.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit": {
            "description": "Current remaining quota and reset delay.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit-Limit": {
            "description": "Current window quota.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit-Remaining": {
            "description": "Requests remaining on the current server instance.",
            "schema": {
              "type": "string"
            }
          },
          "RateLimit-Reset": {
            "description": "Seconds until this quota resets.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DocumentIndex"
            }
          }
        }
      }
    }
  }
}
