Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
description: 'Get API Key
## Blog2Social API
### One API 25+ Social Platforms
Connect, manage and publish content across 25+ social media, blogging and community platforms through a single integration. Instead of building and maintaining separate integrations for every platform, Blog2Social provides one centralized API for publishing text, links, images and videos at scale. Whether you are building a SaaS platform, CMS, marketing automation solution, agency dashboard, e-commerce platform or enterprise application, Blog2Social helps you automate social media publishing while reducing development effort and maintenance costs. ### Key Benefits
- One integration for 25+ social media and publishing platforms
- Publish content across multiple networks simultaneously
- Connect profiles, pages and groups through one API
- Support for text, links, images and videos
- Retrieve social media insights and performance metrics
- Automate publishing workflows and content distribution
- Scale from a single user to thousands of connected accounts
## Supported Platforms
Schedule, publish and manage content across social media, blogging, business and community platforms through a single API. Connect accounts, publish content, upload media, retrieve insights and automate social media distribution from one centralized interface. | Platform | Post Types | Media |
|-----------|-----------|-----------|
| Facebook | Posts, Reels | Links, Images, Videos |
| X | Posts | Links, Images, Videos |
| LinkedIn | Posts | Links, Images, Videos |
| Instagram | Posts | Images, Videos |
| Pinterest | Pins, Boards | Images, Videos |
| Reddit | Posts, Subreddits | Links, Images |
| Tumblr | Posts | Links, Images, Videos |
| Medium | Articles | Images |
| Telegram | Messages | Links, Images |
| TikTok | Posts | Images, Videos |
| YouTube | Videos, Shorts, Playlists | Videos |
| Vimeo | Videos | Videos |
| Bluesky | Posts | Links, Images |
| Threads | Posts | Links, Images, Videos |
| Mastodon | Posts | Links, Images, Videos |
| Discord | Messages | Images, Videos |
| Google Business Profile | Business Posts | Images |
| VK (VKontakte) | Posts | Links, Images |
| Xing | Posts | Links, Images |
| Blogger | Articles | Images |
| DEV.to | Articles | Images, Videos |
| Flickr | Media Posts | Images, Videos |
| Diigo | Bookmarks | Links |
| Bloglovin | Blog Posts | Images |
| Torial | Articles | Images |
| Ravelry | Posts | Images |
| Instapaper | Saved Content | Links |
| Band | Posts | Images |
| HumHub | Posts | Images |
The Blog2Social API provides a unified interface for publishing content across social media networks, blogging platforms, business networks, video platforms and community platforms. ---
### Platform Features
- Multi-network publishing
- Link, image and video publishing
- Profiles, pages and groups
- Boards, playlists and categories
- Post insights and analytics
- Video upload support
- Automated publishing workflows
---
# Quick Start Guide
Get your first social media post published in less than 5 minutes. ## Authentication Model
The API uses a two-layer authentication model:
service_token = your application
access_token = your user
Think of the service_token as your app key and the access_token as the user''s session token. Most API requests require both tokens. ## Prerequisites
- A free Blog2Social API account to get started. ## Step 1: Get Your API Key
Navigate to the My Apps section in your Blog2Social API Console and click Create App. Once the application has been created, copy the generated service_token and store it securely. The service_token uniquely identifies your application and is required for all API requests. ## Step 2: Authenticate User
POST /user/auth
Request:
```json
{
"service_token": "YOUR_SERVICE_TOKEN"
}
```
Response:
```json
{
"access_token": "USER_ACCESS_TOKEN",
"refresh_token": "REFRESH_TOKEN"
}
```
Save the access_token for all future API requests.'
version: 1.0.0
title: Blog2Social Video API
x-logo:
url: assets/image/b2slogo.png
backgroundColor: '#FFFFFF'
altText: Blog2Social API
servers:
- url: https://api.blog2social.com/rest/v1.0
tags:
- name: Video
paths:
/network/post/create/:
post:
tags:
- Video
summary: Get a Video Token
description: 'Receive a video token for a video post. This is a separate video-token initialization workflow and intentionally uses the trailing-slash path and the `items` property. It must not be merged with the standard `/network/post/create` publisher.
A response of 200 OK only means the progress of sending the post was successfully handled by our API. Please check the result of the post on the network.'
operationId: create
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/VideoPostObject'
example:
service_token: YOUR_SERVICE_TOKEN
access_token: YOUR_ACCESS_TOKEN
client_user_network_id: YOUR_CLIENT_USER_NETWORK_ID
items:
- client_user_network_id: 123
title: Post title
message: Hello from Blog2Social API!
postFormat: 2
customUrl: https://example.com/post
noCache: 0
tags:
- string
board: string
mediaObjects:
- type: {}
url: {}
is_retweet: 0
network_post_id: string
post_id: 123
make_threads: 0
ignore_link: 0
description: List of posts you want to create
x-codeSamples:
- lang: cURL
source: "curl -X POST https://api.blog2social.com/rest/v1.0/network/post/create/ \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"service_token\": \"YOUR_SERVICE_TOKEN\",\n \"access_token\": \"YOUR_ACCESS_TOKEN\",\n \"client_user_network_id\": YOUR_CLIENT_USER_NETWORK_ID,\n \"items\": [\n {\n \"client_user_network_id\": 123,\n \"title\": \"Post title\",\n \"message\": \"Hello from Blog2Social API!\",\n \"postFormat\": 2,\n \"customUrl\": \"https://example.com/post\",\n \"noCache\": 0,\n \"tags\": [\n \"string\"\n ],\n \"board\": \"string\",\n \"mediaObjects\": [\n {\n \"type\": {},\n \"url\": {}\n }\n ],\n \"is_retweet\": 0,\n \"network_post_id\": \"string\",\n \"post_id\": 123,\n \"make_threads\": 0,\n \"ignore_link\": 0\n }\n ]\n}'"
- lang: PHP
source: "<?php\n\n$payload = [\n 'service_token' => 'YOUR_SERVICE_TOKEN',\n 'access_token' => 'YOUR_ACCESS_TOKEN',\n 'client_user_network_id' => YOUR_CLIENT_USER_NETWORK_ID,\n 'items' => [\n [\n 'client_user_network_id' => 123,\n 'title' => 'Post title',\n 'message' => 'Hello from Blog2Social API!',\n 'postFormat' => 2,\n 'customUrl' => 'https://example.com/post',\n 'noCache' => 0,\n 'tags' => [\n 'string',\n ],\n 'board' => 'string',\n 'mediaObjects' => [\n [\n 'type' => [],\n 'url' => [],\n ],\n ],\n 'is_retweet' => 0,\n 'network_post_id' => 'string',\n 'post_id' => 123,\n 'make_threads' => 0,\n 'ignore_link' => 0,\n ],\n ],\n];\n\n$curl = curl_init('https://api.blog2social.com/rest/v1.0/network/post/create/');\n\ncurl_setopt_array($curl, [\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => [\n 'Content-Type: application/json',\n ],\n CURLOPT_POSTFIELDS => json_encode($payload),\n]);\n\n$response = curl_exec($curl);\n$error = curl_error($curl);\n\n$curl = null;\n\nif ($response === false) {\n throw new RuntimeException($error);\n}\n\necho $response;"
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
type: object
properties:
error:
type: integer
network_id:
type: integer
type:
type: integer
client_user_network_id:
type: integer
extra:
type: object
properties:
expired:
type: integer
description: return only when the authorisation is expired (value 1)
video_token:
type: string
video_upload_type:
type: integer
example:
- error: 0
network_id: 32
type: 0
client_user_network_id: 1234567
extra: []
video_token: abcedfghYOUR_CLIENT_USER_NETWORK_IDijklmnopq789012
video_upload_type: 0
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error_1002'
'401':
description: Unauthorized
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/error_401'
- $ref: '#/components/schemas/error_1001'
- $ref: '#/components/schemas/error_1003'
'500':
description: Interal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/error_500'
/video/upload:
post:
tags:
- Video
summary: Upload a Video
description: 'Upload the video file to our Video Server
After recieving a video_token, you will be able to upload your video in chunks to our video server. Make sure that the bytesize of the single chunks can be divided by 8 and that all chunks must have the same size (Except for the last chunk).'
operationId: video_upload
requestBody:
required: false
content:
multipart/form-data:
schema:
type: object
properties:
video_token:
type: string
description: The token you recieved for a video upload
max_count_chunks:
type: integer
description: The count of chunks you split your video in
current_chunk:
type: integer
description: The current chunk you want to upload
chunk:
type: string
format: binary
description: The binary video chunk file.
example:
video_token: YOUR_VIDEO_TOKEN
max_count_chunks: 1
current_chunk: 1
chunk: '@/path/to/file'
x-codeSamples:
- lang: cURL
source: "curl -X POST https://api-upload.blog2social.com/api/rest/v1.0/video/upload \\\n -F \"video_token=YOUR_VIDEO_TOKEN\" \\\n -F \"max_count_chunks=1\" \\\n -F \"current_chunk=1\" \\\n -F \"chunk=@/path/to/file.chunk\""
- lang: PHP
source: "<?php\n\n$curl = curl_init('https://api-upload.blog2social.com/api/rest/v1.0/video/upload');\n\ncurl_setopt_array($curl, [\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => [\n 'video_token' => 'YOUR_VIDEO_TOKEN',\n 'max_count_chunks' => 1,\n 'current_chunk' => 1,\n 'chunk' => new CURLFile('/path/to/file.chunk'),\n ],\n]);\n\n$response = curl_exec($curl);\n$error = curl_error($curl);\n\n$curl = null;\n\nif ($response === false) {\n throw new RuntimeException($error);\n}\n\necho $response;"
responses:
'200':
description: OK - The networks array only contains the errors for the networks your trying to post on, if the video failed to meet a specific requirement of that network
content:
application/json:
schema:
type: array
items:
type: object
properties:
error:
type: integer
networks:
type: array
items:
type: object
properties:
error:
type: integer
b2s_error_code:
type: string
network_id:
type: integer
client_user_network_id:
type: integer
instant_sharing:
type: integer
post_id:
type: integer
example:
error: 0
networks:
- error: 1
b2s_error_code: VIDEO_NETWORK_LENGTH | VIDEO_NETWORK_SIZE | VIDEO_NETWORK_FORMAT
network_id: 36
client_user_network_id: YOUR_CLIENT_USER_NETWORK_ID
instant_sharing: 0
post_id: 11
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error_1002'
'401':
description: Unauthorized
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/error_401'
- $ref: '#/components/schemas/error_1001'
- $ref: '#/components/schemas/error_1003'
'500':
description: Interal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/error_500'
servers:
- url: https://api-upload.blog2social.com/api/rest/v1.0
/video/check:
post:
tags:
- Video
summary: Get Video Post Results
description: Get the current states of your posts related to a video_token
operationId: video_check
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
video_token:
type: string
description: The video token received before uploading video chunks.
required:
- video_token
example:
video_token: YOUR_VIDEO_TOKEN
x-codeSamples:
- lang: cURL
source: "curl -X POST https://api-upload.blog2social.com/api/rest/v1.0/video/check \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"video_token\": \"YOUR_VIDEO_TOKEN\"\n}'"
- lang: PHP
source: "<?php\n\n$payload = [\n 'video_token' => 'YOUR_VIDEO_TOKEN',\n];\n\n$curl = curl_init('https://api-upload.blog2social.com/api/rest/v1.0/video/check');\n\ncurl_setopt_array($curl, [\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => [\n 'Content-Type: application/json',\n ],\n CURLOPT_POSTFIELDS => json_encode($payload),\n]);\n\n$response = curl_exec($curl);\n$error = curl_error($curl);\n\n$curl = null;\n\nif ($response === false) {\n throw new RuntimeException($error);\n}\n\necho $response;"
responses:
'200':
description: OK<br><br>The state can vary between:<br>- 0 = finished<br> - 1 = failed<br>- 2 = pending
content:
application/json:
schema:
type: array
items:
type: object
properties:
network_id:
type: integer
network_type:
type: integer
state:
type: integer
description: 'Video processing state: 0 = finished, 1 = failed, 2 = pending.'
enum:
- 0
- 1
- 2
client_user_network_id:
type: integer
publish_url:
type: string
post_id:
type: integer
b2s_error_code:
type: string
example:
- network_id: 12
network_type: 1
state: 0
client_user_network_id: 3241
publish_url: https:\/\/www.instagram.com\/p\/Cjr5AnINUD5\/
post_id: 5
- network_id: 32
network_type: 0
state: 1
client_user_network_id: 3241
b2s_error_code: VIDEO_NETWORK_FORMAT
post_id: 6
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error_1002'
'401':
description: Unauthorized
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/error_401'
- $ref: '#/components/schemas/error_1001'
- $ref: '#/components/schemas/error_1003'
'500':
description: Interal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/error_500'
servers:
- url: https://api-upload.blog2social.com/api/rest/v1.0
components:
schemas:
error_1002:
type: object
properties:
error_code:
type: integer
example: 1002
error_message:
type: string
example: required parameter missing {PARAMETER}
error_1003:
type: object
properties:
error_code:
type: integer
example: 1003
error_message:
type: string
example: access token invalid
error_1001:
type: object
properties:
error_code:
type: integer
example: 1001
error_message:
type: string
example: access token required
error_500:
description: Internal Server Error
type: object
properties:
error_code:
type: integer
example: 500
error_message:
type: string
example: interal server error
VideoPostObject:
type: array
items:
type: object
properties:
client_user_network_id:
type: integer
description: User network auth id to wich the post should go
title:
type: string
description: Set post title
message:
type: string
description: Set post message
postFormat:
type: integer
description: Set post format (Video: 2)
enum:
- 2
customUrl:
type: string
description: Set post url content
noCache:
type: integer
description: If the link shoud get a no_cache parameter
enum:
- 0
- 1
tags:
type: array
description: Tags to post
items:
type: string
board:
type: string
description: Pinterest board to post to
mediaObjects:
type: array
description: List of Media Objects to add to the post (For Facebook and X you can add up to 4 images, for Instagram up to 10 and for LinkedIn up to 9. Every other Network will only post the first image in the list)
items:
type: object
properties:
type:
type: string
description: Video
enum:
- VIDEO
url:
type: string
description: URL to the file
is_retweet:
type: integer
description: Indicator, if the post should be a retweet
enum:
- 0
- 1
network_post_id:
type: string
description: The id of the post you want to retweet
post_id:
type: integer
description: Identifier that will be returned with the Post Result Object, so you can pair it up with your request.
make_threads:
type: integer
description: The post message gets cut and added as comments to the post if a message exceeds the character limit (X only)
default: 0
enum:
- 0
- 1
ignore_link:
type: integer
description: If enabled, the link URL won't be added to the end of the post message
default: 0
enum:
- 0
- 1
error_401:
description: Unauthorized
type: object
properties:
error_code:
type: integer
example: 401
error_message:
type: string
example: unauthorized