Growth

Social Media

CognitionDesk's Social Media module lets you generate AI-powered content, schedule posts, and publish directly to Facebook Pages and Instagram Business accounts via the Meta Marketing API.

Supported platforms

Facebook PagesInstagram Business

AI content generation

Generate platform-optimized posts, captions, and hashtags using your configured AI model:

JSON
POST /social/generate
Authorization: Bearer <token>

{
  "platform": "instagram",
  "topic": "New product launch — EcoBottle",
  "tone": "enthusiastic",
  "includeHashtags": true,
  "language": "en"
}

// Response
{
  "post": {
    "caption": "🌊 Meet EcoBottle — the future of hydration is here!...",
    "hashtags": ["#EcoBottle", "#SustainableLiving", "#HydrationGoals"],
    "suggestedMedia": "lifestyle photo of product in outdoor setting"
  }
}

Schedule a post

Posts are scheduled using node-cron on the backend. They publish automatically at the scheduled time:

JSON
POST /social/posts/schedule
Authorization: Bearer <token>

{
  "platform": "facebook",
  "pageId": "page_abc123",
  "content": "Check out our latest collection! ✨",
  "mediaUrls": ["https://s3.amazonaws.com/..."],
  "scheduledAt": "2026-04-01T10:00:00Z",
  "timezone": "America/New_York"
}

Publish immediately

JSON
POST /social/posts/publish
Authorization: Bearer <token>

{
  "platform": "instagram",
  "accountId": "ig_abc123",
  "caption": "New drop is LIVE! 🔥 #NewArrivals",
  "imageUrl": "https://s3.amazonaws.com/..."
}

Content Library

Save posts and media for reuse. The library supports tagging, filtering, and usage tracking:

MethodEndpointDescription
POST/content/postsSave a post to the content library
GET/content/postsList saved posts
PUT/content/posts/:postIdUpdate a saved post
DELETE/content/posts/:postIdDelete a saved post
POST/content/posts/:postId/useMark a post as used
POST/content/media/uploadUpload media file
GET/content/mediaBrowse media library
DELETE/content/media/:mediaIdDelete media item
Social Media — CognitionDesk Docs