Supporting pages, examples and technical details in a cleaner layout.
Complete documentation for all Militant API endpoints. You can also view the dynamic JSON endpoint list on /api/v1/index.php.
The API distinguishes between different roles, especially for moderation and live streaming:
is_admin = 1. Has access to admin/ panel and technician tools.LIVEKIT_TECHNICIAN_USER_IDS or is_admin = 1.| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/auth.php | POST | Login and obtain a token |
| /api/v1/auth.php?action=register | POST | Create an account |
| /api/v1/auth.php?action=forgot_password | POST | Request a password reset email |
| /api/v1/auth.php?action=reset_password | POST | Set a new password with the token received by email |
| /api/v1/auth.php?action=refresh | POST | Refresh a token |
| /api/v1/auth.php?action=revoke | POST | Revoke a token |
Notes:
username or email in the username fieldtotp to the request bodyforgot_password expects {"email": "user@example.org"} and always returns a generic message to avoid account enumerationreset_password expects {"token": "...", "password": "new_password"}; the password must be at least 8 characters long| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/users.php | GET | Get your own profile |
| /api/v1/users.php?id={id} | GET | Get a profile by ID |
| /api/v1/users.php | PUT | Update your profile |
| /api/v1/settings.php | GET | Get the public API settings (OneSignal, WebRTC STUN/TURN) |
| /api/v1/change_password.php | POST | Change your password |
| /api/v1/user_preferences.php | GET | Get your preferences |
| /api/v1/user_preferences.php | PUT | Update your preferences |
| /api/v1/delete_account.php | POST | Request account deletion with email confirmation |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/posts.php | GET | Get the news feed (followed accounts by default) |
| /api/v1/posts.php?feed_type=global | GET | Get the public global feed |
| /api/v1/posts.php?user_id={id} | GET | Get a user's wall (posts + shares) |
| /api/v1/posts.php?id={id} | GET | Get post details |
| /api/v1/posts.php | POST | Create a post |
| /api/v1/posts.php?id={id} | PUT | Edit a post |
| /api/v1/posts.php?id={id} | DELETE | Delete a post |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/comments.php?post_id={id} | GET | Get comments for a post |
| /api/v1/comments.php | POST | Create a comment or reply (parent_id optional) |
| /api/v1/comments.php?id={id} | PUT | Edit a comment |
| /api/v1/comments.php?id={id} | DELETE | Delete a comment |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/group_comments.php?post_id={id} | GET | Get group post comments |
| /api/v1/group_comments.php | POST | Create a group comment or reply (parent_id optional) |
| /api/v1/group_comments.php | PUT | Edit a group comment (body id) |
| /api/v1/group_comments.php?id={id} | DELETE | Delete a group comment |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/comment_reactions.php?comment_id={id}&comment_type={type} | GET | Get reactions for a comment |
| /api/v1/comment_reactions.php | POST | Add a reaction to a comment |
| /api/v1/comment_reactions.php?comment_id={id}&comment_type={type} | DELETE | Remove a reaction |
Comment types: post, group, page
Reaction types: like, love, haha, wow, sad, angry
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/reactions.php?post_id={id} | GET | Get reactions |
| /api/v1/reactions.php | POST | Add a reaction |
| /api/v1/reactions.php?post_id={id} | DELETE | Remove a reaction |
Types: like, love, haha, wow, sad, angry
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/group_reactions.php | POST | Add a reaction to a group post |
| /api/v1/group_reactions.php?post_id={id} | DELETE | Remove a reaction |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/follows.php?user_id={id}&type=followers | GET | Get followers |
| /api/v1/follows.php?user_id={id}&type=following | GET | Get following |
| /api/v1/follows.php | POST | Follow a user |
| /api/v1/follows.php?user_id={id} | DELETE | Unfollow a user |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/friends.php | GET | Combined list of friends and received requests |
| /api/v1/friends.php?type=friends | GET | Friends list |
| /api/v1/friends.php?type=pending | GET | Pending received requests |
| /api/v1/friends.php | POST | Send a request (action=send) |
| /api/v1/friends.php | POST | Accept a request (action=accept) |
| /api/v1/friends.php | POST | Reject a request (action=reject) |
| /api/v1/friends.php?user_id={id} | DELETE | Remove a friend |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/messages.php | GET | Get conversations |
| /api/v1/messages.php?user_id={id} | GET | Get messages with a user |
| /api/v1/messages.php | POST | Send a message (parent_id optional) |
| /api/v1/messages.php?action=react | POST | Add or replace a reaction on a private message |
| /api/v1/messages.php?id={id} | PUT | Edit a message |
| /api/v1/messages.php?id={id} | DELETE | Delete a message |
| /api/v1/messages.php?action=react&message_id={id} | DELETE | Remove your reaction from a private message |
| /api/v1/messages.php?user_id={id} | DELETE | Delete an entire conversation |
Additional fields returned in message lists:
parent_idparent_contentparent_sender_usernamereactions_summaryuser_reaction| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/message_groups.php | GET | Get groups |
| /api/v1/message_groups.php?path={id} | GET | Group details |
| /api/v1/message_groups.php?path={id}/messages | GET | Group messages |
| /api/v1/message_groups.php | POST | Create a group |
| /api/v1/message_groups.php?path={id}/messages | POST | Send a message (parent_id optional) |
| /api/v1/message_groups.php?path={id}/members | POST | Add a member |
| /api/v1/message_groups.php?path={id}/requests/{request_id}/approve | POST | Approve an access request |
| /api/v1/message_groups.php?path={id}/requests/{request_id}/reject | POST | Reject an access request |
| /api/v1/message_groups.php?path=messages/{id}/reactions | POST | Add or replace a reaction on a group message |
| /api/v1/message_groups.php?path=messages/{id} | PUT | Edit a group message |
| /api/v1/message_groups.php?path={id} | PUT | Update a message group |
| /api/v1/message_groups.php?path=messages/{id} | DELETE | Delete a group message |
| /api/v1/message_groups.php?path=messages/{id}/reactions | DELETE | Remove your reaction from a group message |
| /api/v1/message_groups.php?path={id}/members/{user_id} | DELETE | Remove a member |
| /api/v1/message_groups.php?path={id} | DELETE | Leave the group |
Additional fields returned in group messages:
parent_idparent_contentparent_usernamereactions_summaryuser_reaction| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/notifications.php | GET | Get notifications |
| /api/v1/notifications.php?unread=true | GET | Get unread notifications only |
| /api/v1/notifications.php?id={id} | PUT | Mark as read |
| /api/v1/notifications.php | PUT | Mark all as read (mark_all=true in the JSON body) |
| /api/v1/notifications.php?action=test | POST | Send a test notification |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/search.php?q={query} | GET | Search everything |
| /api/v1/search.php?q={query}&type=users | GET | Search users |
| /api/v1/search.php?q={query}&type=posts | GET | Search posts |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/discover.php | GET | Suggestions (users, groups, pages) |
| /api/v1/discover.php?type=users | GET | User suggestions |
| /api/v1/discover.php?type=groups | GET | Group suggestions |
| /api/v1/discover.php?type=pages | GET | Page suggestions |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/feature_suggestions.php | GET | List suggestions |
| /api/v1/feature_suggestions.php?filter=popular | GET | Suggestions sorted by score |
| /api/v1/feature_suggestions.php?filter=recent | GET | Recent suggestions |
| /api/v1/feature_suggestions.php?filter=planned | GET | Planned or in-progress suggestions |
| /api/v1/feature_suggestions.php?filter=done | GET | Completed suggestions |
| /api/v1/feature_suggestions.php?id={id} | GET | Suggestion details with comments |
| /api/v1/feature_suggestions.php?action=stats | GET | Statistics by status |
| /api/v1/feature_suggestions.php | POST | Create a suggestion |
| /api/v1/feature_suggestions.php?action=vote | POST | Vote up or down |
| /api/v1/feature_suggestions.php?action=comment | POST | Comment on a suggestion |
| /api/v1/feature_suggestions.php?action=update_status | POST | Update status and admin response |
| /api/v1/feature_suggestions.php?id={id} | DELETE | Delete a suggestion |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/likes.php | POST | Like a post |
| /api/v1/likes.php?post_id={id} | DELETE | Remove your like |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/stories.php | GET | Get active stories from followed accounts and yourself |
| /api/v1/stories.php?user_id={id} | GET | Get active stories for a user |
| /api/v1/stories.php | POST | Create a story |
| /api/v1/stories.php?id={id} | DELETE | Delete a story |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/groups.php | GET | Get joined groups |
| /api/v1/groups.php?discover=1 | GET | Discover public groups |
| /api/v1/groups.php?id={id} | GET | Group details |
| /api/v1/groups.php?id={id}&members=1 | GET | Group members |
| /api/v1/groups.php | POST | Create a group |
| /api/v1/groups.php | POST | Join a group (action=join) |
| /api/v1/groups.php | POST | Invite a user (action=invite) |
| /api/v1/groups.php | POST | Approve/Reject request (action=approve_request/reject_request) |
| /api/v1/groups.php | PUT | Update a group (body id) |
| /api/v1/groups.php?id={id} | DELETE | Leave a group |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/group_posts.php?group_id={id} | GET | Get posts for a group |
| /api/v1/group_posts.php | POST | Publish in a group |
| /api/v1/group_posts.php | PUT | Edit a group post (body id) |
| /api/v1/group_posts.php?id={id} | DELETE | Delete a group post |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/pages.php | GET | Get pages managed by the logged-in user |
| /api/v1/pages.php?id={id} | GET | Page details |
| /api/v1/pages.php?path={id}/posts | GET | Page posts |
| /api/v1/pages.php?path={id}/comments/{post_id} | GET | Comments for a page post |
| /api/v1/pages.php?path={id}/followers | GET | Page followers |
| /api/v1/pages.php?path={id}/team | GET | Page team |
| /api/v1/pages.php?discover=1 | GET | Discover pages |
| /api/v1/pages.php?followed=1 | GET | Pages followed by the logged-in user |
| /api/v1/pages.php | POST | Create a page |
| /api/v1/pages.php | POST | Follow a page (action=follow) |
| /api/v1/pages.php | POST | Unfollow a page (action=unfollow) |
| /api/v1/pages.php | POST | Publish on a page (action=create_post) |
| /api/v1/pages.php | POST | Comment on a page post (action=comment) |
| /api/v1/pages.php | POST | React to a page post (action=react) |
| /api/v1/pages.php | POST | Add a team member (action=add_team_member) |
| /api/v1/pages.php | POST | Update a page (action=update_page) |
| /api/v1/pages.php | PUT | Edit a page post (action=update_post) |
| /api/v1/pages.php | PUT | Edit a page comment (action=update_comment) |
| /api/v1/pages.php | DELETE | Unfollow a page (action=unfollow or page_id) |
| /api/v1/pages.php | DELETE | Delete a page post (action=delete_post) |
| /api/v1/pages.php | DELETE | Remove a team member (action=remove_team_member) |
| /api/v1/pages.php | DELETE | Remove a follower (action=remove_follower) |
| /api/v1/pages.php | DELETE | Delete a page comment (action=delete_comment) |
Publish on a page (POST /api/v1/pages.php)
{
"action": "create_post",
"page_id": 12,
"content": "Hello from the API",
"media": null,
"media_type": null
}
Minimum parameters:
action: create_postpage_id: page identifiercontent: publication text, optional if media is providedmedia: path or name of an already uploaded file, optionalmedia_type: media type (image, video, etc.), optionalPermissions:
page_admins for the targeted page| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/bookmarks.php | GET | Get bookmarks |
| /api/v1/bookmarks.php | POST | Add a bookmark |
| /api/v1/bookmarks.php?post_id={id} | DELETE | Remove a bookmark |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/shares.php | POST | Share a post (post_id required) |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/events.php | GET | Get upcoming events |
| /api/v1/events.php?id={id} | GET | Event details |
| /api/v1/events.php | POST | Create an event |
| /api/v1/events.php | POST | Join an event (action=join) |
| /api/v1/events.php?id={id} | DELETE | Leave an event |
| /api/v1/events.php?id={id}&action=delete | DELETE | Delete an event (author only) |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/albums.php | GET | Get your albums |
| /api/v1/albums.php?user_id={id} | GET | Get a user's albums |
| /api/v1/albums.php?id={id} | GET | Get album details with photos |
| /api/v1/albums.php | POST | Create an album |
| /api/v1/albums.php | POST | Add a photo (action=add_photo) |
| /api/v1/albums.php?id={id} | DELETE | Delete an album |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/lives.php | GET | Get active live streams |
| /api/v1/lives.php?path={id} | GET | Live stream details |
| /api/v1/lives.php?path={id}/comments | GET | Live comments |
| /api/v1/lives.php?path={id}/guests | GET | Live guests |
| /api/v1/lives.php | POST | Start a live stream |
| /api/v1/lives.php?path=token | POST | Issue a LiveKit token (auth required) |
| /api/v1/lives.php?path={id}/comments | POST | Comment |
| /api/v1/lives.php?path={id}/join | POST | Join as a viewer |
| /api/v1/lives.php?path={id}/request-guest | POST | Request to join as a guest |
| /api/v1/lives.php?path={id}/report | POST | Report a live stream |
| /api/v1/lives.php?path={id}/background | PUT | Update the persisted live background image |
| /api/v1/lives.php?path={id}/end | POST | End a live stream (action=end in body) |
| /api/v1/lives.php?path={id}/end | PUT | End a live stream (deprecated) |
path=token)POST /api/v1/lives.php?path=token with header Authorization: Bearer {token} and JSON body:
roomName (string, required): LiveKit room nameidentity (string, required): unique participant idname (string, required): display namecanPublish (bool): true to publish (broadcaster), false for viewerJSON response: token (LiveKit JWT), url (server wss://), expires_in (seconds).
Server config: LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET env vars, or config/livekit.local.php (not in git). Web UI: /admin/livekit.php after logging in at /admin/login.php — technicians only (same as Militant web: users.is_admin = 1, managed in admin.php?tab=technicians; fallback is_technician or LIVEKIT_TECHNICIAN_USER_IDS).
TURN/WebRTC config: WEBRTC_TURN_URLS, WEBRTC_TURN_AUTH_SECRET, WEBRTC_TURN_TTL, WEBRTC_TURN_REALM env vars, or config/turn.local.php (not in git). Web UI: /admin/turn.php. GET /api/v1/settings.php returns stun_servers, turn_servers, and webrtc_ice_servers; when WEBRTC_TURN_AUTH_SECRET is set, TURN credentials are temporary (HMAC, compatible with coturn use-auth-secret).
path={id}/background)PUT /api/v1/lives.php?path={id}/background with header Authorization: Bearer {token} and JSON body:
background_image (string or null): path/URL of the background image to attach to the live streamBehavior:
null clears the persisted background imagesuccess and background_imageGET /api/v1/lives.php?path={id} may return background_image for late-joining viewers| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/reports.php | GET | Get reports (status=pending by default) |
| /api/v1/reports.php?status=resolved | GET | Get resolved reports |
| /api/v1/reports.php | POST | Create a report |
| /api/v1/reports.php | POST | Vote on a report (report_id, vote) |
| /api/v1/reports.php | POST | Apply a direct moderation action (moderator_action) |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/moderators.php | GET | Get moderators, candidates, and actions |
| /api/v1/moderators.php?type=candidates | GET | Get candidates only |
| /api/v1/moderators.php?type=moderators | GET | Get moderators only |
| /api/v1/moderators.php?type=actions | GET | Get action history |
| /api/v1/moderators.php | POST | Apply as a candidate |
| /api/v1/moderators.php | POST | Vote for or against a candidate (candidate_id, vote) |
| /api/v1/moderators.php | DELETE | Withdraw your candidacy |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/sanctions.php | GET | Get your sanctions |
| /api/v1/sanctions.php?type=all | GET | Get public warnings and bans |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/upload.php | POST | Upload a file as multipart/form-data (max 100MB) |
Supported types: jpg, png, gif, webp, mp4, webm, mov, mp3, wav, m4a
Expected fields:
mediatype among posts, stories, messages, avatar, banner, group, groups, group_post, page, pages, event, album| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/export.php | GET | Export all your data (GDPR) |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/two_factor.php | GET | 2FA status and setup secret if 2FA is not enabled yet |
| /api/v1/two_factor.php?action=enable | POST | Enable 2FA (TOTP) |
| /api/v1/two_factor.php | DELETE | Disable 2FA |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/user_preferences.php | PUT | Manage push notification and privacy preferences |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/translate.php | POST | Translate text (LibreTranslate) |
Parameters (POST):
text: text to translate (max 5000 chars)target_lang: target language (for example fr, en)See the full Translation guide
MILITANT supports the ActivityPub protocol — the open standard for decentralized social networks (Mastodon, Pleroma, Misskey, PeerTube…).
MILITANT users can be found from any Fediverse instance using their address:
@username@your-domain.com
This uses the WebFinger protocol exposed at:
GET /.well-known/webfinger?resource=acct:username@your-domain.com
Each user has a JSON-LD Person profile accessible via:
GET /fediverse/actor.php?username={username}
Accept: application/activity+json
Response includes: identity, bio, avatar, banner, inbox, outbox, RSA public key.
The 20 latest public posts of a user are available in ActivityPub format:
GET /fediverse/outbox.php?username={username}
Accept: application/activity+json
GET /fediverse/followers.php?username={username} → Main collection (total count)
GET /fediverse/followers.php?username={username}&page=1 → Page 1 of followers
---
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/fediverse.php?action=profile | GET | Own Fediverse profile |
| /api/v1/fediverse.php?action=profile&user_id={id} | GET | Another user's Fediverse profile |
| /api/v1/fediverse.php?action=followers | GET | Own Fediverse followers (paginated) |
| /api/v1/fediverse.php?action=followers&user_id={id} | GET | Another user's Fediverse followers |
| /api/v1/fediverse.php?action=following | GET | Own remote Fediverse following list (paginated) |
| /api/v1/fediverse.php?action=following&user_id={id} | GET | Another user's remote Fediverse following list |
| /api/v1/fediverse.php?action=feed | GET | Feed of posts from followed remote Fediverse accounts |
| /api/v1/fediverse.php?action=feed&refresh=1 | GET | Refresh followed remote outboxes before returning the feed |
| /api/v1/fediverse.php?action=search_remote&q={handle} | GET | Resolve or search a remote Fediverse account |
| /api/v1/fediverse.php?action=remote_profile&q={handle_or_actor_url} | GET | Resolve a single remote Fediverse profile with recent posts |
| /api/v1/fediverse.php?action=follow_remote | POST | Follow a remote Fediverse account |
| /api/v1/fediverse.php?action=unfollow_remote | DELETE | Unfollow a remote Fediverse account |
#### Response action=profile
{
"user_id": 42,
"username": "anar",
"actor_id": "https://domain.com/users/anar",
"fediverse_handle": "@anar@domain.com",
"fediverse_active": true,
"followers_count": 17,
"following_count": 9,
"is_remote": false,
"account_type": "local"
}
#### Response action=feed
{
"posts": [
{
"id": 12,
"remote_post_id": "https://mastodon.social/@alex/1143596789",
"original_url": "https://mastodon.social/@alex/1143596789",
"actor_url": "https://mastodon.social/users/alex",
"username": "alex",
"display_name": "Alex",
"domain": "mastodon.social",
"handle": "@alex@mastodon.social",
"avatar": "https://mastodon.social/system/accounts/avatars/...",
"content": "Hello Fediverse
",
"media_url": null,
"media_type": null,
"published_at": "2026-04-19 10:10:00",
"created_at": "2026-04-19 10:12:00",
"profile_url": "https://mastodon.social/@alex",
"is_remote": true,
"account_type": "remote"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 1,
"total_pages": 1
},
"synced_posts": 3
}
#### Response action=remote_profile
{
"actor_url": "https://mastodon.social/users/alex",
"username": "alex",
"display_name": "Alex",
"domain": "mastodon.social",
"handle": "@alex@mastodon.social",
"avatar": "https://mastodon.social/system/accounts/avatars/...",
"summary": "Union organizer and developer",
"profile_url": "https://mastodon.social/@alex",
"is_following": true,
"is_remote": true,
"account_type": "remote",
"recent_posts": [
{
"remote_post_id": "https://mastodon.social/@alex/1143596789",
"content": "Hello Fediverse
",
"published_at": "2026-04-19 10:10:00"
}
]
}
For POST /api/v1/fediverse.php?action=follow_remote and DELETE /api/v1/fediverse.php?action=unfollow_remote, the JSON body may contain one of these fields:
{
"handle": "@alex@mastodon.social"
}
or:
{
"actor_url": "https://mastodon.social/users/alex"
}
> Note: GET /api/v1/users.php also returns fediverse_actor_id, fediverse_followers_count, fediverse_following_count, fediverse_handle, is_remote, and account_type.
| Feature | Status | |---|---| | WebFinger discovery | ✅ Implemented | | Actor JSON-LD profile | ✅ Implemented | | Auto-generated RSA keys | ✅ Implemented | | Public post feed (Outbox) | ✅ Implemented | | Inbox (receiving activities) | ✅ Implemented | | Outgoing HTTP Signatures | ✅ Implemented | | Incoming signature verification | ✅ Implemented | | Signed Accept(Follow) response | ✅ Implemented | | Remote followers persisted in DB | ✅ Implemented | | Remote following persisted in DB | ✅ Implemented | | Remote profile resolution | ✅ Implemented | | Remote follow / unfollow via API | ✅ Implemented | | Remote feed synchronization and storage | ✅ Implemented |
All requests are rate-limited by endpoint:
| Endpoint | Limit | |----------|-------| | Auth | 50 req/h | | Posts | 100 req/h | | Comments | 150 req/h | | Comment Reactions | 200 req/h | | Messages | 200 req/h | | Likes/Reactions | 200 req/h | | Group Reactions | 200 req/h | | Upload | 50 req/h | | Export | 5 req/h | | Others | 100 req/h |
Warning: Exclusive to the Flutter mobile app - Requires the header X-Flutter-App: militant-flutter-v1
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/calls.php?action=initiate_talk | POST | Invite a group to a Nextcloud Talk room |
| /api/v1/calls.php?action=initiate | POST | Start a 1-to-1 or group call |
| /api/v1/calls.php?action=answer | POST | Answer a call |
| /api/v1/calls.php?action=join | POST | Join a group call |
| /api/v1/calls.php?action=peer_offer | POST | Send a WebRTC offer (group) |
| /api/v1/calls.php?action=peer_answer | POST | Send a WebRTC answer (group) |
| /api/v1/calls.php?action=ice_candidate | POST | Exchange ICE candidates |
| /api/v1/calls.php?action=ice_restart | POST | Restart ICE (network change) |
| /api/v1/calls.php?action=reject | POST | Reject a call |
| /api/v1/calls.php?action=leave | POST | Leave a group call without ending it |
| /api/v1/calls.php?action=end | POST | End a call |
| /api/v1/calls.php?action=poll | GET | Poll for updates |
| /api/v1/calls.php?action=history | GET | Call history |
Start a private call:
POST /api/v1/calls.php?action=initiate
Headers:
Authorization: Bearer {token}
X-Flutter-App: militant-flutter-v1
Body:
{
"recipient_id": 123,
"call_type": "audio",
"offer": "v=0\r\no=- 123456..."
}
Start a group call:
POST /api/v1/calls.php?action=initiate
Headers:
Authorization: Bearer {token}
X-Flutter-App: militant-flutter-v1
Body:
{
"group_id": 456,
"call_type": "video",
"offer": "v=0\r\no=- 123456..."
}