List planned Instagram posts
const url = 'https://app.whatsetter.com/api/v1/instagram/posts?status=scheduled&limit=25';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.whatsetter.com/api/v1/instagram/posts?status=scheduled&limit=25' \ --header 'Authorization: Bearer <token>'The posts planned on the workspace’s Instagram accounts, newest
planned time first: scheduled (waiting for publish_at),
publishing (sent to Instagram, being processed), reminded (mode
remind: the person was reminded and the post is looked for on the
account), published (with its permalink) and failed (with
error_code, the reason in a word: aspect_ratio, video_format,
quota, needs_reconnect, remind_missed…).
Requires scope instagram:read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”One Instagram account of the workspace (all of them by default).
Opaque cursor from the previous page’s pagination.next_cursor.
Responses
Section titled “Responses”A page of planned posts
object
object
object
The URL given through the API; null for a file uploaded from the dashboard.
The comment automation made on the post once it is live. A post planned in the dashboard may carry a whole automation built in its editor (link, follow ask, who continues…): it is summed up here as its first word (empty when it answers every comment) and its private message. Sending automation replaces it with this simple shape.
object
Posted one step after the post is live; a failure never takes the post back.
object
Comment_needs_reconnect, account_restricted, comment_refused, comment_gave_up, comment_no_media
A trial reel (shown first to non-followers).
object
Each media’s alternative text
False when the comments are turned off once it is live.
When the person was reminded (mode remind).
The copy on the linked Facebook Page; its outcome never touches the Instagram post’s.
object
Fb_permission, fb_reconnect, fb_reel_limit, fb_reel_duration, fb_reel_ratio, fb_photo_refused, fb_carousel_video, fb_processing_timeout, fb_unconfirmed…
object
Example
{ "data": [ { "kind": "image", "media": [ { "type": "image" } ], "status": "scheduled", "first_comment": { "status": "pending" }, "mode": "auto", "facebook": { "status": "pending" }, "source": "app" } ]}Missing, unknown or revoked API key
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}The key lacks the required scope (insufficient_scope), the plan does not have this part of the API (not_in_plan), or Instagram is not enabled on the workspace (instagram_not_enabled, Instagram routes)
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Invalid parameter or body (also an invalid or expired cursor)
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}