Skip to main content

API Reference

Overview

AssocHub exposes 200+ REST API endpoints across 11 modules.

  • Base URL: http://localhost:8002/api/v1 (local) or https://ams.14.jugaar.ai/api/v1 (live)
  • Authentication: JWT Bearer token in Authorization header
  • Content-Type: application/json (except file uploads which use multipart/form-data)
  • Interactive Docs: http://localhost:8002/docs (Swagger UI)

Quick Reference

Auth (7 endpoints)

MethodEndpointDescription
POST/auth/registerRegister new user
POST/auth/loginLogin, get JWT token
GET/auth/meGet current user profile
POST/auth/refreshRefresh access token
POST/auth/logoutInvalidate token
POST/auth/change-passwordChange password
POST/auth/forgot-passwordRequest password reset

Members (26 endpoints)

MethodEndpointDescription
GET/members/List members (paginated)
POST/members/Create member
GET/members/meCurrent user profile
GET/members/statsMember statistics
GET/members/searchSearch members
GET/members/exportExport CSV/JSON
POST/members/importImport from CSV
GET/members/{id}Get member by ID
PUT/members/{id}Update member
DELETE/members/{id}Delete member
GET/members/groupsList groups
POST/members/groupsCreate group
POST/members/groups/{id}/membersAdd to group
DELETE/members/groups/{id}/members/{mid}Remove from group
GET/members/tagsList tags
POST/members/tagsCreate tag
POST/members/{id}/tagsAdd tag
DELETE/members/{id}/tags/{tag}Remove tag
POST/members/bulk/add-tagsBulk add tags
POST/members/bulk/remove-tagsBulk remove tags
POST/members/bulk/change-statusBulk status change
GET/members/{id}/activityActivity log
POST/members/{id}/notesAdd staff note
GET/members/{id}/notesList notes
PUT/members/{id}/notes/{nid}Update note
DELETE/members/{id}/notes/{nid}Delete note

Finances (20 endpoints)

MethodEndpointDescription
GET/finances/finances/invoicesList invoices
POST/finances/finances/invoicesCreate invoice
GET/finances/finances/invoices/statsInvoice stats
GET/finances/finances/invoices/{id}Get invoice
PUT/finances/finances/invoices/{id}Update invoice
DELETE/finances/finances/invoices/{id}Void invoice
POST/finances/finances/invoices/{id}/payRecord payment
GET/finances/finances/expensesList expenses
POST/finances/finances/expensesSubmit expense
PUT/finances/finances/expenses/{id}/approveApprove
PUT/finances/finances/expenses/{id}/rejectReject
GET/finances/finances/duesList dues structures
POST/finances/finances/duesCreate dues
GET/finances/finances/budgetsList budgets
POST/finances/finances/budgetsCreate budget
GET/finances/finances/reportsFinancial reports
GET/finances/finances/reports/summaryRevenue summary
POST/finances/finances/payments/create-checkoutStripe checkout
POST/finances/finances/payments/webhookStripe webhook
GET/finances/finances/payments/historyPayment history

Events (15 endpoints)

MethodEndpointDescription
GET/events/List events
POST/events/Create event
GET/events/statsEvent stats
GET/events/{id}Get event
PUT/events/{id}Update event
DELETE/events/{id}Cancel event
POST/events/{id}/publishPublish event
GET/events/{id}/ticketsList tickets
POST/events/{id}/ticketsCreate ticket
POST/events/{id}/registerRegister for event
POST/events/{id}/check-inCheck in attendee
GET/events/{id}/sessionsList sessions
POST/events/{id}/sessionsCreate session
GET/events/{id}/speakersList speakers
POST/events/{id}/feedbackSubmit feedback

Communications (16 endpoints)

MethodEndpointDescription
GET/communications/campaignsList campaigns
POST/communications/campaignsCreate campaign
GET/communications/campaigns/{id}Get campaign
PUT/communications/campaigns/{id}Update campaign
POST/communications/campaigns/{id}/sendSend campaign
POST/communications/campaigns/{id}/duplicateDuplicate
GET/communications/announcementsList announcements
POST/communications/announcementsCreate announcement
GET/communications/surveysList surveys
POST/communications/surveysCreate survey
POST/communications/surveys/{id}/respondSubmit response
GET/communications/templatesList templates
POST/communications/templatesCreate template
GET/communications/notificationsList notifications
POST/communications/notifications/mark-readMark as read
GET/communications/send-logsSend history

Elections (15 endpoints)

MethodEndpointDescription
GET/elections/List elections
POST/elections/Create election
GET/elections/statsElection stats
GET/elections/{id}Get election
PUT/elections/{id}Update election
DELETE/elections/{id}Delete election
POST/elections/{id}/start-nominationsOpen nominations
POST/elections/{id}/close-nominationsClose nominations
GET/elections/{id}/positionsList positions
POST/elections/{id}/positionsCreate position
POST/elections/{id}/nominateSubmit nomination
PUT/elections/{id}/nominations/{nid}/acceptAccept
PUT/elections/{id}/nominations/{nid}/declineDecline
POST/elections/{id}/voteCast vote
POST/elections/{id}/closeClose election

Documents (13 endpoints)

MethodEndpointDescription
GET/documents/List documents
POST/documents/Upload document
GET/documents/statsDocument stats
GET/documents/{id}Get document
PUT/documents/{id}Update metadata
DELETE/documents/{id}Delete document
GET/documents/{id}/versionsList versions
POST/documents/{id}/versionsUpload new version
GET/documents/categoriesList categories
POST/documents/categoriesCreate category
POST/documents/{id}/shareShare document
POST/documents/{id}/commentsAdd comment
GET/documents/{id}/commentsList comments

Workflows (11 endpoints)

MethodEndpointDescription
GET/workflows/List workflows
POST/workflows/Create workflow
GET/workflows/statsWorkflow stats
GET/workflows/{id}Get workflow
PUT/workflows/{id}Update workflow
DELETE/workflows/{id}Delete workflow
POST/workflows/{id}/activateActivate
POST/workflows/{id}/deactivatePause
POST/workflows/{id}/triggerManually trigger
GET/workflows/{id}/runsView run history
GET/workflows/templatesList templates

AI Engine (11 endpoints)

MethodEndpointDescription
GET/ai/modelsList models
POST/ai/chatChat with AI
POST/ai/insightsGenerate insights
GET/ai/insightsGet cached insights
POST/ai/predict/churnPredict churn
POST/ai/detect/anomaliesDetect anomalies
POST/ai/embeddingsCreate embeddings
POST/ai/search/semanticSemantic search
POST/ai/generate/documentGenerate document
POST/ai/generate/emailGenerate email
GET/ai/usageUsage stats

Analytics (12 endpoints)

MethodEndpointDescription
GET/analytics/overviewDashboard overview
GET/analytics/dashboardsList dashboards
POST/analytics/dashboardsCreate dashboard
GET/analytics/dashboards/{id}Get dashboard
PUT/analytics/dashboards/{id}Update dashboard
DELETE/analytics/dashboards/{id}Delete dashboard
POST/analytics/dashboards/{id}/widgetsAdd widget
GET/analytics/reportsList reports
POST/analytics/reportsCreate report
GET/analytics/reports/{id}Get report
GET/analytics/reports/{id}/exportExport report
GET/analytics/kpisKPI time-series

Integrations (12 endpoints)

MethodEndpointDescription
GET/integrations/List integrations
POST/integrations/Create integration
GET/integrations/{id}Get integration
PUT/integrations/{id}Update integration
DELETE/integrations/{id}Delete integration
POST/integrations/{id}/testTest integration
GET/integrations/webhooksList webhooks
POST/integrations/webhooksCreate webhook
PUT/integrations/webhooks/{id}Update webhook
DELETE/integrations/webhooks/{id}Delete webhook
POST/integrations/webhooks/{id}/testTest webhook
GET/integrations/dashboardDashboard

Health (3 endpoints)

MethodEndpointDescription
GET/healthSystem health check
GET/health/readyReadiness probe
GET/health/liveLiveness probe