API Reference
Laetium REST API
Get a Bearer token from /api/v1/auth/login.
Base URL
https://laetium.doombringerz.comPass Authorization: Bearer <token> on every authenticated request. Rate limit per IP: 20 requests a second, 300 a minute, 5,000 an hour. Workspace-scoped routes read the workspace from an X-Workspace-Id header.
Authentication
/api/v1/auth
/api/v1/auth/registerCreate a user account.
/api/v1/auth/loginAuthenticate. Returns an access token and sets the refresh token as an HttpOnly cookie.
/api/v1/auth/refreshExchange a refresh token for a new access token.
/api/v1/auth/logoutRevoke every session of the signed-in user.
/api/v1/auth/me/2fa/setupGenerate a TOTP secret and QR code URI.
/api/v1/auth/me/2fa/enableVerify a TOTP code and enable 2FA.
/api/v1/auth/2fa/verifySecond login step with 2FA on: exchange the temporary token and a TOTP code for a session.
/api/v1/auth/eclipsecp/ssoExchange an EclipseCP SSO token for a Laetium session.
Workspaces
/api/v1/workspaces
/api/v1/workspaces/Workspaces the authenticated user belongs to.
/api/v1/workspaces/Create a workspace.
/api/v1/workspaces/:idWorkspace details and member list.
/api/v1/workspaces/:idUpdate workspace name, slug or branding.
/api/v1/workspaces/:id/membersInvite a user by email with a given role.
/api/v1/workspaces/:id/members/:userIdRemove a member from the workspace.
Social accounts
/api/v1/platforms
/api/v1/platforms/accountsConnected social accounts in the current workspace.
/api/v1/platforms/accounts/:idDisconnect a social account.
/api/v1/platforms/accounts/:id/syncRe-read an account's profile, refreshing its token first if it has expired.
Scheduler
/api/v1/posts
/api/v1/posts/calendarPosts scheduled between two dates.
/api/v1/posts/Create a scheduled post.
/api/v1/posts/batchCreate up to 50 posts for one account, spread over time.
/api/v1/posts/import-csvCreate posts from an uploaded CSV file.
/api/v1/posts/:idUpdate a draft or scheduled post.
/api/v1/posts/:id/rescheduleMove a post to a new time.
/api/v1/posts/:id/retryRetry a failed post.
/api/v1/posts/:idDelete a post.
/api/v1/posts/best-timesHours of the day ranked by the engagement of one account's posts.
Analytics
/api/v1/analytics
/api/v1/analytics/overviewAggregate KPIs (followers, impressions, reach, engagement) for one account over the last N days.
/api/v1/analytics/top-postsTop posts ranked by engagement rate, reach, impressions or likes.
/api/v1/analytics/heatmapEngagement heatmap (hour × day of week).
/api/v1/analytics/demographicsAudience demographics (age, gender, location), where the platform returns them.
Competitors
/api/v1/competitors
/api/v1/competitors/Tracked competitor accounts.
/api/v1/competitors/Add a public account to track.
/api/v1/competitors/:idRemove a competitor from tracking.
/api/v1/competitors/:id/snapshotsRecorded stats for a competitor. Stat collection is not live yet, so this returns whatever has been recorded, which today is nothing.
Reports
/api/v1/reports
/api/v1/reports/List reports.
/api/v1/reports/Create a report. Branding and schedule fields are refused while report branding is gated off.
/api/v1/reports/:id/generateRender a report to PDF. PDF rendering is not live yet.
/api/v1/reports/:idDelete a report.
Need help with the API?
Request body schemas, response shapes, and error codes on request.
contactlaetium@doombringerz.com →
