curl. It takes about 10 minutes.
Before you start
- A SocialAPI account. Sign up at app.social-api.ai. The Free plan is enough: this walkthrough costs 1 post credit and 1 interaction credit. See Plans and usage.
- An Instagram Business or Creator account that you can sign in to. A personal Instagram account cannot be connected.
- A comment on one of that account’s posts, written from another Instagram account, for step 4.
- A public image URL (JPEG) for step 5.
1
Create an API key
In the dashboard, open API Keys, click Create API Key, name it, and click Create key.Store it in your environment:To check that it works, list your accounts. A new SocialAPI account has none:Response (HTTP 200):A
401 means the key is wrong: see Authentication.2
Connect an Instagram account
Start the connection. SocialAPI’s own app connects Instagram, so you register nothing with Meta:Response (HTTP 202):Open Response (HTTP 200):Copy the account’s
auth_url in your browser, sign in to Instagram, and approve. You have 1 hour from this request. SocialAPI creates a brand named after the account to hold it.Check that it worked:id. An empty data means the approval did not finish: run this step again. Other platforms, and the slug each one uses, are listed in Platform slugs. X, Telegram, and Bluesky use your own app or credentials: see Platform apps.3
List the posts that have comments
id is the platform’s ID of the post. An empty data means no post has comments yet: write a comment from another Instagram account and run the request again.4
Read and reply to a comment
Read the comments on that post. Response (HTTP 200):Reply with the comment’s Response (HTTP 200):The reply is public on Instagram.
account_id is required:id. This costs 1 interaction credit:comment_id is the new reply’s ID. A 501 resource.not_supported means the platform does not allow that action: check capabilities.can_reply on the comment first.5
Publish a post
Publish an image to the account. Replace the Response (HTTP 201):A When it worked, the post’s
source URL with a public JPEG URL. Instagram needs content_type when you publish, and publish_now: true is what publishes: without publish_now or scheduled_at, the request only saves a draft.201 means SocialAPI accepted the post, not that Instagram published it. Read the post until its status is published, partial, or failed:status is published and the target has a platform_post_id and a permalink. When it failed, the reason is in targets[].error. To upload a file instead of linking one, see Media.What you built
You now have an API key, a connected Instagram account, a comment you read and answered, and a post you published. The same calls work on every platform that supports them: Supported platforms shows which.Next steps
Core concepts
Brand, account, post, interaction, and capability.
Unified inbox
Comments, DMs, reviews, and mentions.
Automations
Answer matching comments and DMs with no code on your side.
Publishing
Fields every platform shares, scheduling, and media.
Webhooks
Receive new comments, messages, and post results on your server.
Related
- Authentication for scoped keys, key rotation, and OAuth tokens
- Connect accounts for brands, reconnecting, and letting someone else connect
- Errors for every error code and how to handle it
- Plans and usage for allowances and what costs a credit