Instagram Post
Webhook
Instagram Post allows you to receive a webhook when a new post of your Instagram account is announced (event "post").
It is sent for an Instagram connection (facebook_type 4), to the URL you
set with Set Webhook for that
connection. Delivery, retries and duplicates are explained on the
Webhook Events page.
When it is sent. Instagram (Meta) sends no notification when a new post is published, so we create this event ourselves:
- A post you publish with Create Post is announced right away.
- A post created on Instagram itself (the Instagram app or the web) is
announced when its first comment arrives: you get this
postevent first, and the Instagram Comment event of that comment about 5 seconds later. The few seconds are not exact: order events bytimestamp. - A post created on Instagram itself that never gets a comment is never announced.
- A post is announced once.
actionis always "created": Instagram does not report edits or deletes of posts. - Ads are not announced: a comment on an ad reaches you as an Instagram Comment event only.
- This is true for every post of the account that was never announced: also a post from before your connection was made, or one published with another tool. Its first comment that reaches us announces it, so the post can be months or years old.
- In rare cases, a post you published with Create Post is announced only when its first comment arrives, like a post created on Instagram. And when we can't read a post at the moment its first comment arrives, that comment is still sent to you, and the post is announced with a comment that arrives at least 10 minutes later.
timestamp is when the post was created โ not when the event was
sent. A post that is announced by its first comment can be hours, days or
even months old, so order events by timestamp. (When Instagram does not
give the creation time, timestamp is the time of the comment that
announced the post.)
For a post created on Instagram itself, mediaUrl and thumbnailUrl are
temporary links of Meta's servers. They stop working after a few days, so
download the file soon after the event if you need to keep it.
Settings:
| Setting | Value |
|---|---|
| URL | Your URL โ set it with Set Webhook |
| Method | JSON via POST |
With every Instagram post event, you will get some of the following:
{
"event": "post",
"action": "created",
"eventId": "fbw_19e4c7a0d3f62859b1e4c7a0d3f6a274",
"platform": "instagram",
"from": "463745743546390",
"facebook_type": 4,
"igUserId": "17841458392017465",
"mediaId": "18054729384756120",
"mediaType": "VIDEO",
"mediaProductType": "REELS",
"text": "Behind the scenes of our spring collection ๐ท",
"permalink": "https://www.instagram.com/reel/AbC123xYz45/",
"mediaUrl": "https://scontent.cdninstagram.com/v/t50.2886-16/spring-reel.mp4",
"thumbnailUrl": "https://scontent.cdninstagram.com/v/t51.2885-15/spring-reel-cover.jpg",
"author": { "id": "17841458392017465", "username": "my_flowers_shop" },
"fromSelf": true,
"timestamp": 1795412000
}
Response explainedโ
| Parameter | Description / Example |
|---|---|
event | "post" always, for post webhooks. |
action | "created" always. |
eventId | The unique ID of this event (fbw_ and 32 characters). A post is announced once, always with the same eventId, so use it to ignore an event you already received. |
platform | "instagram" always, for Instagram. |
from | The ID of your connection โ the from you use to call our API. |
facebook_type | 4 always (Instagram). |
igUserId | Your Instagram account ID. |
mediaId | The post ID. Use it with All Posts, All Comments, Create Comment, Toggle Comments and Delete Post. |
mediaType | "IMAGE", "VIDEO" or "CAROUSEL_ALBUM", as Instagram reports it. A reel is "VIDEO". |
mediaProductType | "FEED", "REELS" or "STORY", as Instagram reports it. A reel is "REELS". |
text | The caption, or null when there is none (a story has none). |
permalink | The link to the post on Instagram. null for a post you published with Create Post โ read it with All Posts and the mediaId. |
mediaUrl | For a post created on Instagram itself: a temporary link to the image or video on Meta's servers (download it soon, see above), or null when Instagram does not give it. For a post you published with Create Post: the link you sent, or null for a carousel. |
thumbnailUrl | For a post created on Instagram itself: a temporary link to the video's cover image (videos only), otherwise null. For a reel you published with Create Post: the coverUrl you sent, otherwise null. |
author | Your own Instagram account: id (your igUserId) and username (can be null). |
fromSelf | true always: posts are written by your own account. |
timestamp | When the post was created (Unix time in seconds, UTC). For a post announced by its first comment, it can be long before the event reached you; when Instagram does not give the creation time, it is the time of that comment. |
Webhook payload
โYour responseโ
- 200
- default
Received. Answer with any 2xx status (200, 201, 204 โฆ) โ we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored.
Any other status, or no answer in time, counts as a failed delivery. We try again: immediately, then 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours after the previous failure. After that, the event is not sent again.