Skip to content

Social

Send a URL and a list of platforms. You get one content_id that holds a caption and image per platform, in the project's brand voice. Each platform costs 0.6 credits. Publishing is free.

Your serverBrainpercent
  1. Your server to Brainpercent: POST /api/v1/social/generateA URL and a list of platforms. Needs write.
  2. Brainpercent to Your server: 202 with one content_id0.6 credits are charged per platform.
  3. Your server to Brainpercent: GET /api/v1/social/content/{id}Repeat until the job finishes.
  4. Brainpercent to Your server: status: completedOr partial or failed. A failed job is refunded.
  5. Your server to Brainpercent: POST /api/v1/social/publishFree. Needs a connected account.
  6. Brainpercent to Your server: 202 status: publishingWith scheduled_at the answer is status scheduled.
MethodPathNeeds
GET/api/v1/social/contentread
GET/api/v1/social/content/{id}read
POST/api/v1/social/generatewrite. 0.6 credits per platform.
POST/api/v1/social/publishwrite. Free. Needs a connected account.

Platforms and statuses

Platform values: instagram, facebook, linkedin, twitter, threads, tiktok, bluesky, pinterest, google_business, telegram.

statusMeaning
generatingCaptions and images are being made. platforms is still an array of names.
completedDone. platforms is an object of captions keyed by platform.
partialSome platforms finished, some failed. Publish what is there or regenerate in the app.
scheduledQueued to publish at a set time
publishedSent to the connected accounts
failedNothing usable. The charge for failed platforms is refunded.

Filter values accepted by ?status=: draft, queued, generating, ready, completed, partial, scheduled, published, failed.

GET/api/v1/social/content

Your social content, newest first, paginated.

Query parameters

NameTypeRequiredDescription
pageintegerOptional1-based page Default 1.
limitintegerOptional1 to 100 Default 20.
platformstringOptionalOnly items that have a caption for this platform
statusstringOptionalOne of the statuses above
project_iduuidOptionalOnly this project
article_iduuidOptionalOnly items made from this article
Request
curl "https://www.brainpercent.app/api/v1/social/content?platform=linkedin&limit=5" \
  -H "Authorization: Bearer $BP_KEY"
200Response
{
  "success": true,
  "data": [
    {
      "id": "754422e1-ec5b-8e82-bee7-55817ff304a1",
      "article_id": null,
      "project_id": "1f8b4518-128d-4b2c-8b81-aa3939dbb7b5",
      "title": "How to dial in a cold brew ratio at home",
      "status": "completed",
      "source_url": "https://northwind.coffee/blog/cold-brew-ratio",
      "source_type": "website",
      "language": "en",
      "platforms": {
        "linkedin": "Most home cold brew is too weak. Start at 1:8…"
      },
      "image_urls": {
        "linkedin": "https://…supabase.co/storage/v1/object/public/…/linkedin.png"
      },
      "video_urls": null,
      "scheduled_publish_at": null,
      "error_message": null,
      "created_at": "2026-10-28T09:12:00+00:00",
      "updated_at": "2026-10-28T09:14:31+00:00"
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "limit": 5,
    "total_pages": 1,
    "has_more": false
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}
GET/api/v1/social/content/:id

One item with everything needed to post it: captions, images, videos, first comments, thread items, carousel plans, progress and publishing state. Poll this after generate.

Request
curl https://www.brainpercent.app/api/v1/social/content/754422e1-ec5b-8e82-bee7-55817ff304a1 \
  -H "Authorization: Bearer $BP_KEY"
200Response
{
  "success": true,
  "data": {
    "id": "754422e1-ec5b-8e82-bee7-55817ff304a1",
    "status": "completed",
    "processing_stage": "Your post is ready",
    "processing_progress": 100,
    "platforms": {
      "linkedin": "Most home cold brew is too weak. Start at 1:8…",
      "instagram": "Cold brew, done right ☕…"
    },
    "image_urls": {
      "linkedin": "https://…/linkedin.png",
      "instagram": "https://…/instagram.png"
    },
    "first_comments": {
      "linkedin": "Full guide: northwind.coffee/blog/cold-brew-ratio"
    },
    "instagram_carousel_plan": null,
    "is_published": false,
    "late_dev_post_id": null,
    "error_message": null
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}

The example is trimmed. The full field list: id, article_id, project_id, title, status, source_url, source_type, source_author, language, platforms, image_urls, video_urls, overlay_urls, first_comments, thread_items, one carousel plan per platform (instagram, linkedin, tiktok, facebook, twitter, threads, bluesky, telegram), processing_stage, processing_progress, scheduled_publish_at, is_published, late_dev_post_id, error_message, created_at, updated_at.

POST/api/v1/social/generate

Read a public page and write a post for each platform, with an image, in the project's brand voice and language. Charges 0.6 credits per platform before the job starts; platforms that fail are refunded. Needs write. Returns 202 with one content_id for every platform; most jobs finish within a few minutes.

Request body

NameTypeRequiredDescription
source_urlstring (URL)RequiredA public http(s) page: an article, product page, landing page
platformsstring[]Required1 to 10 platform values
project_iduuidOptionalProject to write as. Defaults to your active project.
source_typestringOptionalwebsite, blog or youtube Default website.
anglestringOptionalA direction, for example "aim at small cafe owners" (max 500)
titlestringOptionalA title for the item (max 200). Defaults to the URL.
Request
curl -X POST https://www.brainpercent.app/api/v1/social/generate \
  -H "Authorization: Bearer $BP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_url": "https://northwind.coffee/blog/cold-brew-ratio",
    "platforms": ["linkedin", "instagram"],
    "project_id": "1f8b4518-128d-4b2c-8b81-aa3939dbb7b5"
  }'
202Response
{
  "success": true,
  "data": {
    "content_id": "754422e1-ec5b-8e82-bee7-55817ff304a1",
    "status": "generating",
    "platforms": [
      "linkedin",
      "instagram"
    ],
    "credits_deducted": 1.2,
    "credits_remaining": null,
    "poll_url": "/api/v1/social/content/754422e1-ec5b-8e82-bee7-55817ff304a1"
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}
StatusCodeWhen
400VALIDATION_ERRORBad URL, unknown platform, or more than 10 platforms
400NO_PROJECTNo project_id and no project on the account. Create one in the app.
402INSUFFICIENT_CREDITSThe wallet cannot cover every platform. Nothing was charged. Top up or send fewer platforms.
409CONFLICTThe post price changed while the request was being prepared. Send it again.
403FORBIDDENThe key lacks write
429RATE_LIMIT_EXCEEDEDToo many generation jobs in a short burst. Wait and retry.
402INSUFFICIENT_CREDITS
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "Not enough credits for this post. Top up and try again."
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}
POST/api/v1/social/publish

Post a finished item to the social accounts connected in the app, now or at a set time. Free. Needs write. Accounts are connected in the app under Connections; there is no API for connecting them.

Request body

NameTypeRequiredDescription
content_iduuidRequiredFrom generate
platformsstring[]OptionalOnly these platforms. Defaults to every platform on the item.
scheduled_atISO 8601 with offsetOptionalFor example 2026-11-03T09:00:00Z or 2026-11-03T09:00:00-05:00. A time without Z or an offset is rejected. Omit to publish now.
timezonestringOptionalIANA zone, for example America/New_York. Used only with scheduled_at. Default UTC.
Request
curl -X POST https://www.brainpercent.app/api/v1/social/publish \
  -H "Authorization: Bearer $BP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content_id": "754422e1-ec5b-8e82-bee7-55817ff304a1"}'
202Response
{
  "success": true,
  "data": {
    "content_id": "754422e1-ec5b-8e82-bee7-55817ff304a1",
    "status": "publishing",
    "profiles": 1
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}
200Scheduled (207 when some channels failed)
{
  "success": true,
  "data": {
    "content_id": "754422e1-ec5b-8e82-bee7-55817ff304a1",
    "status": "scheduled",
    "scheduled_at": "2026-11-03T14:00:00.000Z",
    "timezone": "America/New_York",
    "scheduled_channels": [
      "linkedin"
    ],
    "failed_channels": []
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}
StatusCodeWhen
202Publish now accepted. Poll the item until status is published; processing_stage says what happened per channel.
200 / 207Scheduled. 207 means some channels were scheduled and failed_channels lists the rest.
409CONFLICTAlready published
412PRECONDITION_FAILEDStill generating, no caption for any platform, or no connected account
502INTERNAL_ERRORScheduling failed on every channel; the message lists why

Publishing goes through the connected accounts on your account. If a platform is not connected, that platform is skipped or fails; connect it at brainpercent.app under Connections first. See Connect a platform.