Skip to main content

Publishing API

The Publishing API covers platform connection state, scheduling, and publish execution.

Integration endpoints

Each supported platform exposes connection-state, auth-url, callback, and disconnect routes.

Instagram:

  • GET /api/v1/integrations/instagram
  • GET /api/v1/integrations/instagram/auth-url
  • GET /api/v1/integrations/instagram/callback
  • DELETE /api/v1/integrations/instagram

TikTok:

  • GET /api/v1/integrations/tiktok
  • GET /api/v1/integrations/tiktok/auth-url
  • GET /api/v1/integrations/tiktok/callback
  • DELETE /api/v1/integrations/tiktok

X:

  • GET /api/v1/integrations/twitter
  • GET /api/v1/integrations/twitter/auth-url
  • GET /api/v1/integrations/twitter/callback
  • DELETE /api/v1/integrations/twitter

YouTube:

  • GET /api/v1/integrations/youtube
  • GET /api/v1/integrations/youtube/auth-url
  • GET /api/v1/integrations/youtube/callback
  • DELETE /api/v1/integrations/youtube

Pinterest:

  • GET /api/v1/integrations/pinterest
  • GET /api/v1/integrations/pinterest/auth-url
  • GET /api/v1/integrations/pinterest/callback
  • DELETE /api/v1/integrations/pinterest
  • GET /api/v1/integrations/pinterest/boards
  • PATCH /api/v1/integrations/pinterest/default-board

Start an OAuth flow

curl "https://api.influgen.ai/api/v1/integrations/instagram/auth-url?redirect=/settings" \
-H "Authorization: Bearer $ACCESS_TOKEN"

Example response:

{
"url": "https://www.facebook.com/v18.0/dialog/oauth?client_id=..."
}

Schedule generation

Scheduling routes:

  • POST /api/v1/schedule/generate
  • GET /api/v1/schedule
  • GET /api/v1/schedule/history
  • PATCH /api/v1/schedule/{id}
  • POST /api/v1/schedule/{id}/publish-now
  • POST /api/v1/content/{id}/schedule

Generate a smart schedule:

curl https://api.influgen.ai/api/v1/schedule/generate \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"character_id": "char_01HZX6FQJ5N6E7T2M3A4B5C6D7",
"start_date": "2026-03-23T09:00:00Z"
}'

Example response:

{
"timezone": "America/New_York",
"scheduledPosts": [
{
"content_id": "cnt_01HZX6V1P2Q3R4S5T6U7V8W9X0",
"platform": "instagram",
"status": "pending",
"scheduled_at": "2026-03-23T14:30:00Z"
}
]
}

Schedule one approved content item

curl https://api.influgen.ai/api/v1/content/cnt_01HZX6V1P2Q3R4S5T6U7V8W9X0/schedule \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"scheduled_at": "2026-03-23T14:30:00Z",
"platforms": ["instagram", "pinterest"]
}'

This route only accepts content items that are already approved or published.

Publish now

curl -X POST https://api.influgen.ai/api/v1/schedule/sch_01HZX73K8M9N0P1Q2R3S4T5U6V/publish-now \
-H "Authorization: Bearer $ACCESS_TOKEN"

Example response:

{
"scheduled_post": {
"id": "sch_01HZX73K8M9N0P1Q2R3S4T5U6V",
"status": "published",
"remote_post_id": "17894561234567890"
},
"publish_result": {
"remote_post_id": "17894561234567890",
"media_urls": [
"https://cdn.example.com/content/mila-rooftop.jpg"
]
}
}

Public API publish

Agency keys can publish approved content through:

  • POST /api/v1/public/publish
curl https://api.influgen.ai/api/v1/public/publish \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content_id": "cnt_01HZX6V1P2Q3R4S5T6U7V8W9X0",
"platform": "instagram"
}'

That route creates or updates a scheduled post and then immediately attempts publishing.