{"openapi":"3.1.0","info":{"title":"BusinessOS API","version":"1.0.0","description":"API REST officielle BusinessOS — accès programmatique complet au workspace (clients, projets, tâches, modèles, SOP, calendrier, équipe, fichiers).\n\n**Authentification** : en-tête `Authorization: Bearer bos_mcp_<clé>` (clé générée dans l'app → Réglages → MCP / API).\n\n**Base URL** : `{APP_URL}/api/v1`\n\n> Certaines routes peuvent être en cours de déploiement. La spec OpenAPI est la source de vérité du contrat cible.","contact":{"name":"BusinessOS","url":"https://the-businessos.ai","email":"hello@the-businessos.ai"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://app.the-businessos.ai/api/v1","description":"Production"},{"url":"http://localhost:3000/api/v1","description":"Local (app web)"}],"tags":[{"name":"Workspace","description":"Profil, workspace, statistiques"},{"name":"Clients","description":"CRM clients"},{"name":"Projects","description":"Projets / prestations"},{"name":"Tasks","description":"Tâches et exécution"},{"name":"Templates","description":"Modèles de prestation et librairie"},{"name":"SOP","description":"Procédures et playbooks"},{"name":"Calendar","description":"Agenda et événements"},{"name":"Calls","description":"Appels et transcripts"},{"name":"Team","description":"Membres et invitations"},{"name":"Files","description":"Uploads (Storage signé)"},{"name":"Import","description":"Import CSV / Airtable"}],"paths":{"/clients":{"get":{"tags":["Clients"],"summary":"Lister clients","operationId":"listClients","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pagination curseur"}],"responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Client"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Clients"],"summary":"Créer client","operationId":"createClient","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Client"}}}}}},"400":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/clients/{clientId}":{"get":{"tags":["Clients"],"summary":"Détail client","operationId":"getClient","parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Client"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Clients"],"summary":"Modifier client","operationId":"updateClient","parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Client"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Clients"],"summary":"Supprimer client","operationId":"deleteClient","parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Supprimé"},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/projects":{"get":{"tags":["Projects"],"summary":"Lister projects","operationId":"listProjects","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pagination curseur"}],"responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Projects"],"summary":"Créer project","operationId":"createProject","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/projects/{projectId}":{"get":{"tags":["Projects"],"summary":"Détail project","operationId":"getProject","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Project"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Projects"],"summary":"Modifier project","operationId":"updateProject","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Project"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Projects"],"summary":"Supprimer project","operationId":"deleteProject","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Supprimé"},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tasks":{"get":{"tags":["Tasks"],"summary":"Lister tasks","operationId":"listTasks","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pagination curseur"}],"responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Tasks"],"summary":"Créer task","operationId":"createTask","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Task"}}}}}},"400":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tasks/{taskId}":{"get":{"tags":["Tasks"],"summary":"Détail task","operationId":"getTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Task"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Tasks"],"summary":"Modifier task","operationId":"updateTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Task"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Tasks"],"summary":"Supprimer task","operationId":"deleteTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Supprimé"},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/sops":{"get":{"tags":["SOP"],"summary":"Lister sops","operationId":"listSops","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pagination curseur"}],"responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sop"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["SOP"],"summary":"Créer sop","operationId":"createSop","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SopCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sop"}}}}}},"400":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/sops/{sopId}":{"get":{"tags":["SOP"],"summary":"Détail sop","operationId":"getSop","parameters":[{"name":"sopId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sop"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["SOP"],"summary":"Modifier sop","operationId":"updateSop","parameters":[{"name":"sopId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SopUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sop"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["SOP"],"summary":"Supprimer sop","operationId":"deleteSop","parameters":[{"name":"sopId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Supprimé"},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/me":{"get":{"tags":["Workspace"],"summary":"Profil utilisateur connecté","operationId":"getMyProfile","responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Profile"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Workspace"],"summary":"Modifier mon profil","operationId":"updateMyProfile","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Profile"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/workspace":{"get":{"tags":["Workspace"],"summary":"Workspace actif","operationId":"getWorkspace","responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Workspace"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Workspace"],"summary":"Modifier le workspace","operationId":"updateWorkspace","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Workspace"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/workspace/summary":{"get":{"tags":["Workspace"],"summary":"Statistiques dashboard","operationId":"getWorkspaceSummary","responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WorkspaceSummary"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/projects/from-template":{"post":{"tags":["Projects"],"summary":"Créer un projet depuis un modèle","operationId":"createProjectFromTemplate","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFromTemplate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/projects/{projectId}/status":{"patch":{"tags":["Projects"],"summary":"Changer le statut d'un projet","operationId":"updateProjectStatus","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectStatusUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Project"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tasks/{taskId}/assign":{"post":{"tags":["Tasks"],"summary":"Assigner une tâche","operationId":"assignTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAssign"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Task"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates":{"get":{"tags":["Templates"],"summary":"Modèles de prestation du workspace","operationId":"listTemplates","responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ServiceTemplate"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Templates"],"summary":"Créer un modèle vierge","operationId":"createServiceTemplate","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceTemplateCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ServiceTemplate"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates/{templateId}":{"get":{"tags":["Templates"],"summary":"Détail modèle + étapes","operationId":"getTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ServiceTemplateDetail"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Templates"],"summary":"Modifier un modèle","operationId":"updateServiceTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceTemplateUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ServiceTemplate"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Templates"],"summary":"Supprimer un modèle","operationId":"deleteServiceTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Supprimé"},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates/library":{"get":{"tags":["Templates"],"summary":"Catalogue librairie (packs agence)","operationId":"listTemplateLibrary","parameters":[{"name":"businessType","in":"query","schema":{"type":"string","enum":["agency","coaching","consulting"]}}],"responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TemplateLibraryPack"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates/library/import":{"post":{"tags":["Templates"],"summary":"Importer un pack librairie dans le workspace","operationId":"importTemplateFromLibrary","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateLibraryImport"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ServiceTemplateDetail"}}}}}},"400":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates/{templateId}/steps":{"get":{"tags":["Templates"],"summary":"Étapes d'un modèle","operationId":"listTemplateSteps","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TaskTemplateStep"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Templates"],"summary":"Ajouter une étape","operationId":"createTemplateStep","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateStepCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/TaskTemplateStep"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates/{templateId}/steps/reorder":{"post":{"tags":["Templates"],"summary":"Réordonner les étapes","operationId":"reorderTemplateSteps","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateStepsReorder"}}}},"responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TaskTemplateStep"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates/{templateId}/steps/{stepId}":{"patch":{"tags":["Templates"],"summary":"Modifier une étape","operationId":"updateTemplateStep","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateStepUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/TaskTemplateStep"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Templates"],"summary":"Supprimer une étape","operationId":"deleteTemplateStep","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Supprimé"},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/sops/library/import":{"post":{"tags":["SOP"],"summary":"Importer un SOP depuis la librairie","operationId":"importSopFromLibrary","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SopLibraryImport"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sop"}}}}}},"400":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/calendar/sources":{"get":{"tags":["Calendar"],"summary":"Calendriers disponibles","operationId":"listCalendarSources","responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CalendarSource"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/calendar/events":{"get":{"tags":["Calendar"],"summary":"Lister les événements","operationId":"listCalendarEvents","parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"calendarId","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEvent"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Calendar"],"summary":"Créer un événement","operationId":"createCalendarEvent","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CalendarEvent"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/calendar/events/{eventId}":{"get":{"tags":["Calendar"],"summary":"Détail événement","operationId":"getCalendarEvent","parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CalendarEvent"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Calendar"],"summary":"Modifier un événement","operationId":"updateCalendarEvent","parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CalendarEvent"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Calendar"],"summary":"Supprimer un événement","operationId":"deleteCalendarEvent","parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Supprimé"},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/calls":{"get":{"tags":["Calls"],"summary":"Lister les appels","operationId":"listCalls","parameters":[{"name":"filter","in":"query","schema":{"type":"string","enum":["all","fathom","visio","manual"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Call"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Calls"],"summary":"Créer un appel manuel","operationId":"createCall","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Call"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/calls/{callId}":{"get":{"tags":["Calls"],"summary":"Détail appel","operationId":"getCall","parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CallDetail"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Calls"],"summary":"Modifier un appel","operationId":"updateCall","parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Call"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/members":{"get":{"tags":["Team"],"summary":"Membres de l'équipe","operationId":"listMembers","responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/members/{memberId}":{"get":{"tags":["Team"],"summary":"Fiche membre","operationId":"getMember","parameters":[{"name":"memberId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Member"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Team"],"summary":"Révoquer un membre","operationId":"revokeMember","parameters":[{"name":"memberId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Révoqué"},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/members/{memberId}/role":{"patch":{"tags":["Team"],"summary":"Changer le rôle d'un membre","operationId":"updateMemberRole","parameters":[{"name":"memberId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRoleUpdate"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Member"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/invites":{"get":{"tags":["Team"],"summary":"Invitations en attente","operationId":"listInvites","responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invite"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Team"],"summary":"Inviter un membre","operationId":"createInvite","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Invite"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/invites/{inviteId}":{"delete":{"tags":["Team"],"summary":"Révoquer une invitation","operationId":"revokeInvite","parameters":[{"name":"inviteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Révoquée"},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/files/upload-url":{"post":{"tags":["Files"],"summary":"Obtenir une URL signée d'upload","operationId":"createUploadUrl","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlRequest"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/UploadUrlResponse"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/import/jobs":{"get":{"tags":["Import"],"summary":"Jobs d'import","operationId":"listImportJobs","responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ImportJob"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Import"],"summary":"Créer un job d'import (CSV / Airtable)","operationId":"createImportJob","requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportJobCreate"}}}},"responses":{"201":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ImportJob"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/import/jobs/{jobId}":{"get":{"tags":["Import"],"summary":"Détail job d'import","operationId":"getImportJob","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ImportJob"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/import/jobs/{jobId}/commit":{"post":{"tags":["Import"],"summary":"Valider et committer un import","operationId":"commitImportJob","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Corps JSON","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportJobCommit"}}}},"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ImportJobResult"}}}}}},"401":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Erreur","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Clé API workspace (`bos_mcp_…`) — Réglages → MCP dans l'app BusinessOS."}},"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"unauthorized"},"message":{"type":"string","example":"Clé API invalide ou révoquée."},"details":{"type":"object","additionalProperties":true}}}}},"ListMeta":{"type":"object","properties":{"total":{"type":"integer"},"nextCursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}},"Profile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"fullName":{"type":"string","nullable":true},"avatarUrl":{"type":"string","format":"uri","nullable":true},"role":{"type":"string","enum":["admin","member"]}}},"ProfileUpdate":{"type":"object","properties":{"fullName":{"type":"string"},"avatarUrl":{"type":"string","format":"uri","nullable":true}}},"Workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"businessType":{"type":"string","enum":["agency","coaching","consulting"]},"logoUrl":{"type":"string","format":"uri","nullable":true}}},"WorkspaceUpdate":{"type":"object","properties":{"name":{"type":"string"},"logoUrl":{"type":"string","format":"uri","nullable":true}}},"WorkspaceSummary":{"type":"object","properties":{"activeClients":{"type":"integer"},"activeProjects":{"type":"integer"},"openTasks":{"type":"integer"},"overdueTasks":{"type":"integer"},"templateCount":{"type":"integer"}}},"Client":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"ClientCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":2},"email":{"type":"string","format":"email"},"phone":{"type":"string"}}},"ClientUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":2},"email":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"contact":{"type":"string","nullable":true}}},"Project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","pending_validation","completed","archived"]},"clientId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"assigneeId":{"type":"string","format":"uuid","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true}}},"ProjectCreate":{"type":"object","required":["name","clientId"],"properties":{"name":{"type":"string","minLength":2},"clientId":{"type":"string","format":"uuid"}}},"ProjectUpdate":{"type":"object","properties":{"name":{"type":"string"},"assigneeId":{"type":"string","format":"uuid","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"endDate":{"type":"string","format":"date","nullable":true}}},"ProjectFromTemplate":{"type":"object","required":["clientId","templateId","name"],"properties":{"clientId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":2},"assigneeId":{"type":"string","format":"uuid"}}},"ProjectStatusUpdate":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["active","pending_validation","completed","archived"]}}},"Task":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["todo","doing","done"]},"clientId":{"type":"string","format":"uuid","nullable":true},"projectId":{"type":"string","format":"uuid","nullable":true},"assigneeId":{"type":"string","format":"uuid","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true},"sortOrder":{"type":"integer"}}},"TaskCreate":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1},"clientId":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"assigneeId":{"type":"string","format":"uuid"},"dueDate":{"type":"string","format":"date"},"description":{"type":"string"}}},"TaskUpdate":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["todo","doing","done"]},"dueDate":{"type":"string","format":"date","nullable":true},"assigneeId":{"type":"string","format":"uuid","nullable":true},"projectId":{"type":"string","format":"uuid","nullable":true},"clientId":{"type":"string","format":"uuid","nullable":true}}},"TaskAssign":{"type":"object","required":["assigneeId"],"properties":{"assigneeId":{"type":"string","format":"uuid"}}},"ServiceTemplate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"taskCount":{"type":"integer"}}},"ServiceTemplateDetail":{"allOf":[{"$ref":"#/components/schemas/ServiceTemplate"},{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/TaskTemplateStep"}},"librarySlug":{"type":"string","nullable":true},"libraryVersion":{"type":"string","nullable":true}}}]},"ServiceTemplateCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":2},"description":{"type":"string"},"category":{"type":"string"}}},"ServiceTemplateUpdate":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","nullable":true}}},"TaskTemplateStep":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"kind":{"type":"string","enum":["standard","call","payment","form","delivery","approval"]},"sortOrder":{"type":"integer"},"durationDays":{"type":"integer","nullable":true},"estimatedMinutes":{"type":"integer","nullable":true},"config":{"type":"object","additionalProperties":true}}},"TaskTemplateStepCreate":{"type":"object","required":["title","kind"],"properties":{"title":{"type":"string"},"kind":{"type":"string","enum":["standard","call","payment","form","delivery","approval"]},"durationDays":{"type":"integer"},"estimatedMinutes":{"type":"integer"},"config":{"type":"object"}}},"TaskTemplateStepUpdate":{"type":"object","properties":{"title":{"type":"string"},"kind":{"type":"string","enum":["standard","call","payment","form","delivery","approval"]},"durationDays":{"type":"integer","nullable":true},"estimatedMinutes":{"type":"integer","nullable":true},"config":{"type":"object"}}},"TemplateStepsReorder":{"type":"object","required":["orderedStepIds"],"properties":{"orderedStepIds":{"type":"array","items":{"type":"string","format":"uuid"}}}},"TemplateLibraryPack":{"type":"object","properties":{"slug":{"type":"string","example":"agency/landing-page"},"version":{"type":"string","example":"1.0.0"},"name":{"type":"string"},"category":{"type":"string"},"businessType":{"type":"string","enum":["agency","coaching","consulting"]},"stepCount":{"type":"integer"}}},"TemplateLibraryImport":{"type":"object","required":["slug","version"],"properties":{"slug":{"type":"string"},"version":{"type":"string"},"forceReimport":{"type":"boolean","default":false}}},"Sop":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"summary":{"type":"string"},"category":{"type":"string"},"url":{"type":"string","format":"uri","nullable":true}}},"SopCreate":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"howToUse":{"type":"string"},"url":{"type":"string"},"category":{"type":"string","enum":["delivery","onboarding","sales","communication","ops"]},"sourceSopId":{"type":"string","format":"uuid"}}},"SopUpdate":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"howToUse":{"type":"string"},"url":{"type":"string","nullable":true},"category":{"type":"string","enum":["delivery","onboarding","sales","communication","ops"]}}},"SopLibraryImport":{"type":"object","required":["slug","version"],"properties":{"slug":{"type":"string"},"version":{"type":"string"}}},"CalendarSource":{"type":"object","properties":{"calendarId":{"type":"string"},"name":{"type":"string"},"primary":{"type":"boolean"}}},"CalendarEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"calendarId":{"type":"string"},"title":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"eventType":{"type":"string","enum":["task","meeting","call","focus","deadline","other"]},"meetingUrl":{"type":"string","format":"uri","nullable":true}}},"CalendarEventCreate":{"type":"object","required":["calendarId","title","start","end"],"properties":{"calendarId":{"type":"string"},"title":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"eventType":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"meetingUrl":{"type":"string"},"taskId":{"type":"string","format":"uuid"}}},"CalendarEventUpdate":{"type":"object","properties":{"title":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"description":{"type":"string"},"location":{"type":"string"},"meetingUrl":{"type":"string","nullable":true}}},"Call":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time","nullable":true},"source":{"type":"string"},"clientId":{"type":"string","format":"uuid","nullable":true},"taskId":{"type":"string","format":"uuid","nullable":true}}},"CallDetail":{"allOf":[{"$ref":"#/components/schemas/Call"},{"type":"object","properties":{"summary":{"type":"string","nullable":true},"transcript":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}}}]},"CallCreate":{"type":"object","required":["title","startedAt"],"properties":{"title":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"meetingUrl":{"type":"string"},"notes":{"type":"string"},"clientId":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"}}},"CallUpdate":{"type":"object","properties":{"title":{"type":"string"},"clientId":{"type":"string","format":"uuid","nullable":true},"taskId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true}}},"Member":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"fullName":{"type":"string","nullable":true},"role":{"type":"string","enum":["admin","member"]}}},"MemberRoleUpdate":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["admin","member"]}}},"Invite":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["admin","member"]},"createdAt":{"type":"string","format":"date-time"}}},"InviteCreate":{"type":"object","required":["email","role"],"properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["admin","member"]}}},"UploadUrlRequest":{"type":"object","required":["purpose","contentType"],"properties":{"purpose":{"type":"string","enum":["avatar","workspace_logo","task_attachment"]},"contentType":{"type":"string","example":"image/png"},"fileName":{"type":"string"}}},"UploadUrlResponse":{"type":"object","properties":{"uploadUrl":{"type":"string","format":"uri"},"publicUrl":{"type":"string","format":"uri"},"path":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}},"ImportJob":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["csv","airtable"]},"status":{"type":"string","enum":["draft","preview","committed","failed"]},"rowCount":{"type":"integer"}}},"ImportJobCreate":{"type":"object","required":["source"],"properties":{"source":{"type":"string","enum":["csv","airtable"]},"airtableBaseId":{"type":"string"},"airtableTableId":{"type":"string"}}},"ImportJobCommit":{"type":"object","properties":{"mapping":{"type":"object","additionalProperties":true},"templateChoice":{"type":"object","additionalProperties":true}}},"ImportJobResult":{"type":"object","properties":{"clientsCreated":{"type":"integer"},"projectsCreated":{"type":"integer"}}}}},"security":[{"bearerAuth":[]}]}