Create a Post

This endpoint allows you to create a post on your instagram page.

  • Here you have one endpoint for all media types.

  • All media must be public HTTPS url (Meta will try to download them), jpeg images only, maximum of 8 MB.


Settings:

URL

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

Method

JSON via POST

Header

Your API key for the service


Body:

Parameter

Description / Example

Mandatory

Example

from

The ID you received for the connection

yes

463745743546345

mediaType

can be any of the following:

image - for creating a post with only image

reel - for creating a reel

video - for creating a video

story - for creating a story

carousel - for creating carousel images/videos

yes

image

links

Array of public HTTPS links, depends on the "mediaType" you provided:

image - provide 1 link only

reel - provide 1 video link only (mp4/mov/webm/avi) (up to 90 seconds)

video - provide 1 video link only (mp4/mov/webm/avi)

story - 1 link of either image or video (a story lives 24 hours)

carousel - minimum 2 links, maximum 10. image and video combination is possible

yes

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

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

caption

A string text that comes with the image/reel/video/carousel.

up to 2,200 characters.

up to 30 #hashtags

up to 20 @mentions

no markdown, no html.

Does not work for 'story' mediaType.

no

"Here is my video title"

shareToFeed

int.

relevant for reels only.

1 - show in the main feed grid

0 - show in the reels tab only

no

1


Response:

{
"status": "OK",
"mediaType": "image",
"caption": "your message",
"timestamp": 1600115719,
"from": "463745743546345",
"mediaId": 52342352345,
"url": "https://example.com",
"items": 0,
"reason": 1
}


Response-Explain:

Parameter

Description

status

OK or FAIL

mediaType

The mediaType you chose

caption

The caption text you provided

timestamp

Time stamp of the message

from

Your ID for the service

url

For a single url mediaType, this will show the url provided.

items

Total items provided (relevant for carousel mediaType)

mediaId

The published media ID. this is relevant for toggleComments, deletePost, createComment, sendMediaShare and getComments

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 'links' or 'caption'

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

Wrong mediaType

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