Post Management API (NEW) Author : Josh, Lead Backend Team Last Updated : 2026-06-18 Version : v1.0 Base URL : https://api.nexgate.com/api/v1 Short Description : The Posts Management API provides comprehensive social media posting functionality including creating posts, polls, quote posts, drafts management, media attachments, commerce integrations, collaboration features, and engagement interactions (likes, bookmarks, reposts, comments). This API enables users to create rich content with privacy controls and scheduled publishing. Hints : All endpoints require authentication via Bearer token unless specified Draft posts follow a "one draft at a time" rule - publish or discard before creating new Posts support text content, media (images/videos), polls, and commerce attachments Privacy settings control visibility, comment permissions, and repost permissions Collaborative posts require accepted invitations from collaborators Pagination is 1-indexed (page=1 for first page), default size is 20 items Poll votes can be changed if poll allows it (allowVoteChange setting) Standard Response Format All API responses follow a consistent structure using our Globe Response Builder pattern: Success Response Structure { "success": true, "httpStatus": "OK", "message": "Operation completed successfully", "action_time": "2025-09-23T10:30:45", "data": { // Actual response data goes here } } Error Response Structure { "success": false, "httpStatus": "BAD_REQUEST", "message": "Error description", "action_time": "2025-09-23T10:30:45", "data": "Error description" } Standard Response Fields Field Type Description success boolean Always true for successful operations, false for errors httpStatus string HTTP status name (OK, BAD_REQUEST, NOT_FOUND, etc.) message string Human-readable message describing the operation result action_time string ISO 8601 timestamp of when the response was generated data object/string Response payload for success, error details for failures Common Response Structure for POST/PUT Operations Most POST and PUT operations return a PostResponse object. For brevity, this documentation references the detailed PostResponse structure defined below instead of repeating it for each endpoint. Standard Success Response for Post Creation/Update: { "success": true, "httpStatus": "OK", "message": "[Operation-specific message]", "action_time": "2025-12-11T10:30:45", "data": { // PostResponse object - see "PostResponse Structure" section below } } PostResponse Structure This is the standard response structure returned by most post-related endpoints: { "id": "550e8400-e29b-41d4-a716-446655440000", "author": { "id": "123e4567-e89b-12d3-a456-426614174000", "userName": "john_doe", "firstName": "John", "lastName": "Doe", "profilePictureUrl": "https://cdn.nexgate.com/profiles/john_doe/medium.webp", "profilePictureThumbnailUrl": "https://cdn.nexgate.com/profiles/john_doe/thumb.webp", "profilePictureBlurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6", "isVerified": true }, "content": "Check out this amazing product! @jane_doe #shopping", "contentParsed": { "text": "Check out this amazing product! @jane_doe #shopping", "entities": [ { "type": "MENTION", "text": "@jane_doe", "startIndex": 33, "endIndex": 42, "user": { "id": "987e6543-e21b-12d3-a456-426614174999", "userName": "jane_doe", "firstName": "Jane", "lastName": "Doe", "profilePictureUrl": "https://cdn.nexgate.com/profiles/jane_doe/medium.webp", "profilePictureThumbnailUrl": "https://cdn.nexgate.com/profiles/jane_doe/thumb.webp", "profilePictureBlurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6" } }, { "type": "HASHTAG", "text": "#shopping", "startIndex": 43, "endIndex": 52, "hashtag": "shopping" } ] }, "postType": "REGULAR", "postKind": "ORIGINAL", "status": "PUBLISHED", "media": [ { "id": "a3f7c21b-09d4-4e8b-bf12-3c7d09e1f556", "mediaType": "IMAGE", "shortClip": false, "width": 1920, "height": 1080, "duration": null, "order": 0, "status": "READY", "variants": { "large": "https://cdn.nexgate.com/posts/owner123/fileabc/large.webp", "medium": "https://cdn.nexgate.com/posts/owner123/fileabc/medium.webp", "thumb": "https://cdn.nexgate.com/posts/owner123/fileabc/thumb.webp", "og": "https://cdn.nexgate.com/posts/owner123/fileabc/og.webp", "blurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6", "lqip": "data:image/webp;base64,/9j/4AAQ...", "dominant_color": "#C8A882" }, "imageTags": [] } ], "attachments": { "products": [], "shops": [], "events": [], "buyTogetherGroups": [], "installmentPlans": [], "externalLink": null }, "collaboration": { "isCollaborative": true, "collaborators": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "ACCEPTED", "invitedAt": "2024-01-15T10:00:00", "respondedAt": "2024-01-15T10:30:00", "user": { "id": "u1b2c3d4-e5f6-7890-abcd-ef1234567890", "userName": "john_doe", "firstName": "John", "lastName": "Doe", "profilePictureUrl": "https://cdn.nexgate.com/profiles/john_doe/medium.webp", "profilePictureThumbnailUrl": "https://cdn.nexgate.com/profiles/john_doe/thumb.webp", "profilePictureBlurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6" } }, { "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "status": "PENDING", "invitedAt": "2024-01-15T11:00:00", "respondedAt": null, "user": { "id": "u2c3d4e5-f6a7-8901-bcde-f12345678901", "userName": "current_user", "firstName": "Current", "lastName": "User", "profilePictureUrl": "https://cdn.nexgate.com/profiles/current_user/medium.webp", "profilePictureThumbnailUrl": "https://cdn.nexgate.com/profiles/current_user/thumb.webp", "profilePictureBlurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6" } } ], "byline": "By Jane Smith and 1 others", "currentUserStatus": "PENDING", "currentUserIsPendingCollaborator": true, "currentUserIsAcceptedCollaborator": false }, "privacySettings": { "visibility": "PUBLIC", "whoCanComment": "EVERYONE", "whoCanRepost": "EVERYONE", "hideLikesCount": false, "hideCommentsCount": false }, "engagement": { "likesCount": 0, "commentsCount": 0, "repostsCount": 0, "quotesCount": 0, "bookmarksCount": 0, "sharesCount": 0, "viewsCount": 0, "canLike": true, "canComment": true, "canRepost": true, "canShare": true }, "userInteraction": { "hasLiked": false, "hasBookmarked": true, "hasReposted": false, "myRepostId": null, "hasQuoted": true, "hasCommented": false, "hasViewed": true, "hasShared": false }, "topComments": [ { "id": "comment-001", "userId": "user-abc-123", "content": "This is amazing! πŸ”₯", "userName": "sarah_smith", "displayName": "Sarah Smith", "profilePictureUrl": "https://cdn.nexgate.com/profiles/sarah_smith/medium.webp", "profilePictureThumbnailUrl": "https://cdn.nexgate.com/profiles/sarah_smith/thumb.webp", "profilePictureBlurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6" }, { "id": "comment-002", "userId": "user-xyz-789", "content": "Where can I get this?", "userName": "mike_wilson", "displayName": "Mike Wilson", "profilePictureUrl": "https://cdn.nexgate.com/profiles/mike_wilson/medium.webp", "profilePictureThumbnailUrl": "https://cdn.nexgate.com/profiles/mike_wilson/thumb.webp", "profilePictureBlurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6" } ], "topLikers": [ { "userId": "user-abc-123", "userName": "john_doe", "displayName": "John Doe", "profilePictureUrl": "https://cdn.nexgate.com/profiles/john_doe/medium.webp", "profilePictureThumbnailUrl": "https://cdn.nexgate.com/profiles/john_doe/thumb.webp", "profilePictureBlurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6" }, { "userId": "user-xyz-789", "userName": "sarah_smith", "displayName": "Sarah Smith", "profilePictureUrl": "https://cdn.nexgate.com/profiles/sarah_smith/medium.webp", "profilePictureThumbnailUrl": "https://cdn.nexgate.com/profiles/sarah_smith/thumb.webp", "profilePictureBlurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6" } ], "topReposters": [ { "userId": "user-lmn-456", "userName": "mike_wilson", "displayName": "Mike Wilson", "profilePictureUrl": "https://cdn.nexgate.com/profiles/mike_wilson/medium.webp", "profilePictureThumbnailUrl": "https://cdn.nexgate.com/profiles/mike_wilson/thumb.webp", "profilePictureBlurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6" } ], "createdAt": "2025-12-11T10:30:45", "publishedAt": "2025-12-11T10:30:45", "scheduledAt": null } The example above shows all fields. The sections below show how media[] and poll differ per post type β€” all other fields (author, engagement, userInteraction, etc.) remain the same shape. Text-only Post media: [] , poll: null { "id": "550e8400-e29b-41d4-a716-446655440001", "postType": "REGULAR", "status": "PUBLISHED", "content": "Just launched something big. Stay tuned. πŸš€", "media": [], "poll": null, "publishedAt": "2025-12-11T10:30:45" } Image Post (single or carousel) media[].mediaType = "IMAGE" , shortClip: false , duration: null Each image in variants is ready immediately β€” no async processing needed. { "media": [ { "id": "a3f7c21b-09d4-4e8b-bf12-3c7d09e1f556", "mediaType": "IMAGE", "shortClip": false, "width": 1920, "height": 1080, "duration": null, "order": 0, "status": "READY", "variants": { "large": "https://cdn.nexgate.com/posts/john_doe/a3f7/large.webp", "medium": "https://cdn.nexgate.com/posts/john_doe/a3f7/medium.webp", "thumb": "https://cdn.nexgate.com/posts/john_doe/a3f7/thumb.webp", "og": "https://cdn.nexgate.com/posts/john_doe/a3f7/og.webp", "blurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6", "lqip": "data:image/webp;base64,/9j/4AAQ...", "dominant_color": "#C8A882" }, "imageTags": [] } ] } For a carousel, media[] contains multiple objects with order: 0 , order: 1 , etc. Short Video Post ( duration < 3 min ) media[].mediaType = "VIDEO" , shortClip: true β€” direct MP4 files, no HLS. Processing is async. Poll on status or rely on WebSocket push. PENDING (just created β€” variants empty): { "media": [ { "id": "v1d30abc-1234-5678-abcd-ef0123456789", "mediaType": "VIDEO", "shortClip": true, "width": 1080, "height": 1920, "duration": 45, "order": 0, "status": "PENDING", "variants": {} } ] } READY (all renditions done): { "media": [ { "id": "v1d30abc-1234-5678-abcd-ef0123456789", "mediaType": "VIDEO", "shortClip": true, "width": 1080, "height": 1920, "duration": 45, "order": 0, "status": "READY", "variants": { "360p_clean": "https://cdn.nexgate.com/posts/john_doe/v1d30/360p_clean.mp4", "720p_clean": "https://cdn.nexgate.com/posts/john_doe/v1d30/720p_clean.mp4", "1080p_clean": "https://cdn.nexgate.com/posts/john_doe/v1d30/1080p_clean.mp4", "preview": "https://cdn.nexgate.com/posts/john_doe/v1d30/preview.mp4", "thumb": "https://cdn.nexgate.com/posts/john_doe/v1d30/thumb.webp", "720p_watermarked": "https://cdn.nexgate.com/posts/john_doe/v1d30/720p_watermarked.mp4" } } ] } UI: show thumb + spinner while PENDING, play 720p_clean when READY, use preview for feed autoplay. Long Video Post ( duration >= 3 min , HLS) media[].mediaType = "VIDEO" , shortClip: false β€” adaptive HLS streaming. PENDING : { "media": [ { "id": "v2d40def-2345-6789-bcde-f01234567890", "mediaType": "VIDEO", "shortClip": false, "width": 1920, "height": 1080, "duration": 2400, "order": 0, "status": "PENDING", "variants": {} } ] } READY : { "media": [ { "id": "v2d40def-2345-6789-bcde-f01234567890", "mediaType": "VIDEO", "shortClip": false, "width": 1920, "height": 1080, "duration": 2400, "order": 0, "status": "READY", "variants": { "master": "https://cdn.nexgate.com/posts/john_doe/v2d40/hls/master.m3u8", "preview": "https://cdn.nexgate.com/posts/john_doe/v2d40/preview.mp4", "poster": "https://cdn.nexgate.com/posts/john_doe/v2d40/poster.webp", "thumb": "https://cdn.nexgate.com/posts/john_doe/v2d40/thumb.webp", "og": "https://cdn.nexgate.com/posts/john_doe/v2d40/og.webp", "blurhash": "LGF5?xYk^6#M@-5c,1J5@[or[Q6", "lqip": "data:image/webp;base64,/9j/4AAQ...", "dominant_color": "#1A1A2E" } } ] } master is an HLS master manifest β€” it contains 360p, 720p, and 1080p renditions inside it. Feed it into HLS.js (or native