Skip to content

Instagram

Your agents post your images, carousels and reels on schedule, answer comments and direct messages as you, and read what each post reached.

Connect
Sign in once, 4 grants
Runs through
Your account
First run
Find 25 creators who talk to property managers, about 0.95¢
Post.publish
You, to your agent

Post my three rent-reminder slides as a carousel, and show me how it will look.

curl -X POST "https://api.sb/leaseline.app/posts/publish?mode=try" \
  -H "Authorization: Bearer $SB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"handle":"instagram:leaseline","format":"carousel","media":["files/slide-1","files/slide-2","files/slide-3"],"body":"The 3 texts that end late rent, one per slide. Save it for the 1st."}'
npx startup-builder do Post.publish --try --data '{"handle":"instagram:leaseline","format":"carousel","media":["files/slide-1","files/slide-2","files/slide-3"],"body":"The 3 texts that end late rent, one per slide. Save it for the 1st."}'
{
  "name": "do",
  "arguments": {
    "mode": "try",
    "code": "return await $.Post.publish({ handle: 'instagram:leaseline', format: 'carousel', media: ['files/slide-1', 'files/slide-2', 'files/slide-3'], body: 'The 3 texts that end late rent, one per slide. Save it for the 1st.' })"
  }
}
import { $ } from 'startup-builder'

const result = await $.try.Post.publish({ handle: 'instagram:leaseline', format: 'carousel', media: ['files/slide-1', 'files/slide-2', 'files/slide-3'], body: 'The 3 texts that end late rent, one per slide. Save it for the 1st.' })
Response
{
  "$type": "Post",
  "mode": "try",
  "stored": false,
  "venue": "instagram",
  "status": "published",
  "format": "carousel",
  "items": 3,
  "ratio": "4:5, from the first slide",
  "checks": {
    "images": "JPEG, 1080 × 1350, under 8 megabytes",
    "caption": "67 of 2,200 characters"
  },
  "postsLeftToday": 49
}
Try mode reads, stores nothing and spends nothingAPI referenceIts Nouns

Connect once

  1. Switch the account to a professional account in Instagram’s settings, if it is not one already.
  2. Call Integration.connect with system: 'social' and venue: 'instagram', then open the connectUrl it returns and sign in as that Instagram account.
  3. Call Handle.connect to bind the account as your account.
GrantWhat it unlocksScope
PublishImages, carousels and reels posted as youinstagram_business_basic instagram_business_content_publish
CommentsReplies to comments, and hiding or deleting the ones that break your rulesinstagram_business_manage_comments
Direct messagesAnswers to the messages people send youinstagram_business_manage_messages
InsightsEach post’s reach, saves and sharesinstagram_business_manage_insights
ToDo this
PauseIntegration.pause stops every call through Instagram at once and keeps the token; Integration.resume picks up from the same cursor.
ReconnectIntegration.reconnect returns a fresh connectUrl that lasts one hour, and keeps the Integration's id and cursor, so nothing imports twice.
DisconnectIntegration.revoke revokes the token with Instagram; every record it brought in stays in your records.

What your agents do

AskVerbRuns throughPrice
Post these three slides as a carousel with this caption.Post.publishYour accountFree
Post the reel on Thursday at noon.Post.scheduleYour accountFree
Answer each comment and direct message as me.Conversation.answerYour accountFree
Which posts reached the most people this month, and which were saved?Metric.queryYour accountFree

Calls on your own account are free.

Reading this site’s public data needs no account: Prospect.find is a Data call (the three ways a call runs).

What it holds

NounThe account’s objectWhenWhich side leads
PostmediaYour agent publishesYour records
Messagecomment or messageSomeone comments or writes to youThe account
ConversationconversationA direct message thread opensThe account

Events and webhooks

DirectionEvent
EmitsPost.published, Post.scheduled, Message.created
Hears commentsBecomes Message.created
Hears messagesBecomes Message.created
Hears mentionsBecomes Message.created

Any Event can wake a Workflow, and a Watch delivers it to your endpoint, signed (Events and webhooks).

Limits

WhatLimitCall
Posts through the API50 in a moving 24 hours, and a carousel counts as one; the agent reads what is left before each postPost.publish
A staged postInstagram drops a staged post after 24 hours, so the agent stages it in the hour it publishesPost.schedule
Account typeA professional account; a personal account refuses with account-not-connected until it switchesEvery call

Field map

Our fieldInstagram’s fieldNotesCalls
Post.bodycaption2,200 characters, 30 hashtags, 20 mentionsPost.publish, Post.schedule
Post.formatmedia_typeIMAGE, CAROUSEL, REELS or STORIESPost.publish, Post.schedule
Post.mediaimage_url or video_urlA carousel holds up to 20 items, cropped to the first one’s ratioPost.publish, Post.schedule
Post.publishAtmedia_publishInstagram has no scheduled publish; the platform holds the Post and publishes it thenPost.schedule

What try does here

Checks each image and video against Instagram’s specs and returns the post as it will show; no container is staged and nothing publishes.

How long a connection lasts

A connection lasts 60 days per token, and the platform refreshes it once it is a day old, so a connection your agents use never runs out.

The platform asks you to reconnect 7 days before it runs out; until you do, a call that needs it refuses with needs-reauth.

Formats

SiteFormatSizeLimits
InstagramFeed image320 to 1,440 pixels wide, 4:5 to 1.91:1JPEG only, up to 8 megabytes; caption 2,200 characters, 30 hashtags, 20 mentions
InstagramCarouselNone.Up to 20 images or videos, cropped to the first item’s ratio; counts as one post
InstagramReel9:16MOV or MP4, 3 seconds to 15 minutes, up to 300 megabytes, 23 to 60 frames a second
InstagramStory9:16Image up to 8 megabytes; video 3 to 60 seconds, up to 100 megabytes

Plays and strategies

Used by

No Workflow, agent task or Service acts through it yet: your agents call it directly.

Reference

4 calls, each with its path and price
CallPathPrice
Post.publishPOST /posts/publishFree
Post.schedulePOST /posts/scheduleFree
Conversation.answerPOST /conversations/answerFree
Metric.queryPOST /metrics/queryFree

Contents