{"openapi":"3.1.0","info":{"title":"Labeloo API","description":"Import label data and render true-size PDFs across 13 verified rectangular US Letter stock layouts. Optional account endpoints keep Labeloo projects synchronized across browsers.","version":"1.2.0"},"paths":{"/healthz":{"get":{"tags":["System"],"summary":"Health","operationId":"health_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Healthz Get"}}}}}}},"/api/v1":{"get":{"tags":["System"],"summary":"Api Index","operationId":"api_index_api_v1_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Api Index Api V1 Get"}}}}}}},"/api/v1/auth/register":{"post":{"tags":["Accounts"],"summary":"Register","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Api V1 Auth Register Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["Accounts"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Login Api V1 Auth Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["Accounts"],"summary":"Me","operationId":"me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Me Api V1 Auth Me Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/logout":{"post":{"tags":["Accounts"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/account":{"delete":{"tags":["Accounts"],"summary":"Delete Account","operationId":"delete_account_api_v1_auth_account_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api-keys":{"get":{"tags":["API keys"],"summary":"Api Key List","operationId":"api_key_list_api_v1_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Api Key List Api V1 Api Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["API keys"],"summary":"Api Key Create","operationId":"api_key_create_api_v1_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Api Key Create Api V1 Api Keys Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api-keys/{key_id}":{"delete":{"tags":["API keys"],"summary":"Api Key Delete","operationId":"api_key_delete_api_v1_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/templates":{"get":{"tags":["Labels"],"summary":"List the 13 supported rectangular US Letter layouts","description":"Returns the authoritative template IDs, intended use, compatible physical stock numbers, sheet capacity, dimensions, and accepted aliases. Specialty round, oval, square, and card stock is not supported yet.","operationId":"templates_api_v1_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCatalogResponse"}}}}}}},"/api/v1/labels/import":{"post":{"tags":["Labels"],"summary":"Import labels from a spreadsheet, JSON, text, or text-based PDF","description":"Accepts CSV, XLSX, XLS, Numbers, JSON, plain text, and text-based PDFs. Every returned label includes an ID ready for rendering or project sync. Scanned PDFs require OCR before import.","operationId":"import_file_api_v1_labels_import_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template","in":"query","required":false,"schema":{"type":"string","description":"Label stock used to position text when importing a label-sheet PDF.","default":"avery-5160-30","title":"Template"},"description":"Label stock used to position text when importing a label-sheet PDF."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_file_api_v1_labels_import_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/labels/render":{"post":{"tags":["Labels"],"summary":"Render labels as a true-size print-ready PDF","description":"Places normalized labels into the selected verified stock geometry. start_slot supports partially used sheets; optional offsets correct printer alignment.","operationId":"render_api_v1_labels_render_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderRequest"}}},"required":true},"responses":{"200":{"description":"Print-ready label PDF","headers":{"Content-Disposition":{"schema":{"type":"string"}},"X-Labeloo-Label-Count":{"schema":{"type":"integer"}},"X-Labeloo-Page-Count":{"schema":{"type":"integer"}},"X-Labeloo-Warnings":{"schema":{"type":"string"}}},"content":{"application/pdf":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/projects":{"get":{"tags":["Cloud projects"],"summary":"Project List","operationId":"project_list_api_v1_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Project List Api V1 Projects Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Cloud projects"],"summary":"Project Create","operationId":"project_create_api_v1_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Project Create Api V1 Projects Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/projects/{project_id}":{"get":{"tags":["Cloud projects"],"summary":"Project Get","operationId":"project_get_api_v1_projects__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Project Get Api V1 Projects  Project Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Cloud projects"],"summary":"Project Sync","operationId":"project_sync_api_v1_projects__project_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSyncRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Project Sync Api V1 Projects  Project Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Cloud projects"],"summary":"Project Delete","operationId":"project_delete_api_v1_projects__project_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage":{"get":{"tags":["Usage"],"summary":"Usage","operationId":"usage_api_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Usage Api V1 Usage Get"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"ApiKeyRequest":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name","default":"Default"},"scopes":{"items":{"type":"string","enum":["labels:read","labels:write","projects:read","projects:write"]},"type":"array","title":"Scopes"}},"type":"object","title":"ApiKeyRequest"},"Body_import_file_api_v1_labels_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A CSV, spreadsheet, JSON, text, or text-based PDF label source."}},"type":"object","required":["file"],"title":"Body_import_file_api_v1_labels_import_post"},"DeleteAccountRequest":{"properties":{"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["password"],"title":"DeleteAccountRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImportResponse":{"properties":{"labels":{"items":{"$ref":"#/components/schemas/ImportedLabel"},"type":"array","title":"Labels"},"imported_count":{"type":"integer","minimum":1.0,"title":"Imported Count"},"skipped":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Skipped"}},"type":"object","required":["labels","imported_count"],"title":"ImportResponse"},"ImportedLabel":{"properties":{"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"type":{"type":"string","enum":["address","name","email","custom"],"title":"Type","default":"address"},"name":{"type":"string","maxLength":120,"title":"Name","default":""},"subtitle":{"type":"string","maxLength":120,"title":"Subtitle","default":""},"email":{"type":"string","maxLength":254,"title":"Email","default":""},"customText":{"type":"string","maxLength":600,"title":"Customtext","default":""},"address1":{"type":"string","maxLength":120,"title":"Address1","default":""},"address2":{"type":"string","maxLength":120,"title":"Address2","default":""},"city":{"type":"string","maxLength":80,"title":"City","default":""},"state":{"type":"string","maxLength":40,"title":"State","default":""},"postal":{"type":"string","maxLength":20,"title":"Postal","default":""},"country":{"type":"string","maxLength":80,"title":"Country","default":""},"align":{"type":"string","enum":["left","center"],"title":"Align","default":"left"},"fontSize":{"type":"number","maximum":14.0,"minimum":7.0,"title":"Fontsize","default":10},"lineHeight":{"type":"number","maximum":1.6,"minimum":1.0,"title":"Lineheight","default":1.15}},"additionalProperties":false,"type":"object","required":["id"],"title":"ImportedLabel"},"Label":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Id"},"type":{"type":"string","enum":["address","name","email","custom"],"title":"Type","default":"address"},"name":{"type":"string","maxLength":120,"title":"Name","default":""},"subtitle":{"type":"string","maxLength":120,"title":"Subtitle","default":""},"email":{"type":"string","maxLength":254,"title":"Email","default":""},"customText":{"type":"string","maxLength":600,"title":"Customtext","default":""},"address1":{"type":"string","maxLength":120,"title":"Address1","default":""},"address2":{"type":"string","maxLength":120,"title":"Address2","default":""},"city":{"type":"string","maxLength":80,"title":"City","default":""},"state":{"type":"string","maxLength":40,"title":"State","default":""},"postal":{"type":"string","maxLength":20,"title":"Postal","default":""},"country":{"type":"string","maxLength":80,"title":"Country","default":""},"align":{"type":"string","enum":["left","center"],"title":"Align","default":"left"},"fontSize":{"type":"number","maximum":14.0,"minimum":7.0,"title":"Fontsize","default":10},"lineHeight":{"type":"number","maximum":1.6,"minimum":1.0,"title":"Lineheight","default":1.15}},"additionalProperties":false,"type":"object","title":"Label"},"LoginRequest":{"properties":{"email":{"type":"string","maxLength":254,"minLength":5,"title":"Email"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"ProjectCreateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"workspace":{"$ref":"#/components/schemas/Workspace"}},"type":"object","required":["name","workspace"],"title":"ProjectCreateRequest"},"ProjectSyncRequest":{"properties":{"base_revision":{"type":"integer","minimum":0.0,"title":"Base Revision"},"workspace":{"$ref":"#/components/schemas/Workspace"}},"type":"object","required":["base_revision","workspace"],"title":"ProjectSyncRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","maxLength":254,"minLength":5,"title":"Email"},"password":{"type":"string","maxLength":128,"minLength":10,"title":"Password"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["email","password","name"],"title":"RegisterRequest"},"RenderRequest":{"properties":{"labels":{"items":{"$ref":"#/components/schemas/Label"},"type":"array","maxItems":1000,"minItems":1,"title":"Labels"},"template":{"type":"string","enum":["avery-5160-30","avery-5161-20","avery-5162-14","avery-5163-10","avery-5164-6","avery-5167-80","avery-5195-60","avery-5168-4","avery-5126-2","avery-5165-1","avery-5395-8","avery-5390-8","avery-5392-6"],"title":"Template","description":"Canonical layout ID returned by GET /api/v1/templates.","default":"avery-5160-30"},"start_slot":{"type":"integer","maximum":80.0,"minimum":1.0,"title":"Start Slot","default":1},"proof_grid":{"type":"boolean","title":"Proof Grid","default":false},"x_offset_inches":{"type":"number","maximum":0.25,"minimum":-0.25,"title":"X Offset Inches","default":0},"y_offset_inches":{"type":"number","maximum":0.25,"minimum":-0.25,"title":"Y Offset Inches","default":0},"filename":{"type":"string","maxLength":120,"title":"Filename","default":"labeloo-labels.pdf"}},"type":"object","required":["labels"],"title":"RenderRequest"},"Sheet":{"properties":{"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"name":{"type":"string","maxLength":60,"minLength":1,"title":"Name"},"defaultType":{"type":"string","enum":["address","name","email","custom"],"title":"Defaulttype","default":"address"},"templateId":{"type":"string","enum":["avery-5160-30","avery-5161-20","avery-5162-14","avery-5163-10","avery-5164-6","avery-5167-80","avery-5195-60","avery-5168-4","avery-5126-2","avery-5165-1","avery-5395-8","avery-5390-8","avery-5392-6"],"title":"Templateid","default":"avery-5160-30"},"startSlot":{"type":"integer","maximum":80.0,"minimum":1.0,"title":"Startslot","default":1},"activePage":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Activepage","default":0},"labels":{"items":{"$ref":"#/components/schemas/Label"},"type":"array","maxItems":2000,"title":"Labels"}},"additionalProperties":false,"type":"object","required":["id","name"],"title":"Sheet"},"TemplateCatalogResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TemplateSummary"},"type":"array","title":"Items","description":"The 13 currently supported rectangular US Letter layouts."}},"type":"object","required":["items"],"title":"TemplateCatalogResponse"},"TemplateSummary":{"properties":{"id":{"type":"string","title":"Id","description":"Canonical template ID accepted by import and render requests."},"name":{"type":"string","title":"Name","description":"Human-readable stock name and intended use."},"compatibility":{"type":"string","title":"Compatibility","description":"Physical stock numbers that use this verified geometry."},"category":{"type":"string","enum":["address","shipping","return_address","sheet","name_badge"],"title":"Category"},"shape":{"type":"string","const":"rectangle","title":"Shape","default":"rectangle"},"paper":{"type":"string","const":"US Letter","title":"Paper","default":"US Letter"},"columns":{"type":"integer","minimum":1.0,"title":"Columns","description":"Number of label columns on one sheet."},"rows":{"type":"integer","minimum":1.0,"title":"Rows","description":"Number of label rows on one sheet."},"labels_per_sheet":{"type":"integer","maximum":80.0,"minimum":1.0,"title":"Labels Per Sheet"},"label_width_inches":{"type":"number","exclusiveMinimum":0.0,"title":"Label Width Inches"},"label_height_inches":{"type":"number","exclusiveMinimum":0.0,"title":"Label Height Inches"},"left_margin_inches":{"type":"number","minimum":0.0,"title":"Left Margin Inches"},"top_margin_inches":{"type":"number","minimum":0.0,"title":"Top Margin Inches"},"horizontal_pitch_inches":{"type":"number","exclusiveMinimum":0.0,"title":"Horizontal Pitch Inches"},"vertical_pitch_inches":{"type":"number","exclusiveMinimum":0.0,"title":"Vertical Pitch Inches"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases","description":"Alternative API IDs accepted for this geometry."}},"type":"object","required":["id","name","compatibility","category","columns","rows","labels_per_sheet","label_width_inches","label_height_inches","left_margin_inches","top_margin_inches","horizontal_pitch_inches","vertical_pitch_inches","aliases"],"title":"TemplateSummary"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Workspace":{"properties":{"version":{"type":"integer","const":2,"title":"Version","default":2},"clientId":{"type":"string","maxLength":80,"minLength":8,"title":"Clientid"},"projectName":{"type":"string","maxLength":80,"minLength":1,"title":"Projectname","default":"My label collection"},"zoom":{"type":"integer","maximum":115.0,"minimum":65.0,"title":"Zoom","default":86},"activeSheetId":{"type":"string","maxLength":80,"minLength":1,"title":"Activesheetid"},"selectedId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Selectedid"},"sheets":{"items":{"$ref":"#/components/schemas/Sheet"},"type":"array","maxItems":100,"minItems":1,"title":"Sheets"}},"additionalProperties":false,"type":"object","required":["clientId","activeSheetId","sheets"],"title":"Workspace"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"Labeloo session token or scoped API key","scheme":"bearer"}}},"servers":[{"url":"/labeloo/api"}]}