definitions: github_com_AgileExecutives_serverbase_internal_models.APIResponse: properties: data: {} error: type: string message: type: string success: type: boolean type: object github_com_AgileExecutives_serverbase_internal_models.ContactFormRequest: description: Contact form submission request properties: email: example: john.doe@example.com type: string message: example: I am interested in learning more about your therapy services. type: string name: example: John Doe type: string newsletter: example: true type: boolean source: example: website type: string subject: example: Inquiry about therapy services type: string timestamp: example: "2025-08-03T10:00:00Z" type: string required: - email - message - name - source - subject type: object github_com_AgileExecutives_serverbase_internal_models.ErrorResponse: properties: code: type: integer details: type: string error: type: string type: object github_com_AgileExecutives_serverbase_internal_models.ListResponse: properties: data: {} pagination: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.PaginationResponse' type: object github_com_AgileExecutives_serverbase_internal_models.LoginRequest: properties: email: type: string password: type: string required: - email - password type: object github_com_AgileExecutives_serverbase_internal_models.LoginResponse: properties: token: type: string user: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.UserResponse' type: object github_com_AgileExecutives_serverbase_internal_models.Newsletter: properties: createdAt: example: "2025-08-03T10:00:00Z" type: string email: example: john.doe@example.com type: string id: example: 1 type: integer interest: example: mental_health type: string lastContact: example: "2025-08-03T10:00:00Z" type: string name: example: John Doe type: string source: example: website type: string updatedAt: example: "2025-08-03T10:00:00Z" type: string type: object github_com_AgileExecutives_serverbase_internal_models.PaginationResponse: properties: limit: type: integer page: type: integer total: type: integer total_pages: type: integer type: object github_com_AgileExecutives_serverbase_internal_models.TenantResponse: properties: created_at: type: string customer_id: type: integer id: type: integer name: type: string slug: type: string type: object github_com_AgileExecutives_serverbase_internal_models.UserCreateRequest: properties: accept_terms: description: Terms and conditions acceptance type: boolean company_name: description: Required unless user-signup token is present type: string email: type: string first_name: type: string last_name: type: string newsletter_opt_in: description: Newsletter subscription type: boolean password: type: string role: type: string username: type: string required: - email - first_name - last_name - password - username type: object github_com_AgileExecutives_serverbase_internal_models.UserResponse: properties: active: type: boolean created_at: type: string email: type: string email_verified: type: boolean email_verified_at: type: string first_name: type: string id: type: integer last_name: type: string organization_id: type: integer role: type: string tenant: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.TenantResponse' tenant_id: type: integer username: type: string type: object models.Contact: properties: active: type: boolean city: type: string country: type: string created_at: type: string email: type: string first_name: type: string id: type: integer last_name: type: string mobile: type: string notes: type: string phone: type: string street: type: string type: type: string updated_at: type: string zip: type: string required: - first_name - last_name type: object models.ContactCreateRequest: properties: city: type: string country: type: string email: type: string first_name: type: string last_name: type: string mobile: type: string notes: type: string phone: type: string street: type: string type: type: string zip: type: string required: - first_name - last_name type: object models.ContactResponse: properties: active: type: boolean city: type: string country: type: string created_at: type: string email: type: string first_name: type: string id: type: integer last_name: type: string mobile: type: string notes: type: string phone: type: string street: type: string type: type: string zip: type: string type: object models.ContactUpdateRequest: properties: active: type: boolean city: type: string country: type: string email: type: string first_name: type: string last_name: type: string mobile: type: string notes: type: string phone: type: string street: type: string type: type: string zip: type: string type: object models.UserSettings: properties: created_at: type: string id: type: integer language: description: User User `gorm:"foreignKey:UserID" json:"user,omitempty"` // Disabled for migration type: string settings: type: string theme: type: string timezone: type: string updated_at: type: string user_id: type: integer required: - user_id type: object models.UserSettingsUpdateRequest: properties: language: type: string settings: type: string theme: type: string timezone: type: string type: object utils.PasswordRequirements: properties: capital: type: boolean minLength: type: integer numbers: type: boolean special: type: boolean type: object info: contact: {} description: Authentication, contacts, health, and user settings endpoints. title: AE SaaS Base API version: 1.0.0 paths: /auth/change-password: post: consumes: - application/json description: Change password for authenticated user operationId: changePassword parameters: - description: Password change request in: body name: request required: true schema: properties: current_password: type: string new_password: type: string type: object produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Change password tags: - authentication /auth/check-reset-token/{token}: get: description: Validate a password reset token to check if it's valid and not expired operationId: checkResetToken parameters: - description: Reset token in: path name: token required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: properties: email: type: string valid: type: boolean type: object type: object "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' summary: Check password reset token tags: - authentication /auth/check-verification-token/{token}: get: description: Validate an email verification token to check if it's valid and not expired operationId: checkVerificationToken parameters: - description: Verification token in: path name: token required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: properties: email: type: string user_id: type: integer valid: type: boolean type: object type: object "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' summary: Check email verification token tags: - authentication /auth/forgot-password: post: consumes: - application/json description: Send password reset email to user operationId: forgotPassword parameters: - description: User email in: body name: request required: true schema: properties: email: type: string type: object produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' summary: Request password reset tags: - authentication /auth/login: post: consumes: - application/json description: Authenticate user with username/email and password operationId: login parameters: - description: Login credentials in: body name: credentials required: true schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.LoginRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.LoginResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' summary: User login tags: - authentication /auth/logout: post: consumes: - application/json description: Logout user and invalidate token operationId: logout produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: User logout tags: - authentication /auth/me: get: consumes: - application/json description: Get current authenticated user information operationId: getCurrentUser produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.UserResponse' type: object "401": description: Unauthorized schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Get current user tags: - authentication /auth/new-password/{token}: post: consumes: - application/json description: Reset user password with reset token operationId: resetPassword parameters: - description: Reset token in: path name: token required: true type: string - description: New password in: body name: request required: true schema: properties: new_password: type: string type: object produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' summary: Reset password tags: - authentication /auth/password-security: get: consumes: - application/json description: Returns the current password security requirements including minimum length and character requirements operationId: getPasswordSecurity produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/utils.PasswordRequirements' summary: Get password security requirements tags: - authentication /auth/refresh: post: consumes: - application/json description: Refresh user access token operationId: refreshToken produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.LoginResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Refresh access token tags: - authentication /auth/register: post: consumes: - application/json description: Register a new user account operationId: register parameters: - description: User registration data in: body name: user required: true schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.UserCreateRequest' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.LoginResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' summary: User registration tags: - authentication /auth/verify-email/{token}: get: consumes: - application/json description: Verify user email address with verification token operationId: verifyEmail parameters: - description: Verification token in: path name: token required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' summary: Verify email address tags: - authentication /contacts: get: consumes: - application/json description: Get paginated list of contacts with optional filters operationId: getContacts parameters: - default: 1 description: Page number in: query name: page type: integer - default: 20 description: Items per page in: query name: limit type: integer - description: Filter by active status in: query name: active type: boolean - description: Filter by contact type (business, personal, etc) in: query name: type type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ListResponse' type: object "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Get all contacts tags: - contacts post: consumes: - application/json description: Create a new contact for the authenticated user operationId: createContact parameters: - description: Contact data in: body name: contact required: true schema: $ref: '#/definitions/models.ContactCreateRequest' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/models.ContactResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Create new contact tags: - contacts /contacts/{id}: delete: consumes: - application/json description: Soft delete a contact by ID operationId: deleteContact parameters: - description: Contact ID (UUID) in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Delete contact tags: - contacts get: consumes: - application/json description: Get a specific contact by ID operationId: getContactById parameters: - description: Contact ID (UUID) in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/models.Contact' type: object "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Get contact by ID tags: - contacts put: consumes: - application/json description: Update an existing contact by ID operationId: updateContact parameters: - description: Contact ID (UUID) in: path name: id required: true type: string - description: Updated contact data in: body name: contact required: true schema: $ref: '#/definitions/models.ContactUpdateRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/models.ContactResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Update contact tags: - contacts /contacts/form: post: consumes: - application/json description: Public endpoint to submit a contact form (no authentication required) operationId: submitContactForm parameters: - description: Contact form data in: body name: form required: true schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ContactFormRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' summary: Submit contact form tags: - contact-form /contacts/newsletter: get: consumes: - application/json description: Get all newsletter subscriptions operationId: getNewsletterSubscriptions produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.Newsletter' type: array "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Get newsletter subscriptions tags: - newsletter /contacts/newsletter/unsubscribe: delete: consumes: - application/json description: Unsubscribe an email address from the newsletter operationId: unsubscribeFromNewsletter parameters: - description: Email address to unsubscribe in: query name: email required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Unsubscribe from newsletter tags: - newsletter /health: get: description: Check the health status of the API and database operationId: healthCheck produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "503": description: Service Unavailable schema: additionalProperties: true type: object summary: Health check tags: - health /ping: get: description: Simple ping endpoint operationId: ping produces: - application/json responses: "200": description: pong schema: type: string summary: Ping check tags: - health /user-settings: get: consumes: - application/json description: Get settings for the authenticated user (creates default if not found) operationId: getUserSettings produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/models.UserSettings' type: object "401": description: Unauthorized schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Get user settings tags: - user-settings put: consumes: - application/json description: Update settings for the authenticated user operationId: updateUserSettings parameters: - description: Updated settings in: body name: settings required: true schema: $ref: '#/definitions/models.UserSettingsUpdateRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/models.UserSettings' type: object "400": description: Bad Request schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Update user settings tags: - user-settings /user-settings/reset: post: consumes: - application/json description: Reset user settings to default values operationId: resetUserSettings produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.APIResponse' - properties: data: $ref: '#/definitions/models.UserSettings' type: object "401": description: Unauthorized schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/github_com_AgileExecutives_serverbase_internal_models.ErrorResponse' security: - BearerAuth: [] summary: Reset user settings tags: - user-settings securityDefinitions: BearerAuth: description: 'JWT Bearer token – format: ''Bearer ''' in: header name: Authorization type: apiKey swagger: "2.0"