> ## Documentation Index
> Fetch the complete documentation index at: https://plai-a079b342.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connected Accounts

> This endpoint allows you to retrieve a list of ads accounts (e.g., Facebook, Instagram, etc.) that are connected to a user's profile on our platform. By specifying the user's unique ID, you can access information about the ads accounts they have linked, enabling you to manage or interact with these accounts for further operations, such as advertising or analytics.

## Request Body

<ParamField body="userId" type="string" required>
  User ID, If not already created, make a user on [create user
  page](/api-reference/endpoint/auth/create_user) first. If already created,
  retrieve the user ID from [get profile
  page](/api-reference/endpoint/auth/get_profile).
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates that the HTTP response was successful (status code 200 OK).
</ResponseField>

<ResponseField name="results" type="object">
  <Expandable title="Results Object">
    <ResponseField name="success" type="boolean">
      Indicates whether the specific operation or API action was successful.
    </ResponseField>

    <ResponseField name="connectedAccounts" type="object">
      <Expandable title="Connected Ads Accounts">
        <ResponseField name="facebookAds" type="object" dynamicKey="socialMediaPlatform">
          <Expandable title="Facebook Ads Account Details">
            <ResponseField name="userName" type="string">
              The authenticated user's display name
            </ResponseField>

            <ResponseField name="adAccountId" type="number">
              Platform-specific account identifier
            </ResponseField>

            <ResponseField name="adAccountName" type="string">
              Account Name
            </ResponseField>

            <ResponseField name="currencyCode" type="string">
              3-letter ISO currency code for the account
            </ResponseField>

            <ResponseField name="fbPage" type="object">
              <Expandable title="Facebook Page Details">
                <ResponseField name="id" type="string">
                  Page ID
                </ResponseField>

                <ResponseField name="name" type="string">
                  Page Name
                </ResponseField>

                <ResponseField name="pictureUrl" type="string">
                  Page Picture
                </ResponseField>

                <ResponseField name="businessManagerId" type="string">
                  Business Manager Id
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="igPage" type="object">
              <Expandable title="Instagram Page Details">
                <ResponseField name="id" type="string">
                  Page ID
                </ResponseField>

                <ResponseField name="name" type="string">
                  Page Name
                </ResponseField>

                <ResponseField name="pictureUrl" type="string">
                  Page Picture
                </ResponseField>

                <ResponseField name="businessManagerId" type="string">
                  Business Manager Id
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="linkedinAds" type="object" dynamicKey="socialMediaPlatform">
          <Expandable title="Linkedin Details">
            <ResponseField name="userName" type="string">
              The authenticated user's display name
            </ResponseField>

            <ResponseField name="accountId" type="number">
              Platform-specific account identifier
            </ResponseField>

            <ResponseField name="accountName" type="string">
              Account Name
            </ResponseField>

            <ResponseField name="currencyCode" type="string">
              3-letter ISO currency code for the account
            </ResponseField>

            <ResponseField name="organizationId" type="string">
              Organization ID
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="googleAds" type="object" dynamicKey="socialMediaPlatform">
          <Expandable title="Google Ads Account Details">
            <ResponseField name="userName" type="string">
              The authenticated user's display name
            </ResponseField>

            <ResponseField name="email" type="string">
              The authenticated user's email
            </ResponseField>

            <ResponseField name="accountId" type="number">
              Platform-specific account identifier
            </ResponseField>

            <ResponseField name="accountName" type="string">
              Account Name
            </ResponseField>

            <ResponseField name="currencyCode" type="string">
              3-letter ISO currency code for the account
            </ResponseField>

            <ResponseField name="managerId" type="string">
              Manager ID
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="error" type="string">
      Error string if something went wrong
    </ResponseField>
  </Expandable>
</ResponseField>
