> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Profiles

> Get the User Profiles under your Primary Profile, filtered by title, refId, social accounts, or BYOK status, or get the profile create and delete log.

Get all the profiles associated with the primary profile. The Primary Profile is not returned in the results.

For security, the Profile Keys are not returned via this GET call. Please see [here](https://www.ayrshare.com/docs/apis/profiles/create-profile.md) for more information.

## Header Parameters

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`

## Query Parameters

**title** `string`

Return only the profile associated with the URL encoded title.

**refId** `string`

Return only the profile associated with the given `refId`. The refId was returned during the
profile creation or from the /user endpoint.

**hasActiveSocialAccounts** `boolean` (default: false)

If `true` return only profiles that have at least one connected social account
(`activeSocialAccounts` length greater than zero). If `false` return only profiles with zero
connected social accounts (`activeSocialAccounts` length is zero).

**includesActiveSocialAccounts** `array`

Filter profiles to include those whose `activeSocialAccounts` contain all of the social media platforms specified in the `includesActiveSocialAccounts` list. Profiles can have additional platforms in their `activeSocialAccounts` beyond those listed in `includesActiveSocialAccounts` and still be included in the filtered results.

Values: `bluesky`, `facebook`, `gmb`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `telegram`, `threads`, `tiktok`, `twitter`, `youtube`.

**isByokLinked** `boolean`

Filter profiles by BYOK (Bring Your Own Key) migration status. If `true`, return only profiles that have completed BYOK migration. If `false`, return only profiles that have a BYOK-eligible platform connected but have not yet migrated. Profiles without a BYOK-eligible platform are excluded when this filter is set. When omitted, all profiles are returned regardless of BYOK status. Currently applies to [X/Twitter BYOK](https://www.ayrshare.com/docs/dashboard/connect-social-accounts/x-twitter-byo-keys.md).

**actionLog** `boolean` (default: false)

Return the User Profile create and delete action log history for the past 60 days and the daily User Profile count for the past 60 days. Note:

<ul>
  <li>
    Action Log: Title and tags will not be returned for action log history prior to March 2025.
  </li>

  <li>
    User Profile Report: The time period might not correspond to your billing period. For example, your billing period might start and end on the 10th of the month.
    Please see your invoices for the billing period and other details.
  </li>
</ul>

You may specify a different time period by setting the actionLog to a number of days. For example,
`actionLog=10` query parameter will return the action log for the past 10 days and the daily User Profile count
for the past 10 days. The time period allowed is 1 day to 365 days.

**limit** `number` (default: 5000)

Limit the number of profiles returned. The default and maximum is 5000.

**cursor** `string`

If there are additional profiles to return and the `hasMore` flag is `true`, the `nextCursor` will be returned in the response.
Pass this cursor to the `cursor` query parameter to return the next set of profiles.

**include** `string | array`

Return extended profile data for troubleshooting. Requires `refId` parameter (single profile lookup).

Values (comma-separated string or array): `suspension`, `socialHealth`, `linkingErrors`, `activity`, `quota`, `unlinkHistory`, `actionLog`, `state`.

<ul>
  <li>`suspension` - isSuspended, reason, suspendedAt, unsuspendAt, suspensionCount</li>
  <li>`socialHealth` - Per-platform: linked, linkedAt, relinkRecommended, messagingEnabled, tokenExpiresAt</li>
  <li>`linkingErrors` - Per-platform: code, message, details, createdAt</li>
  <li>`activity` - lastApiCall, lastPost timestamps</li>
  <li>`quota` - used, limit</li>
  <li>`unlinkHistory` - Last unlink: platform, source (user/system), details, createdAt</li>
  <li>`actionLog` - Profile action history (create/update/delete)</li>
  <li>`state` - Per-network: a single normalized `state` value, plus `since`, `actionable`, `message`, and `helpUrl`</li>
</ul>

Every social network is always present in the `state` block, so a network
that has never been linked reports `unlinked` rather than being omitted.
Exactly one `state` value is returned per network, resolved in this order
when more than one condition applies:

| `state` | Meaning | `actionable` |
| - | - | - |
| `suspended` | The account is suspended, so the network cannot be used or linked. | `false` |
| `unlinked` | The network is not linked to this profile. | `true` |
| `identityVerificationRequired` | Meta requires the account holder to re-verify their identity. Posting returns `code: 326`. | `true` |
| `restricted` | The access token is no longer valid. Relink to restore access. | `true` |
| `rateLimited` | The account exceeded its API rate limit. Resets automatically at the end of the day. | `false` |
| `linked` | Linked and healthy. | `false` |

`actionable` tells you whether the end user can act to clear the state, so
it is what decides whether your row shows a button. `since` is included
only where a timestamp is recorded for that state, and is omitted
otherwise - notably for `restricted`, which records no date.

```javascript cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/profiles
```

```javascript cURL (with include) theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/profiles?refId=160c8700bd6ade&include=suspension,socialHealth,activity,quota"
```

```javascript JavaScript theme={"system"}
const API_KEY = "API_KEY";

fetch("https://api.ayrshare.com/api/profiles", {
      method: "GET",
      headers: {
        "Authorization": `Bearer ${API_KEY}`
      }
    })
      .then((res) => res.json())
      .then((json) => console.log(json))
      .catch(console.error);
```

```python Python theme={"system"}
import requests

headers = {'Authorization': 'Bearer API_KEY'}

r = requests.get('https://api.ayrshare.com/api/profiles', headers=headers)

print(r.json())
```

```php PHP theme={"system"}
<?php

$url = 'https://api.ayrshare.com/api/profiles';
$apiKey = 'API_KEY'; // Replace with your actual API key

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPGET => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer ' . $apiKey
    ],
]);

$response = curl_exec($curl);

if (curl_errno($curl)) {
    echo 'Error:' . curl_error($curl);
} else {
    echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}

curl_close($curl);

```

```csharp C# theme={"system"}
using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace ProfilesGETRequest_csharp
{
class Profiles
{
    static async Task Main(string[] args)
    {
        string API_KEY = "API_KEY";
        string url = "https://api.ayrshare.com/api/profiles";

        using (var client = new HttpClient())
        {
            client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);

            try
            {
                HttpResponseMessage response = await client.GetAsync(url);
                response.EnsureSuccessStatusCode();
                string responseBody = await response.Content.ReadAsStringAsync();
                Console.WriteLine(responseBody);
            }
            catch (HttpRequestException e)
            {
                Console.WriteLine($"Error: {e.Message}");
            }
        }
    }
}
}
```

```javascript 200: Success theme={"system"}
{
    "profiles": [
        {
            "status": "active",
            "title": "Digg It Title",
            "displayTitle": "Your title",
            "created": {
                "_seconds": 1604094099,
                "_nanoseconds": 530000000
            },
            "createdUTC": "2022-03-02T16:11:00.839Z",
            "refId": "160c8700bd6ade099b242d845e268fb986130c53",
            "activeSocialAccounts": [
                "twitter",
                "facebook",
                "linkedin",
                "instagram"
            ],
            "isByokLinked": true
        },
        {
            "status": "active",
            "title": "Super Profile",
            "created": {
                "_seconds": 1604377627,
                "_nanoseconds": 252000000
            },
            "createdUTC": "2022-03-02T16:11:00.839Z",
            "refId": "170a8700bd6ade099b242d845e268fb986130c53"
        },
        {
            "status": "suspended",
            "title": "Good Fun Title",
            "created": {
                "_seconds": 1605107864,
                "_nanoseconds": 96000000
            },
            "createdUTC": "2022-03-02T16:11:00.839Z",
            "refId": "180s8700bd6ade099b242d845e268fb986130c53",
            "activeSocialAccounts": [
                "facebook",
                "linkedin",
                "youtube"
            ],
            "suspended": true
        }
    ],
    "count": 100,
    "lastUpdated": "2025-06-14T15:53:26.016Z",
    "nextUpdate": "2025-06-14T15:58:26.016Z",
    "pagination": {
        "hasMore": true,
        "nextCursor": "eyJjcmVhdGVkIjoiMjAyNS0wNi0xNFQwMjo1",
        "limit": 100
    }
}
```

```json 200: Action Log theme={"system"}
{
  "profiles": {
    "actionLog": [
        {
            "action": "create",
            "refId": "2d83hd839282ehd892d2999912d1dsdgldfkepw",
            "title": "Profile 1",
            "created": "2025-05-29T14:10:33.709Z"
        },
        {
            "action": "create",
            "refId": "fmm02nd9c3nm9djjffdfsfshfihvp848jcsf222s",
            "title": "Profile 2",
            "created": "2025-05-28T20:33:32.186Z"
        }
    ],
    "userProfileReport": [
            {
                "reported": "2025-04-01T08:00:16.632Z",
                "userProfilesCount": 135
            },
            {
                "reported": "2025-03-31T08:00:22.651Z",
                "userProfilesCount": 135
            }
    ]
  },
  "lastUpdated": "2025-06-14T15:56:02.260Z",
  "nextUpdate": "2025-06-14T16:01:02.260Z"
}
```

```json 200: Include Extended Data theme={"system"}
{
    "profiles": [
        {
            "title": "Brand Marketing",
            "refId": "160c8700bd6ade099b242d845e268fb986130c53",
            "status": "suspended",
            "activeSocialAccounts": ["twitter", "instagram"],
            "suspension": {
                "isSuspended": true,
                "reason": "Too many duplicate posts",
                "suspendedAt": "2026-03-01T10:00:00.000Z",
                "unsuspendAt": "2026-03-03T10:00:00.000Z",
                "suspensionCount": 2
            },
            "socialHealth": {
                "twitter": {
                    "linked": true,
                    "linkedAt": "2026-01-15T10:30:00.000Z",
                    "relinkRecommended": false,
                    "messagingEnabled": true,
                    "tokenExpiresAt": null
                },
                "instagram": {
                    "linked": true,
                    "linkedAt": "2026-02-01T08:00:00.000Z",
                    "relinkRecommended": true,
                    "messagingEnabled": false,
                    "tokenExpiresAt": "2026-04-01T08:00:00.000Z"
                }
            },
            "activity": {
                "lastApiCall": "2026-03-05T09:15:00.000Z",
                "lastPost": "2026-03-04T14:30:00.000Z"
            },
            "quota": {
                "used": 450,
                "limit": 1000
            }
        }
    ],
    "count": 1,
    "pagination": {
        "hasMore": false,
        "nextCursor": null,
        "limit": 5000
    }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.