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

# User Profiles प्राप्त करें

> Primary profile से जुड़े सभी profiles प्राप्त करें।

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

export const HeaderAPI = ({noProfileKey, profileKeyRequired}) => <>
    <ParamField header="Authorization" type="string" required>
      <a href="/apis/overview#authorization">API Key</a> of the Primary Profile.
      <br />
      <br />
      Format: <code>Authorization: Bearer API_KEY</code>
    </ParamField>
    {!noProfileKey && (profileKeyRequired ? <ParamField header="Profile-Key" type="string" required>
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField> : <ParamField header="Profile-Key" type="string">
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField>)}
  </>;

<PlansAvailable plans={["business"]} maxPackRequired={false} />

Primary profile से जुड़े सभी profiles प्राप्त करें। Primary Profile परिणामों में नहीं लौटाया जाता।

सुरक्षा के लिए, Profile Keys इस GET कॉल के माध्यम से नहीं लौटाई जाती हैं। अधिक जानकारी के लिए कृपया [यहाँ](/apis/profiles/create-profile) देखें।

## Header Parameters

<HeaderAPI noProfileKey />

## Query Parameters

<ParamField query="title" type="string">
  URL encoded शीर्षक से जुड़े केवल profile को लौटाएँ।
</ParamField>

<ParamField query="refId" type="string">
  दिए गए `refId` से जुड़े केवल profile को लौटाएँ। refId profile निर्माण के दौरान या /user endpoint से लौटाया गया था।
</ParamField>

<ParamField query="hasActiveSocialAccounts" type="boolean" default={false}>
  यदि `true` तो केवल उन profiles को लौटाएँ जिनके पास कम से कम एक कनेक्टेड social खाता है
  (`activeSocialAccounts` की लंबाई शून्य से अधिक)। यदि `false` तो केवल शून्य कनेक्टेड social खातों वाले profiles को लौटाएँ (`activeSocialAccounts` की लंबाई शून्य है)।
</ParamField>

<ParamField query="includesActiveSocialAccounts" type="array">
  profiles को फ़िल्टर करें ताकि वे शामिल हों जिनके `activeSocialAccounts` में `includesActiveSocialAccounts` सूची में निर्दिष्ट सभी social media प्लेटफ़ॉर्म हैं। Profiles के `activeSocialAccounts` में `includesActiveSocialAccounts` में सूचीबद्ध के अलावा अतिरिक्त प्लेटफ़ॉर्म हो सकते हैं और फिर भी filter परिणामों में शामिल किए जाते हैं।

  मान: `bluesky`, `facebook`, `gmb`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `telegram`, `threads`, `tiktok`, `twitter`, `youtube`।
</ParamField>

<ParamField query="isByokLinked" type="boolean">
  BYOK (Bring Your Own Key) migration स्थिति द्वारा profiles को फ़िल्टर करें। यदि `true`, तो केवल उन profiles को लौटाएँ जिन्होंने BYOK migration पूरा किया है। यदि `false`, तो केवल उन profiles को लौटाएँ जिनके पास BYOK-eligible प्लेटफ़ॉर्म कनेक्टेड है लेकिन अभी तक migrate नहीं हुए हैं। BYOK-eligible प्लेटफ़ॉर्म के बिना profiles इस filter के सेट होने पर बाहर रखे जाते हैं। जब omitted होता है, तो BYOK स्थिति की परवाह किए बिना सभी profiles लौटाए जाते हैं। वर्तमान में [X/Twitter BYOK](/dashboard/connect-social-accounts/x-twitter-byo-keys) पर लागू होता है।
</ParamField>

<ParamField query="actionLog" type="boolean" default={false}>
  पिछले 60 दिनों के लिए User Profile create और delete action log इतिहास और पिछले 60 दिनों के लिए billing के लिए उपयोग की गई सक्रिय user गणना लौटाएँ। नोट:

  <ul className="custom-bullets">
    <li>
      Action Log: March 2025 से पहले के action log इतिहास के लिए Title और tags नहीं लौटाए जाएँगे।
    </li>

    <li>
      User Profile Report: समय अवधि आपकी billing अवधि के अनुरूप नहीं हो सकती है। उदाहरण के लिए, आपकी billing अवधि महीने की 10 तारीख को शुरू और समाप्त हो सकती है।
      कृपया billing अवधि और अन्य विवरण के लिए अपने invoices देखें।
    </li>
  </ul>

  आप actionLog को दिनों की संख्या पर सेट करके एक अलग समय अवधि निर्दिष्ट कर सकते हैं। उदाहरण के लिए,
  `actionLog=10` query parameter पिछले 10 दिनों के लिए action log और पिछले 10 दिनों के लिए
  रिपोर्ट की गई सक्रिय user गणना लौटाएगा। अनुमत समय अवधि 1 दिन से 365 दिन है।
</ParamField>

<ParamField query="limit" type="number" default={5000}>
  लौटाए गए profiles की संख्या सीमित करें। Default और अधिकतम 5000 है।
</ParamField>

<ParamField query="cursor" type="string">
  यदि लौटाने के लिए अतिरिक्त profiles हैं और `hasMore` फ़्लैग `true` है, तो `nextCursor` प्रतिक्रिया में लौटाया जाएगा।
  Profiles के अगले सेट को लौटाने के लिए इस cursor को `cursor` query parameter पर पास करें।
</ParamField>

<ParamField query="include" type="string | array">
  समस्या निवारण के लिए विस्तारित profile डेटा लौटाएँ। `refId` parameter (एकल profile lookup) आवश्यक है।

  मान (comma-separated string या array): `suspension`, `socialHealth`, `linkingErrors`, `activity`, `quota`, `unlinkHistory`, `actionLog`।

  <ul className="custom-bullets">
    <li>`suspension` - isSuspended, reason, suspendedAt, unsuspendAt, suspensionCount</li>
    <li>`socialHealth` - प्रति-प्लेटफ़ॉर्म: linked, linkedAt, relinkRecommended, messagingEnabled, tokenExpiresAt</li>
    <li>`linkingErrors` - प्रति-प्लेटफ़ॉर्म: code, message, details, createdAt</li>
    <li>`activity` - lastApiCall, lastPost timestamps</li>
    <li>`quota` - used, limit</li>
    <li>`unlinkHistory` - अंतिम unlink: platform, source (user/system), details, createdAt</li>
    <li>`actionLog` - Profile action इतिहास (create/update/delete)</li>
  </ul>
</ParamField>

<RequestExample>
  ```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}");
              }
          }
      }
  }
  }
  ```
</RequestExample>

<ResponseExample>
  ```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"
          }
      ],
      "userProfilesReport": [
              {
                  "reported": "2025-03-31T08:00:22.651Z",
                  "userProfileCount": 135
              },
              {
                  "reported": "2025-04-01T08:00:16.632Z",
                  "userProfileCount": 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
      }
  }
  ```
</ResponseExample>
