WordPress Plugin

API

API Documentation for Social Post Flow.

Information Icon

We’re still creating our videos and documentation, so some pages may be missing information. Please open a support request for any queries not answered here, and check back for videos and updated documentation soon.

Introduction

The Social Post Flow API provides functionality to:

  • Fetch a list of social media profiles connected to the authenticated Social Post Flow account,
  • Create, edit, delete and list social media posts created on the authenticated Social Post Flow account,
  • Publish content to social media account(s) connected to the authenticated Social Post Flow account.

This is a private API, not available to the general public. If you’re looking for an integration with Social Post Flow, check the integrations page.

Headers

All requests must include the following headers:

Header NameValue
Acceptapplication/json

All authenticated API endpoints must include the following headers:

Header NameValue
AuthorizationBearer your-access-token
Acceptapplication/json

Responses

Social Post Flow returns data in JSON format, within a data resource

Pagination

GET requests that may return multiple resources (profiles, posts etc) support pagination parameters:

ParameterValueRequired
pageinteger
The current page of the paginated resultset to return
No
per_pageinteger
The number of results to return
No

The response will include links and meta resources are also returned:

Ordering

GET requests that may return multiple resources (profiles, posts etc) support order parameters:

ParameterValueRequiredDefault
order_bystring
The column to order results on
NoProfiles: id
Posts: scheduled_at
orderasc: Return results in ascending order (A-Z)
desc: Return results in descending order (Z-A)
Noasc

Errors

When an error occurs, a non-2xx HTTP code will be returned, with a JSON response.

KeyDescriptionAlways Returned?
messagestring
The error(s) that occurred. This can be presented to the end user.
Yes
errorsarray<string>
Where more verbose errors can be provided, they will be individually included in this key. This is not always returned.
No

401 Unauthorized

This error is returned if:

  • No access token was specified,
  • An invalid or expired access token was specified in the request,
  • The Social Post Flow account no longer has access, due to a lapsed trial, failed account payment, lapsed subscription payment etc.

404 Not Found

This error is returned if:

  • An invalid endpoint was specified,
  • The queried resource (such as a profile or post) does not exist

422 Unprocessable Content

This error is returned if:

  • A query parameter’s value is invalid.

429 Rate Limit

Social Post Flow’s API has a request rate limit of 600 requests per minute. A 429 HTTP code is returned when this rate limit is exceeded.

500 Internal Server Error

If the server is overloaded, or you encountered a bug, the API will return a 500 Internal Server Error. Try the request after a short amount of time, and if the issue persists, please open a support request.

Rate Limits

Social Post Flow’s API has a request rate limit of 600 requests per minute.

Authentication

Social Post Flow uses OAuth Proof Key for Code Exchange (PKCE).

This guide presumes knowledge of OAuth.

Authentication URL

To begin OAuth, send the user to https://app.socialpostflow.com/oauth/authorize with the following query parameters:

ParameterValue
client_idYour OAuth Client ID
response_typecode
redirect_uriYour OAuth callback URL, which will exchange an authorization code for access and refresh tokens
stateOptional: a CSRF, nonce or other state value you require to be included when the user authenticates and is redirected to the redirect_uri
code_challengeThe code verifier is a cryptographically random string using the characters A-Z, a-z, 0-9, and the punctuation characters -._~ (hyphen, period, underscore, and tilde), between 43 and 128 characters long. This must be stored locally, and sent in this request as a base64-url encoded string of the SHA256 hash.
code_challenge_methodS256

Exchange Authorization Code for Access and Refresh Tokens

Once your user has approved your app, they are sent to the redirect_uri, which includes the following query parameters:

ParameterValue
codeAuthorization code
stateOptional: a CSRF, nonce or other state value specified in the state parameter in the Authentication step above.

Request

To exchange the Authorization Code for Access and Refresh Tokens, make a POST request to https://app.socialpostflow.com/oauth/token, with the following body:

ParameterValue
client_idYour OAuth Client ID
grant_typeauthorization_code
codeThe code parameter
redirect_uriYour OAuth callback URL, which will exchange an authorization code for access and refresh tokens
code_verifierThe code verifier generated in the Authorization step. This should be the plain text version i.e. the non-base64 url encoded and non-SHA256 one.
code_challengeThe code verifier is a cryptographically random string using the characters A-Z, a-z, 0-9, and the punctuation characters -._~ (hyphen, period, underscore, and tilde), between 43 and 128 characters long. This must be stored locally, and sent in this request as a base64-url encoded string of the SHA256 hash.
code_challenge_methodS256

Response

HTTP Code200
Response Schemaapplication/json

Refresh an expired Access Token

Request

To obtain a non-expired access token, make a POST request to https://app.socialpostflow.com/oauth/token, with the following body:

ParameterValue
client_idYour OAuth Client ID
grant_typerefresh_token
refresh_tokenYour refresh token

Response

HTTP Code200
Response Schemaapplication/json

Get User

GEThttps://app.socialpostflow.com/api/user

Authorization

Header NameValue
AuthorizationBearer your-access-token
Acceptapplication/json

Query Parameters

None

Response

HTTP Code200
Response Schemaapplication/json

List Profiles

GEThttps://app.socialpostflow.com/api/profiles

Query Parameters

ParameterValueRequiredDefault Value
post_typetext: Return profiles that support the text post type
link: Return profiles that support the link preview post type
image: Return profiles that support the image / images post type
story: Return profiles that support the Instagram Story post type

When not specified, all profiles will be returned
NoAll Post Types
order_byid: Order results by the profile’s ID
provider: Order results by provider (facebook, x, linkedin etc)
profile_name: Order results by the social media profile’s display name
Noid
orderasc: Return results in ascending order (A-Z)
desc: Return results in descending order (Z-A)
Noasc
pageinteger
The current page of the paginated resultset to return
No1
per_pageinteger
The number of results to return
No10

Response

HTTP Code200
Response Schemaapplication/json

List Posts

GEThttps://app.socialpostflow.com/api/posts

Query Parameters

ParameterValueRequiredDefault Value
social_profile_idinteger
The social profile ID to list posts for. This can be found using the List Profiles endpoint.

When not specified, posts for all connected social profiles will be returned
NoAll Social Profiles
statusscheduled: Return posts that have not yet been published i.e. are scheduled for publication
posted: Return posts that posted successfully to social media
failed: Return posts that failed to publish to social media

When not specified, all posts will be returned
NoAll Statuses
order_byscheduled_at: Order results by the Post’s scheduled date and time
posted_at: Order results by the Post’s published date and time
created_at: Order results by the Post’s created date and time. Created refers to when the Post was added to Social Post Flow
updated_at: Order results by the Post’s last modified date and time. Updated refers to when the Post was updated by an API call or Social Post Flow (for example, when the Post was published, its status will change, therefore updating the updated_at value.
Noscheduled_at
orderasc: Return results in ascending order (A-Z)
desc: Return results in descending order (Z-A)
Noasc
pageinteger
The current page of the paginated resultset to return
No1
per_pageinteger
The number of results to return
No10

Response

HTTP Code200
Response Schemaapplication/json

Create Text Post

Creates a text only post, with no link preview and no images, for the specified connect profiles.

POSThttps://app.socialpostflow.com/api/posts

Authorization

Header NameValue
AuthorizationBearer your-access-token
Acceptapplication/json

Query Parameters

ParameterValueRequired
post_typetextYes
textstring
The content of the social media post
Yes
first_commentstring
The content of the first comment to post when the social media post is published. Links may be included.
No
profile_idsarray<integer>
An array of one or more Profile IDs to schedule/publish the social media post to. These can be found using the List Profiles endpoint.
Yes
schedule_typeimmediate: Publish the post on social media as soon as possible (usually within 1 – 2 minutes)
queue_start: Add the post ahead of any other post(s) scheduled, scheduling it up to 1 hour before.
queue_end: Add the post after any other scheduled post(s), scheduling it to publish 1 hour after the last scheduled post.
scheduled: Add the post, and schedule it to publish to social media on the given scheduled_at value below.
Yes
scheduled_atdate: For example, 2025-07-01 01:00:00Yes, if schedule_type = scheduled.

Response

HTTP Code201: Post created successfully
Response Schemaapplication/json

Error Response

HTTP CodeA non-2xx HTTP code
Response Schemaapplication/json

Create Link Post

Creates a text post with a link preview, for the specified connect profiles.

POSThttps://app.socialpostflow.com/api/posts

Authorization

Header NameValue
AuthorizationBearer your-access-token
Acceptapplication/json

Query Parameters

ParameterValueRequired
post_typelinkYes
textstring
The content of the social media post
Yes
first_commentstring
The content of the first comment to post when the social media post is published. Links may be included.
No
urlstring
The URL to include as a link in the post. Not all networks will present this as a link preview / social card.
Yes
profile_idsarray<integer>
An array of one or more Profile IDs to schedule/publish the social media post to. These can be found using the List Profiles endpoint.
Yes
schedule_typeimmediate: Publish the post on social media as soon as possible (usually within 1 – 2 minutes)
queue_start: Add the post ahead of any other post(s) scheduled, scheduling it up to 1 hour before.
queue_end: Add the post after any other scheduled post(s), scheduling it to publish 1 hour after the last scheduled post.
scheduled: Add the post, and schedule it to publish to social media on the given scheduled_at value below.
Yes
scheduled_atdate: For example, 2025-07-01 01:00:00Yes, if schedule_type = scheduled.

Response

HTTP Code201: Post created successfully
Response Schemaapplication/json

Error Response

HTTP CodeA non-2xx HTTP code
Response Schemaapplication/json

Create Image Post

Creates an image or carousel post, for the specified connect profiles.

POSThttps://app.socialpostflow.com/api/posts

Authorization

Header NameValue
AuthorizationBearer your-access-token
Acceptapplication/json

Query Parameters

ParameterValueRequired
post_typeimageYes
textstring
The content of the social media post
Yes
first_commentstring
The content of the first comment to post when the social media post is published. Links may be included.
No
media_urlsarray<string>
One or more image URLs to include in the post. These must be accessible to the Social Post Flow API, with no firewall rules, authentication or other strategies limiting access.

The API will copy these images, cropping them to the social network’s required dimensions. If you need to delete the media specified in your included media_urls, you may safely do after a successful API request.
Yes
profile_idsarray<integer>
An array of one or more Profile IDs to schedule/publish the social media post to. These can be found using the List Profiles endpoint.
Yes
schedule_typeimmediate: Publish the post on social media as soon as possible (usually within 1 – 2 minutes)
queue_start: Add the post ahead of any other post(s) scheduled, scheduling it up to 1 hour before.
queue_end: Add the post after any other scheduled post(s), scheduling it to publish 1 hour after the last scheduled post.
scheduled: Add the post, and schedule it to publish to social media on the given scheduled_at value below.
Yes
scheduled_atdate: For example, 2025-07-01 01:00:00Yes, if schedule_type = scheduled.

Response

HTTP Code201: Post created successfully
Response Schemaapplication/json

Error Response

HTTP CodeA non-2xx HTTP code
Response Schemaapplication/json

Create Story Post

Creates an Instagram Story post, for the specified connect profiles.

POSThttps://app.socialpostflow.com/api/posts

Authorization

Header NameValue
AuthorizationBearer your-access-token
Acceptapplication/json

Query Parameters

ParameterValueRequired
post_typestoryYes
media_urlsarray<string>
One or more image URLs to include in the post. These must be accessible to the Social Post Flow API, with no firewall rules, authentication or other strategies limiting access.

The API will copy these images, cropping them to the social network’s required dimensions. If you need to delete the media specified in your included media_urls, you may safely do after a successful API request.
Yes
profile_idsarray<integer>
An array of one or more Profile IDs to schedule/publish the social media post to. These can be found using the List Profiles endpoint.
Yes
schedule_typeimmediate: Publish the post on social media as soon as possible (usually within 1 – 2 minutes)
queue_start: Add the post ahead of any other post(s) scheduled, scheduling it up to 1 hour before.
queue_end: Add the post after any other scheduled post(s), scheduling it to publish 1 hour after the last scheduled post.
scheduled: Add the post, and schedule it to publish to social media on the given scheduled_at value below.
Yes
scheduled_atdate: For example, 2025-07-01 01:00:00Yes, if schedule_type = scheduled.

Response

HTTP Code201: Post created successfully
Response Schemaapplication/json

Error Response

HTTP CodeA non-2xx HTTP code
Response Schemaapplication/json


Published

Last Updated