API Reference

Laetium REST API

Get a Bearer token from /api/v1/auth/login, or an API key from Settings → API Keys.

Base URL

https://laetium.doombringerz.com

Pass Authorization: Bearer <token> on every authenticated request. Rate limit: 300 requests / 5 min per IP.

Authentication

/api/v1/auth

POST/api/v1/auth/register

Create a user account.

POST/api/v1/auth/login

Authenticate and receive access + refresh tokens.

POST/api/v1/auth/refresh

Exchange a refresh token for a new access token.

POST/api/v1/auth/logout

Revoke the current session.

POST/api/v1/auth/2fa/setup

Generate a TOTP secret and QR code URI.

POST/api/v1/auth/2fa/verify

Verify a TOTP code and enable 2FA.

POST/api/v1/auth/eclipsecp/sso

Exchange an EclipseCP SSO token for a Laetium session.

Workspaces

/api/v1/workspace

GET/api/v1/workspace/

Workspaces the authenticated user belongs to.

POST/api/v1/workspace/

Create a workspace.

GET/api/v1/workspace/:id

Workspace details and member list.

PATCH/api/v1/workspace/:id

Update workspace name, slug or branding.

POST/api/v1/workspace/:id/invite

Invite a user by email with a given role.

DELETE/api/v1/workspace/:id/members/:userId

Remove a member from the workspace.

Social accounts

/api/v1/social-accounts

GET/api/v1/social-accounts/

Connected social accounts in the current workspace.

DELETE/api/v1/social-accounts/:id

Disconnect a social account.

POST/api/v1/social-accounts/:id/refresh

Force-refresh OAuth tokens for an account.

Scheduler

/api/v1/posts

GET/api/v1/posts/

Scheduled and published posts, filterable by status, platform and date range.

POST/api/v1/posts/

Create a scheduled post.

POST/api/v1/posts/batch

Bulk-create posts from a CSV payload.

PATCH/api/v1/posts/:id

Update a draft or scheduled post.

DELETE/api/v1/posts/:id

Delete a post.

POST/api/v1/posts/:id/publish-now

Publish a scheduled post now.

Analytics

/api/v1/analytics

GET/api/v1/analytics/overview

Aggregate KPIs (followers, impressions, reach, engagement) for a date range.

GET/api/v1/analytics/top-posts

Top posts ranked by engagement rate, reach or likes.

GET/api/v1/analytics/heatmap

Engagement heatmap (hour × day of week).

GET/api/v1/analytics/best-times

Recommended posting times per platform.

GET/api/v1/analytics/audience

Audience demographics (age, gender, location), where the platform returns them.

Competitors

/api/v1/competitors

GET/api/v1/competitors/

Tracked competitor accounts.

POST/api/v1/competitors/

Add a public account to track.

DELETE/api/v1/competitors/:id

Remove a competitor from tracking.

GET/api/v1/competitors/:id/stats

Growth, posting frequency and engagement trends. Stat collection is not live yet, so this returns whatever has been recorded, which today is nothing.

Reports

/api/v1/reports

GET/api/v1/reports/

List reports and their schedules.

POST/api/v1/reports/

Create a report. Branding fields are refused while report branding is gated off.

GET/api/v1/reports/:id/download

Download a generated report. The PDF renderer is not running, so a report ends at FAILED and there is no file to return.

POST/api/v1/reports/schedules

Record a recurring delivery schedule. Nothing runs it while report scheduling is gated off.

DELETE/api/v1/reports/schedules/:id

Cancel a scheduled report.

API keys

/api/v1/api-keys

GET/api/v1/api-keys/

API keys for the current workspace.

POST/api/v1/api-keys/

Create an API key with scopes.

DELETE/api/v1/api-keys/:id

Revoke an API key.

Need help with the API?

Request body schemas, response shapes, and error codes on request.

contactlaetium@doombringerz.com →