REST APIGET

Social Media User Profile API

Retrieve every social media account connected to your AdaptlyPost workspace, with its platform, ID and connection status.

GEThttps://post.adaptlypost.com/post/api/v1/social-accounts

Returns a list of all social media accounts connected to your workspace. Use the returned connection IDs when creating posts.

API Key (Bearer token)
Permission:accounts.readRoles and permissions

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

POSThttps://post.adaptlypost.com/post/api/v1/social-accounts/:id/check

Pages 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.

API Key (Bearer token)
Permission:accounts.manageRoles and permissions

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

DELETEhttps://post.adaptlypost.com/post/api/v1/social-accounts/:id

Disconnects 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.

API Key (Bearer token)
Permission:accounts.manageRoles and permissions

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.

For Facebook only the named page is removed; other pages connected through the same Facebook login stay. Removing a YouTube channel also turns off its backup uploads. Removing a Telegram channel or group stops posting to it, but the bot stays in the chat until you remove it in Telegram. To bring an account back, connect it again.

Search Instagram audio

GEThttps://post.adaptlypost.com/post/api/v1/social-accounts/:id/instagram-audio

Search 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.

API Key (Bearer token)
Permission:posts.draftRoles and permissions

Query Parameters

ParameterTypeDescription
audioTypeREQUIREDstringmusic or original_sound
searchQuerystringKeyword filter, up to 100 characters. Leave it out for trending audio

Audio fields

FieldDescription
audioIdPass it as instagramConfigs[].audio.audioId
audioTypemusic or original_sound
titleThe track title
displayArtist, igUsernamedisplayArtist for music, igUsername (the creator's Instagram handle) for an original sound
durationMsLength in milliseconds
coverArtworkUrl, profilePictureUrlCover art for music, the creator's profile picture for an original sound
previewUrlA temporary link to the audio file, for playing a preview. It expires after about 1.5 days
instagramUrlThe audio's page on Instagram
isAdsEligibleWhether Instagram marks the audio as usable in ads
The list holds only audio Meta has cleared for publishing from other apps, which can differ from what the Instagram app shows. An account not connected through Facebook, or a search Instagram rejects, returns 400. An unknown account id returns 404.

List Pinterest boards

GEThttps://post.adaptlypost.com/post/api/v1/social-accounts/:id/pinterest-boards

Returns 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.

API Key (Bearer token)
Permission:posts.draftRoles and permissions

Board fields

FieldDescription
idPass it as pinterestConfigs[].boardId
nameThe board name. You can pass it as pinterestConfigs[].boardName
descriptionThe board description. Optional
privacyPUBLIC, PROTECTED or SECRET, as Pinterest reports it. Optional
pinCountNumber of pins on the board. Optional
An account id that does not exist, or is not a Pinterest account in this workspace, returns 404. A request Pinterest refuses returns 400, usually because the account must be reconnected.

List WordPress categories

GEThttps://post.adaptlypost.com/post/api/v1/social-accounts/:id/wordpress-categories

Returns 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.

API Key (Bearer token)
Permission:posts.draftRoles and permissions

Category fields

FieldDescription
idPass it in wordpressConfigs[].categoryIds
nameThe category name
parentIdThe id of the parent category, or null for a top-level category
An account id that does not exist, or is not a WordPress account in this workspace, returns 404. A site that refuses the request returns a 4xx error, and a site that cannot be reached returns 502. The message says what went wrong.

Look up a LinkedIn company page

GEThttps://post.adaptlypost.com/post/api/v1/linkedin-organizations/lookup

Returns 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 @.

API Key (Bearer token)
Permission:accounts.readRoles and permissions

Query Parameters

ParameterTypeDescription
queryREQUIREDstringA company page URL such as https://www.linkedin.com/company/acme/, its vanity name (acme) or @acme. 1 to 300 characters

Organization fields

FieldDescription
idThe LinkedIn organization ID
nameThe page name as LinkedIn shows it
vanityNameThe vanity name from the page URL. Can be null
urnThe organization URN, urn:li:organization:<id>
mentionPaste 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.

A query that is not a page URL or vanity name returns 400 with code linkedin_organization_query_invalid. A vanity name no page has returns 404 with code linkedin_organization_not_found. When no LinkedIn account of the workspace could run the lookup, it returns 400 with code linkedin_organization_lookup_unavailable: connect or reconnect a LinkedIn account, ideally a company page you administer.
List All Integrations
curl --request GET \
  --url https://post.adaptlypost.com/post/api/v1/social-accounts \
  --header 'Authorization: Bearer <api-key>'
Check a Facebook page now
curl --request POST \
  --url https://post.adaptlypost.com/post/api/v1/social-accounts/<account-id>/check \
  --header 'Authorization: Bearer <api-key>'
Remove an account
curl --request DELETE \
  --url https://post.adaptlypost.com/post/api/v1/social-accounts/<account-id> \
  --header 'Authorization: Bearer <api-key>'
Search Instagram audio
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>'
List Pinterest boards
curl --request GET \
  --url https://post.adaptlypost.com/post/api/v1/social-accounts/<account-id>/pinterest-boards \
  --header 'Authorization: Bearer <api-key>'
List WordPress categories
curl --request GET \
  --url https://post.adaptlypost.com/post/api/v1/social-accounts/<account-id>/wordpress-categories \
  --header 'Authorization: Bearer <api-key>'
Look up a LinkedIn company page
curl --request GET \
  --url 'https://post.adaptlypost.com/post/api/v1/linkedin-organizations/lookup?query=devtestco' \
  --header 'Authorization: Bearer <api-key>'
200
{
  "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"
    }
  ]
}