# Social accounts

## List of all social accounts of a workspace

<mark style="color:green;">`GET`</mark> `https://api.asters.ai/api/external/v1.0/workspaces/{{workspace_id}}/socialAccounts`

#### Headers

| Key                                         | Value                                               |
| ------------------------------------------- | --------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | API Key generated in Asters for user authentication |

{% tabs %}
{% tab title="200 Social accounts successfully recovered" %}

```javascript
{
    "description": "Social Account in workspace",
    "data": [
        {
            "_id": "6630bfe7678a6f4e41d768fc",
            "name": "SocialReply",
            "account_id": "-0004YCYPM4hL7iZj_quDDpk9ED4W2MZsoVO",
            "provider": "tiktok",
            "type": "profile",
            "brandvoiceInfo": {
                "totalPosts": 0
            },
            "picture": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/f3d3db2b303e83a17389df8c65cc7a60~tplv-tiktokx-cropcenter:168:168.jpeg?dr=10397&refresh_token=cc3354b9&x-expires=1746057600&x-signature=OqYH4fb%2FgILlxmr837bwc5Hp45M%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=8aecc5ac&idc=useast2a",
            "expired": false,
            "created_at": "2024-04-30T09:54:42.838Z"
        },
        {
            "_id": "6630c074678a6f4e41d769fb",
            "name": "SocialReply",
            "account_id": "1706428398791282688",
            "provider": "x",
            "type": "profile",
            "brandvoiceInfo": {
                "lastPostDate": "2024-05-20T08:45:02.825Z",
                "firstPostDate": "2024-05-20T08:45:02.825Z",
                "totalPosts": 7
            },
            "picture": "https://pbs.twimg.com/profile_images/1706428490856140800/tqi6vbNF_normal.jpg",
            "expired": true,
            "created_at": "2024-06-12T08:01:11.518Z"
        },
        {
            "_id": "680f74150c8e665de0ea52d6",
            "name": "Social Reply",
            "account_id": "17841462124130951",
            "provider": "instagram",
            "type": "business",
            "brandvoiceInfo": {
                "lastPostDate": "2025-01-15T12:35:08.000Z",
                "firstPostDate": "2023-09-28T08:07:41.000Z",
                "totalPosts": 67
            },
            "picture": "https://scontent-mxp1-1.xx.fbcdn.net/v/t39.30808-1/370482921_303203452295894_6450337016541313802_n.jpg?stp=dst-jpg_s100x100_tt6&_nc_cat=103&ccb=1-7&_nc_sid=fe756c&_nc_ohc=YB8sh5OG3m0Q7kNvwFWH2zq&_nc_oc=AdlcLZaLebxVGXBFZQb8Rlj-n4TKWL_Wqu6V73ehv7N88TdC2yvyd8mbv_54Q7xjvNE&_nc_zt=24&_nc_ht=scontent-mxp1-1.xx&edm=AGaHXAAEAAAA&_nc_gid=drJMzWqwS-_Slf-C7di-8g&oh=00_AfGQzM0B5OCDxO8n71AO0pr0IagjlYP_-uYlE5s018Cr8w&oe=68155D96",
            "expired": false,
            "created_at": "2025-04-28T12:27:01.720Z"
        }
    ],
    "error": null
}
```

{% endtab %}

{% tab title="401 Permission denied" %}

{% endtab %}

{% tab title="500: Internal Server Error Internal server error" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.asters.ai/api/endpoints/social-accounts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
