{"openapi":"3.1.0","info":{"title":"Nochalk API","version":"2026-05-01","description":"Public API surface for Nochalk coach workspaces and developer integrations."},"servers":[{"url":"https://api.nochalk.ai","description":"Production"},{"url":"https://staging-api.nochalk.ai","description":"Staging"},{"url":"http://localhost:3011","description":"Local development"}],"tags":[{"name":"Contacts","description":"Coach CRM contacts."},{"name":"Sessions","description":"Coach session types and scheduling inventory."},{"name":"Scheduling","description":"Coach availability windows and bookings."},{"name":"Monetization","description":"Coach packages, payments, invoices, and revenue."},{"name":"Forms","description":"Coach form templates, submissions, and session links."},{"name":"Contracts","description":"Coach contract templates, requirements, and sent contracts."},{"name":"Goals","description":"Client goals, milestones, and progress."},{"name":"Messaging","description":"Coach-client conversations, messages, broadcasts, unread state, and AI reply drafts."},{"name":"Automations","description":"Coach automation templates and Coach Plus advanced sequences."},{"name":"Analytics","description":"Coach analytics and Coach Plus growth recommendations."},{"name":"Pricing Lab","description":"Pricing simulations, snapshots, and recommendations."},{"name":"Programs","description":"Coach Plus programs, cohorts, modules, assignments, and check-ins."},{"name":"Support","description":"Coach Plus priority support and guided setup requests."},{"name":"Notifications","description":"Coach notifications, read state, preferences, and browser transports."},{"name":"Feedback","description":"Feature request capture and product feedback configuration."},{"name":"Developer Access","description":"Personal access tokens, setup sessions, audit log, and webhooks."},{"name":"Documentation","description":"OpenAPI and Swagger UI endpoints."}],"security":[{"bearerAuth":[]}],"paths":{"/api/v1/crm/contacts/roster":{"get":{"operationId":"listContactRoster","tags":["Contacts"],"summary":"List the contact roster","responses":{"200":{"description":"Contact roster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRosterResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Search first name, last name, or email."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["lead","active","inactive","archived"]},"description":"Filter by contact status."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Contacts per page."}]}},"/api/v1/crm/contacts":{"get":{"operationId":"listContacts","tags":["Contacts"],"summary":"List contacts","responses":{"200":{"description":"Contacts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Search first name, last name, or email."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["lead","active","inactive","archived"]},"description":"Filter by contact status."}]},"post":{"operationId":"createContact","tags":["Contacts"],"summary":"Create a contact","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactInput"}}}},"responses":{"201":{"description":"Created contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"bulkDeleteContacts","tags":["Contacts"],"summary":"Bulk delete contacts","description":"PAT callers must include `X-Confirm-Destructive: true`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteContactsInput"}}}},"responses":{"200":{"description":"Deleted contacts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteContactsResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/crm/contacts/{id}":{"get":{"operationId":"getContact","tags":["Contacts"],"summary":"Get a contact","responses":{"200":{"description":"Contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"put":{"operationId":"updateContact","tags":["Contacts"],"summary":"Update a contact","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactInput"}}}},"responses":{"200":{"description":"Updated contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"deleteContact","tags":["Contacts"],"summary":"Delete a contact","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Deleted contact","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/crm/contacts/{contactId}/notes":{"get":{"operationId":"listContactNotes","tags":["Contacts"],"summary":"List contact notes","responses":{"200":{"description":"Contact notes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactNote"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"operationId":"createContactNote","tags":["Contacts"],"summary":"Create a contact note","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactNoteInput"}}}},"responses":{"201":{"description":"Created contact note","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactNote"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/crm/contacts/{contactId}/interactions":{"get":{"operationId":"listContactInteractions","tags":["Contacts"],"summary":"List contact interactions","responses":{"200":{"description":"Contact interactions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactInteraction"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"operationId":"createContactInteraction","tags":["Contacts"],"summary":"Create a contact interaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactInteractionInput"}}}},"responses":{"201":{"description":"Created contact interaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInteraction"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/crm/contacts/{contactId}/appointments":{"get":{"operationId":"listContactAppointments","tags":["Contacts"],"summary":"List contact appointments","responses":{"200":{"description":"Contact appointments","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactAppointment"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/scheduling/sessions":{"get":{"operationId":"listSessions","tags":["Sessions"],"summary":"List session types","responses":{"200":{"description":"Session types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Session"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createSession","tags":["Sessions"],"summary":"Create a session type","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionInput"}}}},"responses":{"201":{"description":"Created session type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/scheduling/sessions/{id}":{"get":{"operationId":"getSession","tags":["Sessions"],"summary":"Get a session type","responses":{"200":{"description":"Session type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"put":{"operationId":"updateSession","tags":["Sessions"],"summary":"Update a session type","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSessionInput"}}}},"responses":{"200":{"description":"Updated session type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"deleteSession","tags":["Sessions"],"summary":"Delete a session type","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Deleted session type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/scheduling/availability":{"get":{"operationId":"listAvailability","tags":["Scheduling"],"summary":"List availability windows","responses":{"200":{"description":"Availability windows","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Availability"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createAvailability","tags":["Scheduling"],"summary":"Create an availability window","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityInput"}}}},"responses":{"201":{"description":"Created availability window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Availability"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/scheduling/availability/{id}":{"delete":{"operationId":"deleteAvailability","tags":["Scheduling"],"summary":"Delete an availability window","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Deleted availability window","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/scheduling/bookings":{"get":{"operationId":"listBookings","tags":["Scheduling"],"summary":"List bookings","responses":{"200":{"description":"Bookings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Include bookings starting on or after this timestamp."},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Include bookings starting before this timestamp."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","confirmed","cancelled","completed","no_show"]},"description":"Filter by booking status."}]},"post":{"operationId":"createBooking","tags":["Scheduling"],"summary":"Create a booking","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookingInput"}}}},"responses":{"201":{"description":"Created booking","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookingResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/scheduling/bookings/{id}":{"get":{"operationId":"getBooking","tags":["Scheduling"],"summary":"Get a booking","responses":{"200":{"description":"Booking","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/scheduling/bookings/{id}/reschedule-options":{"get":{"operationId":"getBookingRescheduleOptions","tags":["Scheduling"],"summary":"Get booking reschedule options","responses":{"200":{"description":"Booking reschedule options","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingRescheduleOptions"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"date","in":"query","required":true,"description":"Date to inspect in YYYY-MM-DD format.","schema":{"type":"string","format":"date"}}]}},"/api/v1/scheduling/bookings/{id}/reschedule":{"put":{"operationId":"rescheduleBooking","tags":["Scheduling"],"summary":"Reschedule a booking","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBookingScheduleInput"}}}},"responses":{"200":{"description":"Rescheduled booking","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/packages":{"get":{"operationId":"listPackages","tags":["Monetization"],"summary":"List coaching packages","responses":{"200":{"description":"Coaching packages","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CoachingPackage"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createPackage","tags":["Monetization"],"summary":"Create a coaching package","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackageInput"}}}},"responses":{"201":{"description":"Created coaching package","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachingPackage"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/packages/{id}":{"put":{"operationId":"updatePackage","tags":["Monetization"],"summary":"Update a coaching package","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePackageInput"}}}},"responses":{"200":{"description":"Updated coaching package","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachingPackage"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"archivePackage","tags":["Monetization"],"summary":"Archive a coaching package","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Archived coaching package","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/packages/subscription-plans":{"get":{"operationId":"listSubscriptionPlans","tags":["Monetization"],"summary":"List subscription plans","responses":{"200":{"description":"Subscription plans","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPlan"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createSubscriptionPlan","tags":["Monetization"],"summary":"Create a subscription plan","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionPlanInput"}}}},"responses":{"201":{"description":"Created subscription plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlan"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/packages/subscription-plans/{id}":{"put":{"operationId":"updateSubscriptionPlan","tags":["Monetization"],"summary":"Update a subscription plan","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionPlanInput"}}}},"responses":{"200":{"description":"Updated subscription plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlan"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"archiveSubscriptionPlan","tags":["Monetization"],"summary":"Archive a subscription plan","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Archived subscription plan","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/packages/purchases":{"get":{"operationId":"listPackagePurchases","tags":["Monetization"],"summary":"List package purchases and managed subscriptions","responses":{"200":{"description":"Package purchases and managed subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagePurchasesResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/packages/purchases/{contactId}":{"get":{"operationId":"listContactPackagePurchases","tags":["Monetization"],"summary":"List package purchases and managed subscriptions for one contact","responses":{"200":{"description":"Contact package purchases and managed subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagePurchasesResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/payments/connect/status":{"get":{"operationId":"getStripeConnectStatus","tags":["Monetization"],"summary":"Get Stripe Connect status","responses":{"200":{"description":"Stripe Connect status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeConnectStatus"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/payments/transactions":{"get":{"operationId":"listTransactions","tags":["Monetization"],"summary":"List payment transactions","responses":{"200":{"description":"Payment transactions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/payments/revenue-stats":{"get":{"operationId":"getRevenueStats","tags":["Monetization"],"summary":"Get revenue statistics","responses":{"200":{"description":"Revenue statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueStats"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/payments/subscriptions":{"get":{"operationId":"listPaymentSubscriptions","tags":["Monetization"],"summary":"List payment subscriptions","responses":{"200":{"description":"Payment subscriptions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ManagedSubscription"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/payments/subscriptions/{id}":{"delete":{"operationId":"cancelPaymentSubscription","tags":["Monetization"],"summary":"Cancel a payment subscription","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Cancelled payment subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedSubscription"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/payments/invoices":{"get":{"operationId":"listInvoices","tags":["Monetization"],"summary":"List invoices","responses":{"200":{"description":"Invoices","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createInvoice","tags":["Monetization"],"summary":"Create an invoice","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceInput"}}}},"responses":{"201":{"description":"Created invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/payments/invoices/{id}":{"put":{"operationId":"updateInvoiceStatus","tags":["Monetization"],"summary":"Update invoice status","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceStatusInput"}}}},"responses":{"200":{"description":"Updated invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/payments/invoices/{id}/send":{"post":{"operationId":"sendInvoice","tags":["Monetization"],"summary":"Send an invoice","description":"Sends an invoice email to the contact and marks the invoice as sent.","responses":{"200":{"description":"Sent invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/payments/products":{"get":{"operationId":"listPaymentProducts","tags":["Monetization"],"summary":"List Stripe products","responses":{"200":{"description":"Stripe products","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeProductListResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createPaymentProduct","tags":["Monetization"],"summary":"Create or update a payment product for a session type","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentProductInput"}}}},"responses":{"201":{"description":"Created payment product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProductResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/payments/payment-links":{"post":{"operationId":"createPaymentLink","tags":["Monetization"],"summary":"Create a Stripe payment link","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentLinkInput"}}}},"responses":{"201":{"description":"Created payment link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/forms/templates":{"get":{"operationId":"listFormTemplates","tags":["Forms"],"summary":"List form templates","responses":{"200":{"description":"Form templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Form"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/forms/templates/starter/{starterKey}":{"post":{"operationId":"createStarterFormTemplate","tags":["Forms"],"summary":"Create a starter form template","responses":{"201":{"description":"Created starter form template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"starterKey","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/forms/templates/{id}/duplicate":{"post":{"operationId":"duplicateFormTemplate","tags":["Forms"],"summary":"Duplicate a form or template","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateFormInput"}}}},"responses":{"201":{"description":"Duplicated form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/forms":{"get":{"operationId":"listForms","tags":["Forms"],"summary":"List forms","responses":{"200":{"description":"Forms","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Form"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createForm","tags":["Forms"],"summary":"Create a form","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFormInput"}}}},"responses":{"201":{"description":"Created form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/forms/submissions":{"get":{"operationId":"listFormSubmissions","tags":["Forms"],"summary":"List recent form submissions","responses":{"200":{"description":"Form submissions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmission"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/forms/{id}":{"get":{"operationId":"getForm","tags":["Forms"],"summary":"Get a form","responses":{"200":{"description":"Form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"put":{"operationId":"updateForm","tags":["Forms"],"summary":"Update a form","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormInput"}}}},"responses":{"200":{"description":"Updated form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"deleteForm","tags":["Forms"],"summary":"Delete a form","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Deleted form","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/forms/{id}/submissions":{"get":{"operationId":"listFormSubmissionsForForm","tags":["Forms"],"summary":"List submissions for a form","responses":{"200":{"description":"Form submissions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmission"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/forms/submissions/{submissionId}":{"get":{"operationId":"getFormSubmission","tags":["Forms"],"summary":"Get a form submission","responses":{"200":{"description":"Form submission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/forms/contact/{contactId}/submissions":{"get":{"operationId":"listContactFormSubmissions","tags":["Forms"],"summary":"List form submissions for a contact","responses":{"200":{"description":"Contact form submissions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmission"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/forms/contact/{contactId}/instances":{"get":{"operationId":"listContactFormInstances","tags":["Forms"],"summary":"List form instances for a contact","responses":{"200":{"description":"Contact form instances","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormInstance"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/forms/instances":{"post":{"operationId":"sendFormInstance","tags":["Forms"],"summary":"Send a form instance to a contact","description":"Creates a public form link and sends it by email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFormInstanceInput"}}}},"responses":{"201":{"description":"Sent form instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormInstance"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/forms/instances/{instanceId}/resend":{"post":{"operationId":"resendFormInstance","tags":["Forms"],"summary":"Resend a form instance","description":"Sends another form email for a pending form instance.","responses":{"200":{"description":"Resent form instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormInstance"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"instanceId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/forms/{id}/link-session":{"post":{"operationId":"linkFormSession","tags":["Forms"],"summary":"Link a form to a session type","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkFormSessionInput"}}}},"responses":{"201":{"description":"Linked form session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSessionLink"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/forms/{id}/unlink-session/{sessionId}":{"delete":{"operationId":"unlinkFormSession","tags":["Forms"],"summary":"Unlink a form from a session type","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Unlinked form session","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/contracts/templates":{"get":{"operationId":"listContractTemplates","tags":["Contracts"],"summary":"List contract templates","responses":{"200":{"description":"Contract templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContractTemplate"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createContractTemplate","tags":["Contracts"],"summary":"Create a contract template","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContractTemplateInput"}}}},"responses":{"201":{"description":"Created contract template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTemplate"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/contracts/templates/{id}":{"get":{"operationId":"getContractTemplate","tags":["Contracts"],"summary":"Get a contract template","responses":{"200":{"description":"Contract template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTemplate"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"put":{"operationId":"updateContractTemplate","tags":["Contracts"],"summary":"Update a contract template","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContractTemplateInput"}}}},"responses":{"200":{"description":"Updated contract template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTemplate"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"deleteContractTemplate","tags":["Contracts"],"summary":"Delete a contract template","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Deleted contract template","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/contracts/session-links":{"get":{"operationId":"listContractSessionLinks","tags":["Contracts"],"summary":"List contract requirements by session type","responses":{"200":{"description":"Contract session links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContractSessionLink"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/contracts/session-links/{sessionId}":{"put":{"operationId":"replaceContractSessionLinks","tags":["Contracts"],"summary":"Replace contract requirements for a session type","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceContractSessionLinksInput"}}}},"responses":{"200":{"description":"Contract session links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContractSessionLink"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/contracts/contacts/{contactId}/contracts":{"get":{"operationId":"listContactContracts","tags":["Contracts"],"summary":"List contracts for a contact","responses":{"200":{"description":"Contact contracts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contract"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"operationId":"sendContactContract","tags":["Contracts"],"summary":"Create and send a contract to a contact","description":"Creates a contract from a template and sends it by email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContractInput"}}}},"responses":{"201":{"description":"Created and sent contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contract"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/contracts/{id}":{"get":{"operationId":"getContract","tags":["Contracts"],"summary":"Get a contract","responses":{"200":{"description":"Contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contract"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/contracts/{id}/send":{"post":{"operationId":"sendContract","tags":["Contracts"],"summary":"Send a draft contract","description":"Sends a contract email to the contact.","responses":{"200":{"description":"Sent contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contract"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/goals":{"get":{"operationId":"listGoals","tags":["Goals"],"summary":"List goals for a contact","responses":{"200":{"description":"Goals","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Goal"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"query","required":true,"description":"Contact ID whose goals should be listed.","schema":{"type":"string","format":"uuid"}}]},"post":{"operationId":"createGoal","tags":["Goals"],"summary":"Create a goal","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGoalInput"}}}},"responses":{"201":{"description":"Created goal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/goals/{id}":{"get":{"operationId":"getGoal","tags":["Goals"],"summary":"Get a goal","responses":{"200":{"description":"Goal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"put":{"operationId":"updateGoal","tags":["Goals"],"summary":"Update a goal","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGoalInput"}}}},"responses":{"200":{"description":"Updated goal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"deleteGoal","tags":["Goals"],"summary":"Delete a goal","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Deleted goal","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/goals/{id}/milestones":{"post":{"operationId":"createGoalMilestone","tags":["Goals"],"summary":"Create a goal milestone","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGoalMilestoneInput"}}}},"responses":{"201":{"description":"Created goal milestone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalMilestone"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/goals/{id}/milestones/{milestoneId}":{"put":{"operationId":"updateGoalMilestone","tags":["Goals"],"summary":"Update a goal milestone","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGoalMilestoneInput"}}}},"responses":{"200":{"description":"Updated goal milestone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalMilestone"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"milestoneId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/goals/{id}/progress":{"get":{"operationId":"listGoalProgress","tags":["Goals"],"summary":"List goal progress entries","responses":{"200":{"description":"Goal progress entries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GoalProgressEntry"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"operationId":"createGoalProgress","tags":["Goals"],"summary":"Create a goal progress entry","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGoalProgressInput"}}}},"responses":{"201":{"description":"Created goal progress entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgressEntry"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/messaging/conversations":{"get":{"operationId":"listConversations","tags":["Messaging"],"summary":"List coach-client conversations","responses":{"200":{"description":"Conversations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationPreview"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"filter","in":"query","required":false,"schema":{"type":"string","enum":["active","archived","all"]},"description":"Conversation archive filter. Defaults to active."}]},"post":{"operationId":"createConversation","tags":["Messaging"],"summary":"Create or get a client conversation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationInput"}}}},"responses":{"201":{"description":"Conversation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/messaging/conversations/{id}/messages":{"get":{"operationId":"listMessages","tags":["Messaging"],"summary":"List messages in a conversation","responses":{"200":{"description":"Messages","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Maximum messages to return."},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only return messages created before this timestamp."}]},"post":{"operationId":"sendMessage","tags":["Messaging"],"summary":"Send a coach message","description":"Sends a one-to-one coach message to the client conversation and may notify the client by email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageInput"}}}},"responses":{"201":{"description":"Created message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessage"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/messaging/conversations/{id}/read":{"put":{"operationId":"markConversationRead","tags":["Messaging"],"summary":"Mark a conversation as read","responses":{"200":{"description":"Marked conversation as read","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/messaging/conversations/{id}/unread":{"put":{"operationId":"markConversationUnread","tags":["Messaging"],"summary":"Mark a conversation as unread","responses":{"200":{"description":"Marked conversation as unread","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/messaging/conversations/{id}/archive":{"put":{"operationId":"setConversationArchived","tags":["Messaging"],"summary":"Archive or unarchive a conversation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetConversationArchivedInput"}}}},"responses":{"200":{"description":"Conversation archive state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationArchiveResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/messaging/conversations/{id}/draft-replies":{"post":{"operationId":"draftMessageReplies","tags":["Messaging"],"summary":"Generate draft replies","description":"AI-backed endpoint. PAT callers need the `ai` scope in addition to `write`.","responses":{"200":{"description":"Draft replies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRepliesResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/messaging/unread-count":{"get":{"operationId":"getMessagingUnreadCount","tags":["Messaging"],"summary":"Get unread message count","responses":{"200":{"description":"Unread message count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/messaging/broadcasts":{"get":{"operationId":"listBroadcasts","tags":["Messaging"],"summary":"List segmented broadcasts","description":"Coach Plus only. Requires the broadcast messaging capability.","responses":{"200":{"description":"Broadcasts","content":{"application/json":{"schema":{"type":"object","properties":{"broadcasts":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["broadcasts"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createSegmentBroadcast","tags":["Messaging"],"summary":"Create a segmented broadcast","description":"Coach Plus only. Requires the broadcast messaging capability. Agents should preview recipients and get explicit coach confirmation before calling.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBroadcastInput"}}}},"responses":{"201":{"description":"Created broadcast","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/messaging/broadcasts/segments":{"get":{"operationId":"listBroadcastSegments","tags":["Messaging"],"summary":"List broadcast segments","description":"Coach Plus only. Requires the broadcast messaging capability.","responses":{"200":{"description":"Broadcast segments","content":{"application/json":{"schema":{"type":"object","properties":{"segments":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["segments"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/messaging/broadcasts/preview":{"post":{"operationId":"previewBroadcastSegment","tags":["Messaging"],"summary":"Preview a broadcast segment","description":"Coach Plus only. Requires the broadcast messaging capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastPreviewInput"}}}},"responses":{"200":{"description":"Broadcast preview","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/automations/plus-templates":{"get":{"operationId":"listAdvancedAutomationTemplates","tags":["Automations"],"summary":"List advanced automation templates","description":"Coach Plus only. Requires the advanced automation sequences capability.","responses":{"200":{"description":"Advanced automation templates","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["templates"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/automations/plus-templates/{templateId}":{"post":{"operationId":"createAdvancedAutomationTemplate","tags":["Automations"],"summary":"Create an advanced automation template","description":"Coach Plus only. Creates the template as a disabled draft.","responses":{"201":{"description":"Created automation","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/analytics/growth-snapshot":{"get":{"operationId":"getGrowthSnapshot","tags":["Analytics"],"summary":"Get growth analytics snapshot","description":"Coach Plus only. Requires the growth analytics capability.","responses":{"200":{"description":"Growth snapshot","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive start date or timestamp."},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Exclusive end date or timestamp."}]}},"/api/v1/analytics/growth-recommendations":{"get":{"operationId":"listGrowthRecommendations","tags":["Analytics"],"summary":"List Growth Operator recommendations","description":"Coach Plus only. Requires the AI Growth Operator capability.","responses":{"200":{"description":"Growth recommendations","content":{"application/json":{"schema":{"type":"object","properties":{"recommendations":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["recommendations"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive start date or timestamp."},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Exclusive end date or timestamp."}]}},"/api/v1/analytics/growth-recommendations/{id}/status":{"post":{"operationId":"updateGrowthRecommendationStatus","tags":["Analytics"],"summary":"Update Growth Operator recommendation status","description":"Coach Plus only. Requires the AI Growth Operator capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGrowthRecommendationStatusInput"}}}},"responses":{"200":{"description":"Updated recommendation","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/pricing-lab/snapshot":{"get":{"operationId":"getPricingSnapshot","tags":["Pricing Lab"],"summary":"Get Pricing Lab snapshot","responses":{"200":{"description":"Pricing snapshot","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["30d","90d","365d"]},"description":"Pricing snapshot window."}]}},"/api/v1/pricing-lab/recommendations":{"get":{"operationId":"listPricingRecommendations","tags":["Pricing Lab"],"summary":"List Pricing Lab recommendations","description":"Coach Plus only. Requires the AI Growth Operator capability.","responses":{"200":{"description":"Pricing recommendations","content":{"application/json":{"schema":{"type":"object","properties":{"recommendations":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["recommendations"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/programs":{"get":{"operationId":"listPrograms","tags":["Programs"],"summary":"List programs","description":"Coach Plus only. Requires the programs and cohorts capability.","responses":{"200":{"description":"Programs","content":{"application/json":{"schema":{"type":"object","properties":{"programs":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["programs"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createProgram","tags":["Programs"],"summary":"Create a program","description":"Coach Plus only. Requires the programs and cohorts capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProgramInput"}}}},"responses":{"201":{"description":"Created program","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/programs/{programId}/cohorts":{"post":{"operationId":"createProgramCohort","tags":["Programs"],"summary":"Create a program cohort","description":"Coach Plus only. Requires the programs and cohorts capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProgramCohortInput"}}}},"responses":{"201":{"description":"Created cohort","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"programId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/programs/{programId}/modules":{"post":{"operationId":"createProgramModule","tags":["Programs"],"summary":"Create a program module","description":"Coach Plus only. Requires the programs and cohorts capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProgramModuleInput"}}}},"responses":{"201":{"description":"Created module","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"programId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/programs/cohorts/{cohortId}/enrollments":{"post":{"operationId":"enrollContactInProgramCohort","tags":["Programs"],"summary":"Enroll a contact in a program cohort","description":"Coach Plus only. Requires the programs and cohorts capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramEnrollmentInput"}}}},"responses":{"201":{"description":"Created enrollment","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"cohortId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/programs/cohorts/{cohortId}/roster":{"get":{"operationId":"listProgramCohortRoster","tags":["Programs"],"summary":"List a program cohort roster","description":"Coach Plus only. Requires the programs and cohorts capability.","responses":{"200":{"description":"Cohort roster","content":{"application/json":{"schema":{"type":"object","properties":{"roster":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["roster"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"cohortId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/programs/cohorts/{cohortId}/assignments":{"get":{"operationId":"listProgramAssignments","tags":["Programs"],"summary":"List program assignments","description":"Coach Plus only. Requires the programs and cohorts capability.","responses":{"200":{"description":"Program assignments","content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["assignments"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"cohortId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"operationId":"createProgramAssignment","tags":["Programs"],"summary":"Create a program assignment","description":"Coach Plus only. Requires the programs and cohorts capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProgramAssignmentInput"}}}},"responses":{"201":{"description":"Created assignment","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"cohortId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/programs/cohorts/{cohortId}/checkins":{"get":{"operationId":"listProgramCheckins","tags":["Programs"],"summary":"List program check-ins","description":"Coach Plus only. Requires the programs and cohorts capability.","responses":{"200":{"description":"Program check-ins","content":{"application/json":{"schema":{"type":"object","properties":{"checkins":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["checkins"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"cohortId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"operationId":"createProgramCheckin","tags":["Programs"],"summary":"Create a program check-in","description":"Coach Plus only. Requires the programs and cohorts capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProgramCheckinInput"}}}},"responses":{"201":{"description":"Created check-in","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"cohortId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/support/requests":{"get":{"operationId":"listPrioritySupportRequests","tags":["Support"],"summary":"List priority support requests","description":"Coach Plus only. Requires the priority support capability.","responses":{"200":{"description":"Priority support requests","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["requests"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createPrioritySupportRequest","tags":["Support"],"summary":"Create a priority support request","description":"Coach Plus only. Requires the priority support capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePrioritySupportRequestInput"}}}},"responses":{"201":{"description":"Created priority support request","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/notifications":{"get":{"operationId":"listNotifications","tags":["Notifications"],"summary":"List notifications","responses":{"200":{"description":"Notifications","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Maximum notifications to return."},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only return notifications created before this timestamp."}]}},"/api/v1/notifications/unread-count":{"get":{"operationId":"getNotificationUnreadCount","tags":["Notifications"],"summary":"Get unread notification count","responses":{"200":{"description":"Unread notification count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/notifications/preferences":{"get":{"operationId":"getNotificationPreferences","tags":["Notifications"],"summary":"Get notification preferences","responses":{"200":{"description":"Notification preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"put":{"operationId":"updateNotificationPreferences","tags":["Notifications"],"summary":"Update notification preferences","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationPreferencesInput"}}}},"responses":{"200":{"description":"Notification preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/notifications/{id}/read":{"put":{"operationId":"markNotificationRead","tags":["Notifications"],"summary":"Mark a notification as read","responses":{"200":{"description":"Notification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/notifications/read-all":{"put":{"operationId":"markAllNotificationsRead","tags":["Notifications"],"summary":"Mark all notifications as read","responses":{"200":{"description":"Marked all notifications as read","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/notifications/{id}":{"delete":{"operationId":"deleteNotification","tags":["Notifications"],"summary":"Delete a notification","description":"PAT callers must include `X-Confirm-Destructive: true`.","responses":{"200":{"description":"Deleted notification","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Confirm-Destructive","in":"header","required":false,"description":"Required for PAT callers.","schema":{"type":"string","const":"true"}}]}},"/api/v1/notifications/stream":{"get":{"operationId":"streamNotifications","tags":["Notifications"],"summary":"Stream notification events","description":"Browser-oriented Server-Sent Events transport for live notification updates.","responses":{"200":{"description":"Notification event stream","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/notifications/push/vapid-key":{"get":{"operationId":"getPushVapidKey","tags":["Notifications"],"summary":"Get the browser push VAPID public key","responses":{"200":{"description":"Push public key","content":{"application/json":{"schema":{"type":"object","properties":{"publicKey":{"type":"string"}},"required":["publicKey"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/notifications/push/subscribe":{"post":{"operationId":"subscribePushNotifications","tags":["Notifications"],"summary":"Subscribe a browser push endpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscriptionInput"}}}},"responses":{"201":{"description":"Push subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscription"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/notifications/push/unsubscribe":{"delete":{"operationId":"unsubscribePushNotifications","tags":["Notifications"],"summary":"Unsubscribe a browser push endpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushUnsubscribeInput"}}}},"responses":{"200":{"description":"Unsubscribed push endpoint","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/features-vote/config":{"get":{"operationId":"getFeatureVoteConfig","tags":["Feedback"],"summary":"Get the feature request configuration","responses":{"200":{"description":"Feature request configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureVoteConfig"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[]}},"/api/v1/features-vote/requests":{"get":{"operationId":"listFeatureRequests","tags":["Feedback"],"summary":"List feature requests for the current workspace","responses":{"200":{"description":"Feature requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureRequestListResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createFeatureRequest","tags":["Feedback"],"summary":"Submit product feedback or a feature request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeatureRequestInput"}}}},"responses":{"201":{"description":"Created feature request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureRequestResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/developers/tokens":{"get":{"operationId":"listPersonalAccessTokens","tags":["Developer Access"],"summary":"List personal access tokens","responses":{"200":{"description":"Personal access tokens","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/PersonalAccessToken"}}},"required":["tokens"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createPersonalAccessToken","tags":["Developer Access"],"summary":"Create a personal access token","description":"Returns the full PAT secret exactly once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonalAccessTokenInput"}}}},"responses":{"201":{"description":"Created token with one-time secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonalAccessTokenResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/developers/onboarding-sessions":{"get":{"operationId":"listDeveloperOnboardingSessions","tags":["Developer Access"],"summary":"List agentic onboarding setup sessions","responses":{"200":{"description":"Developer onboarding setup sessions","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/DeveloperOnboardingSession"}}},"required":["sessions"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createDeveloperOnboardingSession","tags":["Developer Access"],"summary":"Create a one-time agentic onboarding setup session","description":"Returns the full setup code exactly once. The setup code can be exchanged for a short-lived PAT by @nochalk/setup.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeveloperOnboardingSessionInput"}}}},"responses":{"201":{"description":"Created setup session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeveloperOnboardingSessionResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/developers/onboarding-sessions/{id}":{"delete":{"operationId":"revokeDeveloperOnboardingSession","tags":["Developer Access"],"summary":"Revoke a pending agentic onboarding setup session","responses":{"200":{"description":"Revoked setup session","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/developer-onboarding/exchange":{"post":{"operationId":"exchangeDeveloperOnboardingSession","tags":["Developer Access"],"summary":"Exchange a setup code for agent credentials","description":"Public endpoint used by @nochalk/setup. Returns the full PAT secret exactly once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeDeveloperOnboardingSessionInput"}}}},"responses":{"201":{"description":"Exchanged setup code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeDeveloperOnboardingSessionResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[]}},"/api/v1/developers/tokens/{id}":{"patch":{"operationId":"updatePersonalAccessToken","tags":["Developer Access"],"summary":"Update a personal access token","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonalAccessTokenInput"}}}},"responses":{"200":{"description":"Updated token","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/PersonalAccessToken"}},"required":["token"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"revokePersonalAccessToken","tags":["Developer Access"],"summary":"Revoke a personal access token","responses":{"200":{"description":"Revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/developers/tokens/{id}/usage":{"get":{"operationId":"getPersonalAccessTokenUsage","tags":["Developer Access"],"summary":"Get personal access token usage","responses":{"200":{"description":"Personal access token usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalAccessTokenUsageResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/developers/capabilities":{"get":{"operationId":"listHeadlessCapabilities","tags":["Developer Access"],"summary":"List headless-mode capability coverage","description":"Returns the current REST and MCP coverage plan for coach-facing product surfaces.","responses":{"200":{"description":"Headless-mode capabilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeadlessCapabilitiesResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/developers/audit-log":{"get":{"operationId":"listDeveloperAuditLog","tags":["Developer Access"],"summary":"List developer audit log entries","responses":{"200":{"description":"Audit log entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogListResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"token_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by personal access token ID."},{"name":"action","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by action substring."},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Return entries created on or after this timestamp."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}]}},"/api/v1/developers/webhooks":{"get":{"operationId":"listWebhookEndpoints","tags":["Developer Access"],"summary":"List webhook endpoints","responses":{"200":{"description":"Webhook endpoints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointListResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"createWebhookEndpoint","tags":["Developer Access"],"summary":"Create a webhook endpoint","description":"Returns the webhook signing secret exactly once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointInput"}}}},"responses":{"201":{"description":"Created webhook endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointSecretResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/developers/webhooks/{id}":{"patch":{"operationId":"updateWebhookEndpoint","tags":["Developer Access"],"summary":"Update a webhook endpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointInput"}}}},"responses":{"200":{"description":"Updated webhook endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"deleteWebhookEndpoint","tags":["Developer Access"],"summary":"Delete a webhook endpoint","responses":{"200":{"description":"Deleted webhook endpoint","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/developers/webhooks/{id}/rotate-secret":{"post":{"operationId":"rotateWebhookEndpointSecret","tags":["Developer Access"],"summary":"Rotate a webhook signing secret","description":"Returns the new webhook signing secret exactly once.","responses":{"200":{"description":"Rotated webhook signing secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointSecretResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/developers/webhooks/{id}/deliveries":{"get":{"operationId":"listWebhookDeliveries","tags":["Developer Access"],"summary":"List webhook deliveries","responses":{"200":{"description":"Webhook deliveries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}]}},"/api/v1/developers/webhooks/{id}/deliveries/{deliveryId}/retry":{"post":{"operationId":"retryWebhookDelivery","tags":["Developer Access"],"summary":"Retry a webhook delivery","responses":{"200":{"description":"Queued webhook delivery retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestructiveConfirmationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string"}}]}},"/openapi.json":{"get":{"operationId":"getOpenApiSpec","tags":["Documentation"],"summary":"Get the OpenAPI 3.1 specification","responses":{"200":{"description":"OpenAPI specification","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"security":[]}},"/docs":{"get":{"operationId":"getSwaggerDocs","tags":["Documentation"],"summary":"Open Swagger UI","responses":{"200":{"description":"Swagger UI HTML","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Use a browser JWT or a personal access token such as `nc_live_...`."}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error"],"additionalProperties":false},"DestructiveConfirmationError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","const":"DESTRUCTIVE_CONFIRMATION_REQUIRED"},"requiredHeader":{"type":"string","const":"X-Confirm-Destructive: true"},"docsUrl":{"type":"string","format":"uri"}},"required":["error","code","requiredHeader","docsUrl"],"additionalProperties":false},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["lead","active","inactive","archived"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","firstName","lastName","email","status","createdAt","updatedAt"],"additionalProperties":false},"CreateContactInput":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email"},"phone":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["lead","active","inactive","archived"],"default":"lead"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["firstName","lastName","email"],"additionalProperties":false},"UpdateContactInput":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email"},"phone":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["lead","active","inactive","archived"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":[],"additionalProperties":false},"ContactPrimaryGoal":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string"},"progressPercent":{"type":"integer","minimum":0,"maximum":100}},"required":["id","title","status","progressPercent"],"additionalProperties":false},"RosterContact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["lead","active","inactive","archived"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"primaryGoal":{"anyOf":[{"$ref":"#/components/schemas/ContactPrimaryGoal"},{"type":"null"}]},"nextAction":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresAttention":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","firstName","lastName","email","status","primaryGoal","nextAction","requiresAttention","createdAt","updatedAt"],"additionalProperties":false},"ContactRosterResponse":{"type":"object","properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/RosterContact"}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":1},"pageSize":{"type":"integer","minimum":1,"maximum":100},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0}},"required":["page","pageSize","total","totalPages"],"additionalProperties":false}},"required":["contacts","pagination"],"additionalProperties":false},"ContactNote":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"title":{"type":"string"},"content":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","contactId","title","content","tags","createdAt","updatedAt"],"additionalProperties":false},"CreateContactNoteInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["title","content"],"additionalProperties":false},"ContactInteraction":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["booking","cancellation","reschedule","payment","refund","session","note","email","call","form_submission"]},"channel":{"type":"string","enum":["web","mobile","email","phone","in_person"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurredAt":{"type":"string","format":"date-time"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","contactId","type","channel","title","occurredAt","createdAt"],"additionalProperties":false},"CreateContactInteractionInput":{"type":"object","properties":{"type":{"type":"string","enum":["booking","cancellation","reschedule","payment","refund","session","note","email","call","form_submission"]},"channel":{"type":"string","enum":["web","mobile","email","phone","in_person"]},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurredAt":{"type":"string","format":"date-time"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["type","channel","title"],"additionalProperties":false},"ContactAppointment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","confirmed","cancelled","completed","no_show"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionId":{"type":"string","format":"uuid"},"sessionName":{"type":"string"},"sessionDurationMinutes":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","startsAt","endsAt","timezone","sessionId","sessionName","sessionDurationMinutes","createdAt","updatedAt"],"additionalProperties":false},"BulkDeleteContactsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"required":["ids"],"additionalProperties":false},"BulkDeleteContactsResponse":{"type":"object","properties":{"success":{"type":"boolean"},"deletedCount":{"type":"integer","minimum":0},"deletedIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["success","deletedCount","deletedIds"],"additionalProperties":false},"Session":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string","enum":["one_on_one","group","discovery_call"]},"durationMinutes":{"type":"integer"},"price":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxParticipants":{"type":"integer"},"bufferMinutes":{"type":"integer"},"paymentCollectionMode":{"type":"string","enum":["managed_checkout","manual"]},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","name","type","durationMinutes","price","currency","maxParticipants","bufferMinutes","paymentCollectionMode","isActive","createdAt","updatedAt"],"additionalProperties":false},"CreateSessionInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["one_on_one","group","discovery_call"]},"durationMinutes":{"type":"integer","minimum":15,"maximum":480},"price":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxParticipants":{"type":"integer","minimum":1,"default":1},"bufferMinutes":{"type":"integer","minimum":0,"default":0},"paymentCollectionMode":{"type":"string","enum":["managed_checkout","manual"],"default":"managed_checkout"},"isActive":{"type":"boolean","default":true}},"required":["name","type","durationMinutes","price"],"additionalProperties":false},"UpdateSessionInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["one_on_one","group","discovery_call"]},"durationMinutes":{"type":"integer","minimum":15,"maximum":480},"price":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxParticipants":{"type":"integer","minimum":1},"bufferMinutes":{"type":"integer","minimum":0},"paymentCollectionMode":{"type":"string","enum":["managed_checkout","manual"]},"isActive":{"type":"boolean"}},"required":[],"additionalProperties":false},"Availability":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"startTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"endTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"isRecurring":{"type":"boolean"},"specificDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","dayOfWeek","startTime","endTime","isRecurring","createdAt"],"additionalProperties":false},"CreateAvailabilityInput":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"startTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"endTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"isRecurring":{"type":"boolean","default":true},"specificDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]}},"required":["dayOfWeek","startTime","endTime"],"additionalProperties":false},"Booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","confirmed","cancelled","completed","no_show"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"meetingUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"meetingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactFirstName":{"type":"string"},"contactLastName":{"type":"string"},"contactEmail":{"type":"string","format":"email"},"sessionName":{"type":"string"},"sessionType":{"type":"string","enum":["one_on_one","group","discovery_call"]},"sessionDuration":{"type":"integer","minimum":0},"sessionMaxParticipants":{"type":"integer","minimum":1},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","sessionId","contactId","status","startsAt","endsAt","timezone","createdAt","updatedAt"],"additionalProperties":true},"CreateBookingInput":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"startsAt":{"type":"string","format":"date-time"},"timezone":{"type":"string","minLength":1},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["sessionId","contactId","startsAt","timezone"],"additionalProperties":false},"CreateBookingResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"checkoutUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"checkoutHoldToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"creditUsage":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":[],"additionalProperties":true},"UpdateBookingScheduleInput":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time"},"timezone":{"type":"string","minLength":1},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowOutsideAvailability":{"type":"boolean"}},"required":["startsAt"],"additionalProperties":false},"AvailabilitySlot":{"type":"object","properties":{"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"available":{"type":"boolean"}},"required":["startTime","endTime","available"],"additionalProperties":true},"BookingRescheduleOptions":{"type":"object","properties":{"bookingId":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"timezone":{"type":"string"},"currentTimeState":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["available","outside_availability","conflict"]},"message":{"type":"string"}},"required":["state","message"],"additionalProperties":false},{"type":"null"}]},"slots":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilitySlot"}}},"required":["bookingId","date","timezone","currentTimeState","slots"],"additionalProperties":false},"CoachingPackage":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionCount":{"type":"integer","minimum":1},"price":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"sessionTypeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"stripePriceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"sessionName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","name","sessionCount","price","currency","active","createdAt","updatedAt"],"additionalProperties":false},"CreatePackageInput":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"sessionCount":{"type":"integer","minimum":1,"maximum":999},"price":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"sessionTypeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active":{"type":"boolean","default":true}},"required":["name","sessionCount","price"],"additionalProperties":false},"UpdatePackageInput":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"sessionCount":{"type":"integer","minimum":1,"maximum":999},"price":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"sessionTypeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active":{"type":"boolean"}},"required":[],"additionalProperties":false},"SubscriptionPlan":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"interval":{"type":"string","enum":["month","year"]},"sessionsPerCycle":{"type":"integer","minimum":1},"sessionTypeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"stripePriceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"sessionName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","name","amount","currency","interval","sessionsPerCycle","active","createdAt","updatedAt"],"additionalProperties":false},"CreateSubscriptionPlanInput":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"amount":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"interval":{"type":"string","enum":["month","year"]},"sessionsPerCycle":{"type":"integer","minimum":1,"maximum":999},"sessionTypeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active":{"type":"boolean","default":true}},"required":["name","amount","interval","sessionsPerCycle"],"additionalProperties":false},"UpdateSubscriptionPlanInput":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"amount":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"interval":{"type":"string","enum":["month","year"]},"sessionsPerCycle":{"type":"integer","minimum":1,"maximum":999},"sessionTypeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active":{"type":"boolean"}},"required":[],"additionalProperties":false},"PackagePurchase":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"packageId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"sessionsRemaining":{"type":"integer","minimum":0},"sessionsUsed":{"type":"integer","minimum":0},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeCheckoutSessionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","completed","refunded"]},"purchasedAt":{"type":"string","format":"date-time"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"packageName":{"type":"string"},"packageDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionCount":{"type":"integer","minimum":1},"price":{"type":"integer","minimum":0},"currency":{"type":"string"},"sessionTypeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"sessionName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactFirstName":{"type":"string"},"contactLastName":{"type":"string"},"contactEmail":{"type":"string","format":"email"}},"required":["id","tenantId","packageId","contactId","sessionsRemaining","sessionsUsed","status","purchasedAt","createdAt","updatedAt"],"additionalProperties":false},"ManagedSubscription":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"planId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"sessionTypeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"stripeSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","past_due","cancelled","unpaid"]},"name":{"type":"string"},"amount":{"type":"integer","minimum":0},"currency":{"type":"string"},"interval":{"type":"string","enum":["month","year"]},"sessionsPerCycle":{"type":"integer","minimum":1},"sessionsRemaining":{"type":"integer","minimum":0},"sessionsUsed":{"type":"integer","minimum":0},"currentPeriodStart":{"type":"string","format":"date-time"},"currentPeriodEnd":{"type":"string","format":"date-time"},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"planName":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactFirstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactLastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]}},"required":["id","tenantId","contactId","status","name","amount","currency","interval","sessionsPerCycle","sessionsRemaining","sessionsUsed","currentPeriodStart","currentPeriodEnd","createdAt","updatedAt"],"additionalProperties":false},"PackagePurchasesResponse":{"type":"object","properties":{"packagePurchases":{"type":"array","items":{"$ref":"#/components/schemas/PackagePurchase"}},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/ManagedSubscription"}}},"required":["packagePurchases","subscriptions"],"additionalProperties":false},"StripeConnectStatus":{"type":"object","properties":{"connected":{"type":"boolean"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"onboardingComplete":{"type":"boolean"},"chargesEnabled":{"type":"boolean"},"payoutsEnabled":{"type":"boolean"},"detailsSubmitted":{"type":"boolean"},"requirementsCurrentlyDueCount":{"type":"integer","minimum":0},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","const":"stripe_connect"},"status":{"type":"string","enum":["pending","active","restricted","disconnected"]}},"required":["provider","status"],"additionalProperties":false},{"type":"null"}]}},"required":["connected","onboardingComplete"],"additionalProperties":true},"Transaction":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"bookingId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"sessionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeTransferId":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"integer","minimum":0},"platformFee":{"type":"integer","minimum":0},"stripeFee":{"type":"integer","minimum":0},"currency":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed","refunded"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"stripeDashboardUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"contactFirstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactLastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","amount","platformFee","stripeFee","currency","status","createdAt"],"additionalProperties":true},"RevenueStats":{"type":"object","properties":{"totalRevenue":{"type":"integer","minimum":0},"totalPlatformFees":{"type":"integer","minimum":0},"totalStripeFees":{"type":"integer","minimum":0},"transactionCount":{"type":"integer","minimum":0}},"required":["totalRevenue","totalPlatformFees","totalStripeFees","transactionCount"],"additionalProperties":false},"InvoiceLineItem":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":1},"unitPrice":{"type":"integer","minimum":0},"amount":{"type":"integer","minimum":0}},"required":["description","quantity","unitPrice"],"additionalProperties":false},"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"stripeInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","sent","paid","overdue","void"]},"amount":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"dueDate":{"type":"string","format":"date"},"paidAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItem"}},"contactFirstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactLastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","contactId","status","amount","currency","dueDate","lineItems","createdAt"],"additionalProperties":false},"CreateInvoiceInput":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid"},"amount":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"dueDate":{"type":"string","format":"date"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItem"}}},"required":["contactId","dueDate"],"additionalProperties":false},"UpdateInvoiceStatusInput":{"type":"object","properties":{"status":{"type":"string","enum":["draft","sent","paid","overdue","void"]}},"required":["status"],"additionalProperties":false},"CreatePaymentProductInput":{"type":"object","properties":{"sessionTypeId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1},"amount":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"}},"required":["sessionTypeId","name","amount"],"additionalProperties":false},"PaymentProductResponse":{"type":"object","properties":{"product":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"price":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"existing":{"type":"boolean"}},"required":["product","price","existing"],"additionalProperties":false},"StripeProductListResponse":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["products"],"additionalProperties":false},"CreatePaymentLinkInput":{"type":"object","properties":{"priceId":{"type":"string","minLength":1}},"required":["priceId"],"additionalProperties":false},"PaymentLink":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["id"],"additionalProperties":true},"FormField":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","select","checkbox","date","number","file","email","phone","rating","signature"]},"label":{"type":"string","minLength":1,"maxLength":120},"placeholder":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]},"helpText":{"anyOf":[{"type":"string","maxLength":280},{"type":"null"}]},"sectionLabel":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"order":{"type":"integer","minimum":0}},"required":["id","type","label","required","order"],"additionalProperties":false},"FormSessionLink":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"formId":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"required":{"type":"boolean"},"sessionName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","sessionId","required","createdAt"],"additionalProperties":true},"Form":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FormField"}},"status":{"type":"string","enum":["draft","active","archived"]},"isTemplate":{"type":"boolean"},"templateCategory":{"type":"string","enum":["intake","health_screening","goal_setting","waiver","feedback","custom"]},"linkedSessions":{"type":"array","items":{"$ref":"#/components/schemas/FormSessionLink"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","title","fields","status","isTemplate","templateCategory","createdAt","updatedAt"],"additionalProperties":false},"CreateFormInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FormField"}},"status":{"type":"string","enum":["draft","active","archived"],"default":"draft"},"isTemplate":{"type":"boolean","default":false},"templateCategory":{"type":"string","enum":["intake","health_screening","goal_setting","waiver","feedback","custom"],"default":"custom"}},"required":["title"],"additionalProperties":false},"UpdateFormInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FormField"}},"status":{"type":"string","enum":["draft","active","archived"]},"isTemplate":{"type":"boolean"},"templateCategory":{"type":"string","enum":["intake","health_screening","goal_setting","waiver","feedback","custom"]}},"required":[],"additionalProperties":false},"DuplicateFormInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"status":{"type":"string","enum":["draft","active","archived"]},"isTemplate":{"type":"boolean"},"templateCategory":{"type":"string","enum":["intake","health_screening","goal_setting","waiver","feedback","custom"]}},"required":[],"additionalProperties":false},"LinkFormSessionInput":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid"},"required":{"type":"boolean","default":true}},"required":["sessionId"],"additionalProperties":false},"CreateFormInstanceInput":{"type":"object","properties":{"formId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"}},"required":["formId","contactId"],"additionalProperties":false},"FormSubmission":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"formId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"responses":{"type":"object","additionalProperties":true},"submittedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"formTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"formDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"formTemplateCategory":{"anyOf":[{"type":"string","enum":["intake","health_screening","goal_setting","waiver","feedback","custom"]},{"type":"null"}]},"formFields":{"type":"array","items":{"$ref":"#/components/schemas/FormField"}},"contactFirstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactLastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]}},"required":["id","formId","contactId","responses","submittedAt","createdAt"],"additionalProperties":true},"FormInstance":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"formId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","submitted","expired"]},"sentAt":{"type":"string","format":"date-time"},"resentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time"},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"submissionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"resendCount":{"type":"integer","minimum":0},"responses":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"formTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"formDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"formFields":{"type":"array","items":{"$ref":"#/components/schemas/FormField"}},"formStatus":{"anyOf":[{"type":"string","enum":["draft","active","archived"]},{"type":"null"}]},"formIsTemplate":{"type":"boolean"},"formTemplateCategory":{"anyOf":[{"type":"string","enum":["intake","health_screening","goal_setting","waiver","feedback","custom"]},{"type":"null"}]},"contactFirstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactLastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]}},"required":["id","tenantId","formId","contactId","token","status","sentAt","expiresAt","resendCount","createdAt","updatedAt"],"additionalProperties":true},"ContractTemplate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"name":{"type":"string"},"body":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresSignatureBeforeBooking":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","name","body","requiresSignatureBeforeBooking","isActive","createdAt","updatedAt"],"additionalProperties":false},"CreateContractTemplateInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"body":{"type":"string","minLength":1,"maxLength":20000},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"requiresSignatureBeforeBooking":{"type":"boolean","default":false},"isActive":{"type":"boolean","default":true}},"required":["name","body"],"additionalProperties":false},"UpdateContractTemplateInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"body":{"type":"string","minLength":1,"maxLength":20000},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"requiresSignatureBeforeBooking":{"type":"boolean"},"isActive":{"type":"boolean"}},"required":[],"additionalProperties":false},"ContractSessionLink":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid"},"sessionName":{"type":"string"},"sessionType":{"type":"string","enum":["one_on_one","group","discovery_call"]},"sessionDuration":{"type":"integer","minimum":0},"sessionIsActive":{"type":"boolean"},"linkId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"requiredBeforeBooking":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"linkCreatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateDescription":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["sessionId","sessionName","sessionType","sessionDuration","sessionIsActive"],"additionalProperties":false},"ReplaceContractSessionLinksInput":{"type":"object","properties":{"templateIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["templateIds"],"additionalProperties":false},"CreateContractInput":{"type":"object","properties":{"templateId":{"type":"string","format":"uuid"},"sessionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["templateId"],"additionalProperties":false},"Contract":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"sessionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"type":"string","enum":["draft","sent","viewed","signed","revoked"]},"name":{"type":"string"},"body":{"type":"string"},"signerName":{"anyOf":[{"type":"string"},{"type":"null"}]},"signatureIp":{"anyOf":[{"type":"string"},{"type":"null"}]},"signatureUserAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"viewedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"signedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"contactFirstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactLastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"sessionName":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenantId","contactId","templateId","status","name","body","createdAt","updatedAt"],"additionalProperties":true},"GoalMilestone":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"goalId":{"type":"string","format":"uuid"},"title":{"type":"string"},"completed":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"order":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["id","goalId","title","completed","order","createdAt"],"additionalProperties":false},"GoalProgressEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"goalId":{"type":"string","format":"uuid"},"value":{"type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"recordedAt":{"type":"string","format":"date-time"},"recordedBy":{"type":"string","enum":["coach","client"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","goalId","value","recordedAt","recordedBy","createdAt"],"additionalProperties":false},"Goal":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"string","enum":["active","completed","paused","abandoned"]},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"milestones":{"type":"array","items":{"$ref":"#/components/schemas/GoalMilestone"}},"progressEntries":{"type":"array","items":{"$ref":"#/components/schemas/GoalProgressEntry"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","contactId","title","status","createdAt","updatedAt"],"additionalProperties":false},"CreateGoalInput":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"targetDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"string","enum":["active","completed","paused","abandoned"]},"milestones":{"type":"array","items":{"$ref":"#/components/schemas/CreateGoalMilestoneInput"}}},"required":["contactId","title"],"additionalProperties":false},"UpdateGoalInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"targetDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"string","enum":["active","completed","paused","abandoned"]}},"required":[],"additionalProperties":false},"CreateGoalMilestoneInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"order":{"type":"integer","minimum":0}},"required":["title"],"additionalProperties":false},"UpdateGoalMilestoneInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"completed":{"type":"boolean"},"order":{"type":"integer","minimum":0}},"required":[],"additionalProperties":false},"CreateGoalProgressInput":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"recordedAt":{"type":"string","format":"date-time"},"recordedBy":{"type":"string","enum":["coach","client"]}},"required":["value"],"additionalProperties":false},"ConversationPreview":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"contactName":{"type":"string"},"contactEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"lastMessage":{"anyOf":[{"type":"object","properties":{"content":{"type":"string"},"role":{"type":"string","enum":["user","assistant"]},"createdAt":{"type":"string","format":"date-time"}},"required":["content","role","createdAt"],"additionalProperties":false},{"type":"null"}]},"unreadCount":{"type":"integer","minimum":0},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","contactId","contactName","contactEmail","lastMessage","unreadCount","archivedAt","updatedAt","createdAt"],"additionalProperties":false},"Conversation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string"},"siteConfigId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","type","createdAt","updatedAt"],"additionalProperties":false},"ChatMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversationId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","conversationId","role","content","createdAt"],"additionalProperties":false},"CreateConversationInput":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid"}},"required":["contactId"],"additionalProperties":false},"SendMessageInput":{"type":"object","properties":{"content":{"type":"string","minLength":1}},"required":["content"],"additionalProperties":false},"SetConversationArchivedInput":{"type":"object","properties":{"archived":{"type":"boolean"}},"required":["archived"],"additionalProperties":false},"ConversationArchiveResponse":{"type":"object","properties":{"success":{"type":"boolean"},"archived":{"type":"boolean"}},"required":["success","archived"],"additionalProperties":false},"DraftRepliesResponse":{"type":"object","properties":{"drafts":{"type":"array","items":{"type":"string"}}},"required":["drafts"],"additionalProperties":false},"CountResponse":{"type":"object","properties":{"count":{"type":"integer","minimum":0}},"required":["count"],"additionalProperties":false},"Notification":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"type":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"read":{"type":"boolean"},"actionUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"groupCount":{"type":"integer","minimum":1},"emailSentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","type","title","body","read","groupCount","createdAt"],"additionalProperties":false},"NotificationPreferences":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"bookingConfirmation":{"type":"boolean"},"bookingCancellation":{"type":"boolean"},"bookingReminder":{"type":"boolean"},"paymentReceipt":{"type":"boolean"},"reminderHoursBefore":{"type":"integer","minimum":1,"maximum":168},"inAppBooking":{"type":"boolean"},"inAppPayment":{"type":"boolean"},"inAppMessage":{"type":"boolean"},"inAppForm":{"type":"boolean"},"inAppContract":{"type":"boolean"},"inAppContact":{"type":"boolean"},"inAppSystem":{"type":"boolean"},"inAppDeployment":{"type":"boolean"},"emailBooking":{"type":"boolean"},"emailPayment":{"type":"boolean"},"emailMessage":{"type":"boolean"},"emailForm":{"type":"boolean"},"emailContract":{"type":"boolean"},"emailContact":{"type":"boolean"},"emailSystem":{"type":"boolean"},"emailDeployment":{"type":"boolean"},"digestEnabled":{"type":"boolean"},"digestTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","bookingConfirmation","bookingCancellation","bookingReminder","paymentReceipt","reminderHoursBefore","inAppBooking","inAppPayment","inAppMessage","inAppForm","inAppContract","inAppContact","inAppSystem","emailBooking","emailPayment","emailMessage","emailForm","emailContract","emailContact","emailSystem","digestEnabled","digestTime","createdAt","updatedAt"],"additionalProperties":false},"UpdateNotificationPreferencesInput":{"type":"object","properties":{"bookingConfirmation":{"type":"boolean"},"bookingCancellation":{"type":"boolean"},"bookingReminder":{"type":"boolean"},"paymentReceipt":{"type":"boolean"},"reminderHoursBefore":{"type":"integer","minimum":1,"maximum":168},"inAppBooking":{"type":"boolean"},"inAppPayment":{"type":"boolean"},"inAppMessage":{"type":"boolean"},"inAppForm":{"type":"boolean"},"inAppContract":{"type":"boolean"},"inAppContact":{"type":"boolean"},"inAppSystem":{"type":"boolean"},"inAppDeployment":{"type":"boolean"},"emailBooking":{"type":"boolean"},"emailPayment":{"type":"boolean"},"emailMessage":{"type":"boolean"},"emailForm":{"type":"boolean"},"emailContract":{"type":"boolean"},"emailContact":{"type":"boolean"},"emailSystem":{"type":"boolean"},"emailDeployment":{"type":"boolean"},"digestEnabled":{"type":"boolean"},"digestTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":[],"additionalProperties":false},"PushSubscriptionInput":{"type":"object","properties":{"endpoint":{"type":"string","minLength":1},"keys":{"type":"object","properties":{"p256dh":{"type":"string","minLength":1},"auth":{"type":"string","minLength":1}},"required":["p256dh","auth"],"additionalProperties":false}},"required":["endpoint","keys"],"additionalProperties":false},"PushUnsubscribeInput":{"type":"object","properties":{"endpoint":{"type":"string","minLength":1}},"required":["endpoint"],"additionalProperties":false},"PushSubscription":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"endpoint":{"type":"string"},"p256dh":{"type":"string"},"auth":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","endpoint","p256dh","auth","createdAt"],"additionalProperties":false},"FeatureVoteConfig":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":"string","format":"uri"},"slug":{"type":"string"},"ctaLabel":{"type":"string"}},"required":["enabled","url","slug","ctaLabel"],"additionalProperties":false},"FeatureRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"userId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["general","crm","scheduling","payments","ai","integrations","mobile","reporting"]},"urgency":{"type":"string","enum":["nice_to_have","important","blocking"]},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["new","reviewing","planned","shipped","closed"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","tenantId","userId","title","description","category","urgency","surface","status","createdAt","updatedAt"],"additionalProperties":false},"CreateFeatureRequestInput":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":120},"description":{"type":"string","minLength":10,"maxLength":4000},"category":{"type":"string","enum":["general","crm","scheduling","payments","ai","integrations","mobile","reporting"],"default":"general"},"urgency":{"type":"string","enum":["nice_to_have","important","blocking"],"default":"nice_to_have"},"surface":{"type":"string","maxLength":120},"metadata":{"type":"object","additionalProperties":true}},"required":["title","description"],"additionalProperties":false},"FeatureRequestListResponse":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/FeatureRequest"}}},"required":["requests"],"additionalProperties":false},"FeatureRequestResponse":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/FeatureRequest"}},"required":["request"],"additionalProperties":false},"PersonalAccessToken":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"displayToken":{"type":"string","example":"nc_live_AbCdEf12****"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","ai"]}},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastUsedIp":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","displayToken","prefix","scopes","createdAt","updatedAt"],"additionalProperties":false},"CreatePersonalAccessTokenInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","ai"]},"minItems":1,"maxItems":3,"default":["read"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["name"],"additionalProperties":false},"CreatePersonalAccessTokenResponse":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/PersonalAccessToken"},"secret":{"type":"string","example":"nc_live_..."}},"required":["token","secret"],"additionalProperties":false},"UpdatePersonalAccessTokenInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","ai"]},"minItems":1,"maxItems":3},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false},"DeveloperOnboardingSession":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent":{"type":"string","enum":["claude-code","cursor","codex","openai","generic"]},"status":{"type":"string","enum":["pending","exchanged","revoked","expired"]},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","ai"]}},"codePrefix":{"type":"string"},"displayCode":{"type":"string","example":"nc_setup_AbCdEf12****"},"exchangedTokenId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time"},"exchangedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","agent","status","scopes","codePrefix","displayCode","exchangedTokenId","expiresAt","exchangedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false},"CreateDeveloperOnboardingSessionInput":{"type":"object","properties":{"agent":{"type":"string","enum":["claude-code","cursor","codex","openai","generic"],"default":"generic"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","ai"]},"minItems":1,"maxItems":3,"default":["read","write","ai"]},"expiresInMinutes":{"type":"integer","minimum":5,"maximum":120,"default":30}},"required":[],"additionalProperties":false},"CreateDeveloperOnboardingSessionResponse":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/DeveloperOnboardingSession"},"setupCode":{"type":"string","example":"nc_setup_..."},"command":{"type":"string"},"prompt":{"type":"string"}},"required":["session","setupCode","command","prompt"],"additionalProperties":false},"ExchangeDeveloperOnboardingSessionInput":{"type":"object","properties":{"setupCode":{"type":"string","minLength":1,"example":"nc_setup_..."},"agent":{"type":"string","enum":["claude-code","cursor","codex","openai","generic"]}},"required":["setupCode"],"additionalProperties":false},"ExchangeDeveloperOnboardingSessionResponse":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/DeveloperOnboardingSession"},"token":{"$ref":"#/components/schemas/PersonalAccessToken"},"secret":{"type":"string","example":"nc_live_..."},"mcp":{"type":"object","properties":{"command":{"type":"string"},"env":{"type":"object","additionalProperties":{"type":"string"}}},"required":["command","env"],"additionalProperties":false},"prompt":{"type":"string"}},"required":["session","token","secret","mcp","prompt"],"additionalProperties":false},"PersonalAccessTokenUsageError":{"type":"object","properties":{"id":{"type":"integer"},"method":{"type":"string"},"path":{"type":"string"},"status":{"type":"integer"},"durationMs":{"type":"integer","minimum":0},"requestId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","method","path","status","durationMs","createdAt"],"additionalProperties":false},"PersonalAccessTokenUsage":{"type":"object","properties":{"tokenId":{"type":"string","format":"uuid"},"requests24h":{"type":"integer","minimum":0},"requests7d":{"type":"integer","minimum":0},"errors24h":{"type":"integer","minimum":0},"errors7d":{"type":"integer","minimum":0},"averageDurationMs":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"lastRequestAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastErrorAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"recentErrors":{"type":"array","items":{"$ref":"#/components/schemas/PersonalAccessTokenUsageError"}}},"required":["tokenId","requests24h","requests7d","errors24h","errors7d","averageDurationMs","lastRequestAt","lastErrorAt","recentErrors"],"additionalProperties":false},"PersonalAccessTokenUsageResponse":{"type":"object","properties":{"usage":{"$ref":"#/components/schemas/PersonalAccessTokenUsage"}},"required":["usage"],"additionalProperties":false},"HeadlessCapability":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"routePrefixes":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["available","partial","planned","browser_or_external","internal_only"]},"currentHeadlessAccess":{"type":"string"},"recommendedMcpTools":{"type":"array","items":{"type":"string"}},"requiredScopes":{"type":"array","items":{"type":"string","enum":["read","write","ai"]}},"requiredPlanTier":{"anyOf":[{"type":"string","enum":["coach","coach_plus"]},{"type":"null"}]},"requiredCapabilities":{"type":"array","items":{"type":"string"}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","label","description","routePrefixes","status","currentHeadlessAccess","recommendedMcpTools","requiredScopes"],"additionalProperties":false},"HeadlessCapabilitiesResponse":{"type":"object","properties":{"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/HeadlessCapability"}}},"required":["capabilities"],"additionalProperties":false},"BroadcastPreviewInput":{"type":"object","properties":{"segmentKey":{"type":"string","minLength":1}},"required":["segmentKey"],"additionalProperties":false},"CreateBroadcastInput":{"type":"object","properties":{"segmentKey":{"type":"string","minLength":1},"content":{"type":"string","minLength":1}},"required":["segmentKey","content"],"additionalProperties":false},"UpdateGrowthRecommendationStatusInput":{"type":"object","properties":{"status":{"type":"string","enum":["open","dismissed","completed"]}},"required":["status"],"additionalProperties":false},"CreateProgramInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["name"],"additionalProperties":false},"CreateProgramCohortInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"startsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"capacity":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["name"],"additionalProperties":false},"ProgramDripItemInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["lesson","assignment","check_in","email"]},"releaseOffsetDays":{"type":"integer","minimum":0}},"required":["title"],"additionalProperties":false},"CreateProgramModuleInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"integer","minimum":0},"releaseOffsetDays":{"type":"integer","minimum":0},"dripItems":{"type":"array","items":{"$ref":"#/components/schemas/ProgramDripItemInput"}}},"required":["title"],"additionalProperties":false},"ProgramEnrollmentInput":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["contactId"],"additionalProperties":false},"CreateProgramAssignmentInput":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid"},"moduleId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"dripItemId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["contactId"],"additionalProperties":false},"CreateProgramCheckinInput":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid"},"prompt":{"type":"string","minLength":1},"dueAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["contactId","prompt"],"additionalProperties":false},"CreatePrioritySupportRequestInput":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":80},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["type"],"additionalProperties":false},"AuditLogEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actorId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"actorEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"action":{"type":"string"},"targetType":{"type":"string"},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"changes":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"tokenId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"source":{"type":"string","enum":["browser","pat","webhook","internal"]},"requestId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ipAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","action","targetType","source","createdAt"],"additionalProperties":false},"AuditLogListResponse":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogEntry"}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["entries","pagination"],"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"eventTypes":{"type":"array","items":{"type":"string","enum":["booking_confirmed","booking_rescheduled","booking_cancelled","session_completed","client_inactive","new_lead","payment_received","form_submitted","site_asset_updated","booking_configuration_updated"]}},"enabled":{"type":"boolean"},"enabledAt":{"type":"string","format":"date-time"},"disabledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failureCount":{"type":"integer","minimum":0},"lastDeliveryAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","url","eventTypes","enabled","enabledAt","failureCount","createdAt","updatedAt"],"additionalProperties":false},"CreateWebhookEndpointInput":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"eventTypes":{"type":"array","items":{"type":"string","enum":["booking_confirmed","booking_rescheduled","booking_cancelled","session_completed","client_inactive","new_lead","payment_received","form_submitted","site_asset_updated","booking_configuration_updated"]},"default":[]}},"required":["url"],"additionalProperties":false},"UpdateWebhookEndpointInput":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"eventTypes":{"type":"array","items":{"type":"string","enum":["booking_confirmed","booking_rescheduled","booking_cancelled","session_completed","client_inactive","new_lead","payment_received","form_submitted","site_asset_updated","booking_configuration_updated"]}},"enabled":{"type":"boolean"}},"required":[],"additionalProperties":false},"WebhookEndpointSecretResponse":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/WebhookEndpoint"},"signingSecret":{"type":"string","example":"whsec_..."}},"required":["webhook","signingSecret"],"additionalProperties":false},"WebhookEndpointResponse":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/WebhookEndpoint"}},"required":["webhook"],"additionalProperties":false},"WebhookEndpointListResponse":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["webhooks"],"additionalProperties":false},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"endpointId":{"type":"string","format":"uuid"},"eventType":{"type":"string"},"payload":{"type":"object","additionalProperties":true},"requestId":{"type":"string"},"attempt":{"type":"integer","minimum":0},"status":{"type":"string","enum":["pending","succeeded","failed","exhausted"]},"responseStatus":{"anyOf":[{"type":"integer"},{"type":"null"}]},"responseBody":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","endpointId","eventType","payload","requestId","attempt","status","createdAt"],"additionalProperties":false},"WebhookDeliveryListResponse":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}},"required":["deliveries"],"additionalProperties":false},"WebhookDeliveryResponse":{"type":"object","properties":{"delivery":{"$ref":"#/components/schemas/WebhookDelivery"}},"required":["delivery"],"additionalProperties":false}}}}