openapi: 3.2.0 info: title: Cacheflow Documents API version: 0.0.3 servers: - url: https://api.getcacheflow.com description: 'Production. Calls are tenant-routed: send Host: .api.getcacheflow.com (per github.com/getcacheflow/api-examples SETUP.md). Host no longer resolves as of 2026-08-13.' - url: https://api.sandbox.getcacheflow.com description: Sandbox. Tenant-routed as .api.sandbox.getcacheflow.com. Host no longer resolves as of 2026-08-13. tags: - name: Documents paths: /api/latest/documents/{id}/versions: post: tags: - Documents summary: Create a new version for a document operationId: createDocumentVersion parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: content: application/octet-stream: schema: type: object responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DocumentVersion' /api/latest/documents/{id}: get: tags: - Documents summary: Retrieve a document operationId: getDocument parameters: - name: id in: path required: true schema: type: string format: uuid responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Document' patch: tags: - Documents summary: Update a document operationId: updateDocument parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/Document' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Document' /api/latest/document-versions/{id}: get: tags: - Documents summary: Retrieve a document version operationId: getDocumentVersion parameters: - name: id in: path required: true schema: type: string format: uuid responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DocumentVersion' /api/latest/documents/download: get: tags: - Documents summary: Download a CSV operationId: downloadDocument responses: default: description: default response content: '*/*': {} /api/latest/documents/download-zip: get: tags: - Documents summary: Download a zip of all documents operationId: downloadZip responses: default: description: default response content: '*/*': {} components: schemas: Document: type: object properties: id: type: string format: uuid createdAt: type: string format: date-time readOnly: true createdBy: type: string updatedAt: type: string format: date-time readOnly: true updatedBy: type: string readOnly: true fileName: type: string latestVersion: $ref: '#/components/schemas/DocumentVersion' DocumentVersion: type: object properties: id: type: string format: uuid createdAt: type: string format: date-time readOnly: true createdBy: type: string updatedAt: type: string format: date-time readOnly: true updatedBy: type: string readOnly: true versionNumber: type: integer format: int32 fileName: type: string url: type: string documentId: type: string format: uuid