Social Media User Profile API
Retrieve every social media account connected to your AdaptlyPost workspace, with its platform, ID and connection status.
https://post.adaptlypost.com/post/api/v1/social-accountsReturns a list of all social media accounts connected to your workspace. Use the returned connection IDs when creating posts.
Usage
Use the id values from this response as connection IDs when creating posts. Each account includes a displayName, username, and avatarUrl. Facebook page accounts also include a pageId (the Facebook Page ID), since pages have no username. For Facebook, pageIds accepts either the account id or the pageId, and post responses always return the Facebook pageId. Each account also carries a status: active, or unauthorized when the platform rejected its token. Posts to an unauthorized account are refused with a 400 until it is reconnected in the dashboard, and unauthorizedReason carries the platform's own message.
A Google Business Profile location has the location title as displayName and an empty username. Instagram accounts carry supportsInstagramAudio, true when the account was connected through Facebook, which adding audio to a Reel needs. A Telegram channel or group has the chat title as displayName, its public @username without the @ as username (empty when the chat has none) and an empty avatarUrl. A chat the AdaptlyPost bot was removed from shows as unauthorized. A WordPress site whose credentials stop working (the site answers 401 or 403) shows as unauthorized until you reconnect it.
Re-check an account
https://post.adaptlypost.com/post/api/v1/social-accounts/:id/checkPages are checked with Facebook automatically twice a day. To check one now, call this endpoint with the account id or the Facebook pageId. A rejected token marks the page unauthorized and fires account.unauthorized; a working token clears an earlier mark. The response carries the fresh status.
Only an Admin key holds accounts.manage. Connecting, disconnecting and re-checking accounts, choosing pages and boards, Pinterest preferences and connect links are Admin only.
Remove an account
https://post.adaptlypost.com/post/api/v1/social-accounts/:idDisconnects the account from the workspace, the same as disconnecting it on the Connectors page. Its stored tokens are deleted, it is taken off every pending and recurring post, and it stops counting toward your plan. Pass the account id or the Facebook pageId. It works whatever the account's status, so an unauthorized account can be cleaned up without reconnecting it. The response returns the id, platform, displayName and, for Facebook, pageId of the removed account with removed: true. An id the workspace does not hold answers 404.
Only an Admin key holds accounts.manage. Connecting, disconnecting and re-checking accounts, choosing pages and boards, Pinterest preferences and connect links are Admin only.
Search Instagram audio
https://post.adaptlypost.com/post/api/v1/social-accounts/:id/instagram-audioSearch Instagram music and original sounds to add to a Reel. Leave out searchQuery to get what is trending, then pass the chosen audioId in instagramConfigs[].audio. Only works for Instagram accounts with supportsInstagramAudio: true.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
audioTypeREQUIRED | string | music or original_sound |
searchQuery | string | Keyword filter, up to 100 characters. Leave it out for trending audio |
Audio fields
| Field | Description |
|---|---|
audioId | Pass it as instagramConfigs[].audio.audioId |
audioType | music or original_sound |
title | The track title |
displayArtist, igUsername | displayArtist for music, igUsername (the creator's Instagram handle) for an original sound |
durationMs | Length in milliseconds |
coverArtworkUrl, profilePictureUrl | Cover art for music, the creator's profile picture for an original sound |
previewUrl | A temporary link to the audio file, for playing a preview. It expires after about 1.5 days |
instagramUrl | The audio's page on Instagram |
isAdsEligible | Whether Instagram marks the audio as usable in ads |
List Pinterest boards
https://post.adaptlypost.com/post/api/v1/social-accounts/:id/pinterest-boardsReturns every board a Pinterest account can pin to, secret boards included, in boards. Pass a board's id as pinterestConfigs[].boardId, or its name as pinterestConfigs[].boardName. A board belongs to one Pinterest account, so list the boards of each account you post to.
Board fields
| Field | Description |
|---|---|
id | Pass it as pinterestConfigs[].boardId |
name | The board name. You can pass it as pinterestConfigs[].boardName |
description | The board description. Optional |
privacy | PUBLIC, PROTECTED or SECRET, as Pinterest reports it. Optional |
pinCount | Number of pins on the board. Optional |
List WordPress categories
https://post.adaptlypost.com/post/api/v1/social-accounts/:id/wordpress-categoriesReturns the categories of a WordPress site in categories, sorted by name. Pass a category's id in wordpressConfigs[].categoryIds. Use it to turn the category names you know into ids. A category belongs to one site, so list the categories of each site you post to.
Category fields
| Field | Description |
|---|---|
id | Pass it in wordpressConfigs[].categoryIds |
name | The category name |
parentId | The id of the parent category, or null for a top-level category |
Look up a LinkedIn company page
https://post.adaptlypost.com/post/api/v1/linkedin-organizations/lookupReturns a LinkedIn company page in organization, with the mention ready to paste into the text of a LinkedIn post. Pass the page URL, its vanity name (the part after linkedin.com/company/) or the vanity name with an @.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
queryREQUIRED | string | A company page URL such as https://www.linkedin.com/company/acme/, its vanity name (acme) or @acme. 1 to 300 characters |
Organization fields
| Field | Description |
|---|---|
id | The LinkedIn organization ID |
name | The page name as LinkedIn shows it |
vanityName | The vanity name from the page URL. Can be null |
urn | The organization URN, urn:li:organization:<id> |
mention | Paste it into the LinkedIn post text as is |
LinkedIn matches the exact vanity name only, so this is not a search: acm, or a name with spaces, finds nothing. When the post also goes to other platforms, put the mention in platformTexts for LINKEDIN, since other platforms show the syntax as raw text.
curl --request GET \
--url https://post.adaptlypost.com/post/api/v1/social-accounts \
--header 'Authorization: Bearer <api-key>'curl --request POST \
--url https://post.adaptlypost.com/post/api/v1/social-accounts/<account-id>/check \
--header 'Authorization: Bearer <api-key>'curl --request DELETE \
--url https://post.adaptlypost.com/post/api/v1/social-accounts/<account-id> \
--header 'Authorization: Bearer <api-key>'curl --request GET \
--url 'https://post.adaptlypost.com/post/api/v1/social-accounts/<account-id>/instagram-audio?audioType=music&searchQuery=summer' \
--header 'Authorization: Bearer <api-key>'curl --request GET \
--url https://post.adaptlypost.com/post/api/v1/social-accounts/<account-id>/pinterest-boards \
--header 'Authorization: Bearer <api-key>'curl --request GET \
--url https://post.adaptlypost.com/post/api/v1/social-accounts/<account-id>/wordpress-categories \
--header 'Authorization: Bearer <api-key>'curl --request GET \
--url 'https://post.adaptlypost.com/post/api/v1/linkedin-organizations/lookup?query=devtestco' \
--header 'Authorization: Bearer <api-key>'{
"accounts": [
{
"id": "conn_abc123",
"platform": "TWITTER",
"displayName": "Your Handle",
"username": "@yourhandle",
"avatarUrl": "https://pbs.twimg.com/profile_images/...",
"status": "active"
},
{
"id": "conn_def456",
"platform": "LINKEDIN",
"displayName": "Your Company",
"username": "",
"avatarUrl": "https://media.licdn.com/...",
"status": "active"
},
{
"id": "conn_ghi789",
"platform": "INSTAGRAM",
"displayName": "Your Profile",
"username": "yourprofile",
"avatarUrl": "https://scontent.cdninstagram.com/...",
"status": "active",
"supportsInstagramAudio": true
},
{
"id": "conn_pqr678",
"platform": "TELEGRAM",
"displayName": "Your Channel",
"username": "yourchannel",
"avatarUrl": "",
"status": "active"
},
{
"id": "conn_mno345",
"platform": "GOOGLE_BUSINESS",
"displayName": "Your Cafe, Main Street",
"username": "",
"avatarUrl": "",
"status": "active"
},
{
"id": "conn_jkl012",
"platform": "FACEBOOK",
"displayName": "Your Page",
"username": "",
"avatarUrl": "",
"status": "unauthorized",
"unauthorizedReason": "This Page access token belongs to a Page that is not accessible.",
"pageId": "123456789012345"
}
]
}