Skip to main content

List Connected Accounts

Retrieve a list of all social media profiles connected to your SchedPilot account. You will need the id from these objects to specify where your content should be published.

Endpoint

GET https://api.schedpilot.com/developers/v1/accounts

Headers

HeaderValueDescription
X-API-KEYsmm_your_secret_keyYour unique API key generated in the dashboard.
Content-Typeapplication/jsonStandard JSON content type.

Response Structure

The response returns an object containing an array of accounts. Each account object includes:

  • id: (Integer) The unique identifier for this specific connection.
  • type: (String) The platform type (e.g., twitter, facebook, linkedin, youtube).
  • name: (String) The display name or handle of the profile.
  • image: (String) The URL to the profile picture.

Example Request

curl -X GET [https://api.schedpilot.com/developers/v1/accounts](https://api.schedpilot.com/developers/v1/accounts) \
-H "X-API-KEY: smm_a1b2c3d4e5f6g7h8" \
-H "Content-Type: application/json"

Response Fields

FieldTypeDescription
codenumberThe HTTP-like status code (e.g., 200).
accountsarrayA list of connected social media profile objects.
accounts[].idnumberPrimary Key. Use this ID in the POST /post endpoint.
accounts[].typestringThe platform slug. Possible values: facebook, twitter, linkedin, instagram, threads, bluesky, pinterest, youtube, tiktok.
accounts[].namestringThe display name, page name, or handle of the account.
accounts[].imagestringA fully-qualified URL to the account's profile picture.

Example Response

{
"code": 200,
"accounts": [
{
"id": 142,
"type": "twitter",
"name": "SchedPilot_App",
"image": "[https://pbs.twimg.com/profile_images/123/avatar.jpg](https://pbs.twimg.com/profile_images/123/avatar.jpg)"
},
{
"id": 88,
"type": "linkedin",
"name": "SchedPilot Official",
"image": "[https://media.licdn.com/dms/image/ABC/profile.jpg](https://media.licdn.com/dms/image/ABC/profile.jpg)"
}
]
}

Code Examples

<?php
$apiKey = 'smm_your_secret_key';
$url = '[https://api.schedpilot.com/developers/v1/accounts](https://api.schedpilot.com/developers/v1/accounts)';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY: ' . $apiKey,
'Content-Type: application/json'
]);

$response = curl_exec($ch);
$data = json_decode($response, true);

if (curl_errno($ch)) {
echo 'Error: ' . curl_error($ch);
} else {
// Access the accounts array
print_r($data['accounts']);
}

curl_close($ch);
?>