Create a Post

This endpoint allows you to create a post on your facebook page


Settings:

URL

https://api.99digital.co.il/facebook/page/createPost

Method

JSON via POST


Body:

Parameter

Description / Example

Mandatory

Example

apiKey

Your API key for the service

yes

4124-634t462-634733463-5734346

from

The ID you received for the connection

yes

463745743546345

type

can be any of the following:

text - for creating a post with only text.

video - if you wish to have a video type post

photo - if you wish to have photo type post

yes

text

body

The body of the post, based on the 'type' value. it can have plain text only and \n for line break

If type is 'text', here you put all your post text

If type is 'video', here you put the video description

If type is 'photo', here you put the photo caption

maximum 63,206 characters.

yes

Welcome to my first Post!

links

Array of public HTTPS links

only use if "type" is video or photo.

if type is 'video' you must provide 1 link only

if type is 'photo' you you can choose if you wish 1 image in the post or album of up to 10 images.

no

["https://example.com/image.jpg",

"https://example.com/image2.jpg"]

title

If 'type' = video, you can provide the video title

no

"Here is my video title"

scheduleTime

You can schedule the post to be in future time. if omit, the post will publish immidiately.

UNIX time in seconds

must be between 11 minutes to 30 days


1786000000


Response:

{
"status": "OK",
"postId": "15234562345623_952362434423178",
"body": "your message",
"timestamp": 1600115719,
"from": "463745743546345",
"type": "text",
"reason": 1
}


Response-Explain:

Parameter

Description

status

OK or FAIL

postId

The post ID that was created. you can use that for future webhooks / comments / post changes

body

The text you sent

timestamp

Time stamp of the message

from

Your ID for the service

photos

only relevant if photos was used. this will return the amount of photos you provided (int)

scheduleTime

The future time that you provided, if provided.

reason

'reason' is the status explanation in case of FAIL

1

not FAIL. the status is OK

2

Your "from" number account does not exist, or JSON syntax error

3

wrong apiKey

5

Missing or invalid content. the 'body' or 'url'

6

Wrong connection type. you keys/id is correct but you are using the wrong endpoint

(for example: your onboarding was for facebook messenger but you are using this facebook posts endpoint)

7

Onboarding still in progress

8

Invalid "type" or 'links'

10

You must do onboarding again, the connection has expired

12

Rate limit error. too many requests. please wait few minutes and try again

15

The content you posted was rejected by meta or bad media / format / size. could also indicate policy violation inside the content.

16

General error, try again

18

wrong information / uknown error. please check all payload again