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 | |
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
|