{"openapi":"3.1.0","info":{"title":"Wordspace Public API","version":"1.0.0","description":"Account-scoped API for custom Wordspace apps, workspaces, QR codes, and analytics. Public API access is available on Origin, Thrive, Scale, and Enterprise packages; package capacity and hourly request limits are enforced by account plan."},"servers":[{"url":"https://api.wordspace.io/api/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Wordspace API key"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"},"request_id":{"type":"string"}},"required":["code","message","request_id"]}},"required":["error"]},"Account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"},"subscription_tier":{"type":"string"},"subscription_status":{"type":"string"}}},"Workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"logo_url":{"type":["string","null"]},"qr_code_count":{"type":"number"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"QRCode":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"destination_url":{"type":"string","format":"uri"},"status":{"type":"string"},"total_scans":{"type":"number"},"vanity_url":{"type":"string","format":"uri"},"canonical_url":{"type":"string","format":"uri"},"qr_image_url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"responses":{"UnauthorizedError":{"description":"Missing, malformed, expired, or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ForbiddenError":{"description":"The API key is valid but the account package, role, scope, or resource limit does not allow the operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimitError":{"description":"Hourly API request limit exceeded for this key","headers":{"X-Request-ID":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/account":{"get":{"summary":"Get account","tags":["Account"],"responses":{"200":{"description":"Account details"},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces":{"get":{"summary":"List workspaces","tags":["Workspaces"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Workspace list"}}},"post":{"summary":"Create workspace","tags":["Workspaces"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":100},"description":{"type":"string"},"logo_url":{"type":"string","format":"uri"}}}}}},"responses":{"201":{"description":"Workspace created"}}}},"/workspaces/{workspace_id}":{"get":{"summary":"Get workspace","tags":["Workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Workspace details"}}},"patch":{"summary":"Update workspace","tags":["Workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Workspace updated"}}}},"/workspaces/{workspace_id}/qr-codes":{"get":{"summary":"List workspace QR codes","tags":["QR Codes"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"QR code list"}}},"post":{"summary":"Create workspace QR code","tags":["QR Codes"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","destination_url"],"properties":{"name":{"type":"string"},"destination_url":{"type":"string","format":"uri"},"tags":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"QR code created"}}}},"/qr-codes":{"get":{"summary":"List account QR codes","tags":["QR Codes"],"parameters":[{"name":"workspace_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"QR code list"}}}},"/qr-codes/{id}":{"get":{"summary":"Get QR code","tags":["QR Codes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"QR code details"}}},"patch":{"summary":"Update QR code","tags":["QR Codes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"QR code updated"}}},"delete":{"summary":"Delete QR code","tags":["QR Codes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"QR code deleted"}}}},"/qr-codes/{id}/analytics":{"get":{"summary":"Get QR analytics","tags":["Analytics"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"QR code analytics"}}}}}}