A Business Portfolio can add Instagram accounts that belong to the business. This enables a business to easily manage Instagram accounts and ad accounts used for these Instagram accounts. See Instagram Ads Setup for more information. Instagram accounts are also referred to as Instagram business assets throughout the process.
To add an Instagram account for your business, you must use the Business Manager UI. See Add an Instagram Account to your Buisness Portfolio in Business Manager.
To see all Instagram accounts that your business owns, use this GET call:
curl -G \ -d "access_token=ACCESS_TOKEN" \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/owned_instagram_assets"
To see all Instagram accounts your business is an agency of, use this GET call:
curl -G \ -d "access_token=ACCESS_TOKEN" \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/client_instagram_assets"
This returns a list of Instagram accounts that belong to clients of a Business Portfolio.
After your business has an Instagram account, you can assign people tasks for it. Tasks include:
| API Constant | Description |
|---|---|
| Create, manage or delete posts, stories and more as the Instagram account. View posts from other Instagram accounts that this account follows. |
| Send and respond to direct messages as the Instagram account. |
| Review and respond to comments, remove unwanted content and report activity. |
| Create, manage and delete ads for the Instagram account. Manage ad partnerships. |
| See how the Instagram account, content and ads perform. |
You need:
instagram_business_asset_id: ID of the Instagram Business Assetuser_id: User ID to addtasks: Any one of the above tasksMake this POST call to add someone with the tasks ['CONTENT', 'ADVERTISE’]
The business id must be the id of the business that owns the Instagram account
curl \ -F "user=BUSINESS_SCOPED_USER_ID" \ -F "tasks=['CONTENT', 'ADVERTISE']" \ -F "business=BUSINESS_ID" \ -F "access_token=ACCESS_TOKEN" \ "https://graph.facebook.com/<API_VERSION>/<INSTAGRAM_BUSINESS_ASSET_ID>/assigned_users"
To change an existing user's tasks, use the same POST call you do when you add a new user with tasks:
curl \ -F "user=BUSINESS_SCOPED_USER_ID" \ -F "tasks=['ANALYZE', 'ADVERTISE']" \ -F "business=BUSINESS_ID" \ -F "access_token=ACCESS_TOKEN" \ "https://graph.facebook.com/<API_VERSION>/<INSTAGRAM_BUSINESS_ASSET_ID>/assigned_users"
To see specific permissions on an Instagram Business Asset, make this GET call:
curl -G -d "access_token=ACCESS_TOKEN" "https://graph.facebook.com/<API_VERSION>/<INSTAGRAM_BUSINESS_ASSET_ID>/assigned_users?business=<BUSINESS_ID"
To remove someone's access from an Instagram Business Asset you own, you need
- instagram_business_asset_id: ID of the Instagram Business Asset
- user_id: ID of the user to remove
The DELETE call is:
curl\ -X DELETE\ -F "user=BUSINESS_SCOPED_USER_ID" \ -F "access_token=ACCESS_TOKEN" \ "https://graph.facebook.com/<API_VERSION>/<INSTAGRAM_BUSINESS_ASSET_ID>/assigned_users
There are also APIs to manage the relationship between ad accounts and Instagram accounts. See Instagram Ads API.