Skip to main content

Documentation Index

Fetch the complete documentation index at: https://usenaive.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Social is the distribution primitive. Naive wraps a social media service behind a consistent API so agents can connect social media accounts, create and publish posts across multiple platforms, schedule content, and retrieve analytics — all without custom OAuth flows or frontend components.

CLI First

# Activate and connect a platform
naive social activate
naive social connect --platform twitter --redirect-url https://your-app.com/callback

# Create and publish a post
naive social post "Launching our new product today" --platforms twitter,linkedin --publish

Tools

ToolTypeDescriptionCost
social_activateSetupActivate social media for the companyFree
social_connectSetupGet OAuth URL for a single platformFree
social_portalSetupGet portal URL for multi-platform connectFree
social_statusInfoCheck activation + connected accountsFree
social_accountsInfoList connected accountsFree
social_syncInfoSync connected accountsFree
social_create_postCoreCreate and optionally publish a post1 credit (if publishing)
social_publish_postCorePublish a draft1 credit
social_uploadCoreUpload media from URLFree
social_list_postsInfoList posts with status filterFree
social_get_postInfoGet post detailsFree
social_edit_postCoreEdit a draft postFree
social_delete_postCoreDelete a postFree
social_post_analyticsInfoGet post performance metricsFree
social_post_commentsInfoGet post commentsFree
social_account_analyticsInfoGet account-level analyticsFree
social_disconnectSetupDisconnect an accountFree

Activation

Before posting, social media must be activated for the company.
curl -X POST https://api.usenaive.ai/v1/social/activate \
  -H "Authorization: Bearer nv_sk_your_key"
Response:
{
  "activated": true,
  "team_count": 1,
  "bundle_team_id": "team-uuid"
}

Connecting Accounts

The API returns an OAuth URL. The user or agent opens this URL in a browser to authorize the social account. No custom frontend is needed.

Single Platform

curl -X POST https://api.usenaive.ai/v1/social/connect \
  -H "Authorization: Bearer nv_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"platform": "TWITTER", "redirect_url": "https://your-app.com/callback"}'
Response:
{
  "url": "https://social.usenaive.ai/connect/twitter?..."
}

Multi-Platform Portal

For connecting several platforms at once, use the portal endpoint:
curl -X POST https://api.usenaive.ai/v1/social/portal \
  -H "Authorization: Bearer nv_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"redirect_url": "https://your-app.com/callback"}'
After the user connects accounts, call POST /v1/social/sync to refresh the local account list.

Creating Posts

curl -X POST https://api.usenaive.ai/v1/social/posts \
  -H "Authorization: Bearer nv_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Check out our latest product update!",
    "platforms": ["TWITTER", "LINKEDIN"],
    "publish_now": true
  }'
Response (202):
{
  "id": "post-uuid",
  "bundle_post_id": "bundle-uuid",
  "status": "publishing",
  "platforms": ["TWITTER", "LINKEDIN"],
  "scheduled_at": null,
  "hint": "Post queued for immediate publishing. Check status with GET /v1/social/posts/post-uuid"
}

Parameters

ParamTypeRequiredDefaultDescription
contentstringYesPost text content
titlestringNoAuto from contentPost title (auto-generated if omitted)
platformsstring[]YesPlatforms to post to
platform_dataobjectNoAuto-generatedPer-platform overrides (see Platform Defaults below)
media_urlsstring[]NoMedia URLs — auto-uploaded and attached to video/image platforms
youtube_typestringNo"SHORT"YouTube type: "SHORT" (vertical, under 3min) or "VIDEO" (landscape)
publish_nowbooleanNofalsePublish immediately
scheduled_atstringNoISO 8601 datetime to schedule
account_idsstring[]NoAll activeSpecific account UUIDs to post from
If neither publish_now nor scheduled_at is set, the post is created as a draft. Drafts can be edited and published later with POST /v1/social/posts/:id/publish.

Video Post Example (YouTube + TikTok)

curl -X POST https://api.usenaive.ai/v1/social/posts \
  -H "Authorization: Bearer nv_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Our product demo",
    "platforms": ["YOUTUBE", "TIKTOK", "INSTAGRAM"],
    "media_urls": ["https://example.com/demo-video.mp4"],
    "youtube_type": "SHORT",
    "publish_now": true
  }'

Platform Defaults

When you omit platform_data, the API applies sensible defaults per platform. You can override any field by passing platform_data.
PlatformAuto-applied defaultsNotes
TWITTERtext truncated to 280 charsText-only platform
BLUESKYtext truncated to 300 charsText-only platform
YOUTUBEtext (100 char title), type (SHORT/VIDEO), privacy: "PUBLIC", madeForKids: falseRequires media. youtube_type controls SHORT vs VIDEO
TIKTOKtext, privacy: "PUBLIC_TO_EVERYONE"Requires media for video posts
INSTAGRAMtext, type: "REEL"Defaults to Reel for video
REDDITtext, title (100 char limit)Pass "sr" in platform_data for subreddit
PINTERESTtitle (100 char limit), textMedia recommended
LINKEDINtext (full content)No truncation
FACEBOOKtext (full content)No truncation
THREADStext (full content)No truncation
MASTODONtext (full content)No truncation

Overriding Defaults

Pass platform_data to customize per-platform behavior:
{
  "content": "Check out our launch",
  "platforms": ["TWITTER", "REDDIT", "YOUTUBE"],
  "platform_data": {
    "REDDIT": { "sr": "startups", "title": "We just launched!" },
    "YOUTUBE": { "text": "Product Launch Demo", "type": "VIDEO", "privacy": "PUBLIC" }
  },
  "media_urls": ["https://example.com/launch.mp4"],
  "publish_now": true
}
Overrides are merged on top of defaults — you only need to specify the fields you want to change.

Media Handling

When media_urls are provided, the server:
  1. Uploads each URL to the social media service (handles format conversion for unsupported types)
  2. Attaches uploadIds to all media-capable platforms: YouTube, Instagram, TikTok, Facebook, Pinterest
  3. Text-only platforms (Twitter, LinkedIn, Bluesky, Threads) are unaffected
No separate upload step is needed — just pass the public URLs.

Scheduling & Drafts

Omit both publish_now and scheduled_at to create a draft:
{
  "content": "Working on this post...",
  "platforms": ["TWITTER"]
}
Edit with PATCH /v1/social/posts/:id, then publish with POST /v1/social/posts/:id/publish.

Analytics

Retrieve performance metrics for published posts:
curl https://api.usenaive.ai/v1/social/posts/post-uuid/analytics \
  -H "Authorization: Bearer nv_sk_your_key"
Response:
{
  "post_id": "post-uuid",
  "analytics": { ... }
}
Analytics data varies by platform. The shape depends on which platforms the post was published to.
Account-level analytics:
curl https://api.usenaive.ai/v1/social/accounts/account-uuid/analytics \
  -H "Authorization: Bearer nv_sk_your_key"

Supported Platforms

PlatformKeyTypeCharacter Limit
Twitter/XTWITTERText + media280
LinkedInLINKEDINText + media
InstagramINSTAGRAMMedia (Reel default)
FacebookFACEBOOKText + media
TikTokTIKTOKVideo
YouTubeYOUTUBEVideo (SHORT/VIDEO)100 (title)
ThreadsTHREADSText
PinterestPINTERESTMedia + title100 (title)
RedditREDDITText + title100 (title)
BlueskyBLUESKYText300
MastodonMASTODONText

Error Handling

ErrorCauseRecovery
feature_not_configuredBUNDLE_SOCIAL_API_KEY not setConfigure the API key
invalid_inputSocial not activatedCall POST /v1/social/activate
invalid_inputMissing required fieldsCheck content, platforms params
resource_not_foundPost or account not foundVerify UUID
insufficient_creditsNot enough credits to publishTop up with POST /v1/billing/topup
provider_errorSocial media service errorRetry or check platform requirements

Typical Workflow

Agent receives task: "Post about our product launch on Twitter and LinkedIn"

    ├─ GET /v1/social/status                     → Check activation
    │   → activated: true, 3 accounts

    ├─ GET /v1/social/accounts                   → List connected accounts
    │   → Twitter, LinkedIn, Instagram connected

    ├─ POST /v1/social/posts                     → Create + publish
    │   { content: "We just launched...",
    │     platforms: ["TWITTER", "LINKEDIN"],
    │     publish_now: true }
    │   → id: post-uuid, status: scheduled

    ├─ GET /v1/social/posts/post-uuid            → Check status
    │   → status: publishing → published (via webhook)

    └─ GET /v1/social/posts/post-uuid/analytics  → Track performance
        → { impressions: 1200, likes: 45, ... }