OpenapiSocial
Returns the org's connected accounts — each one's id, network, handle, status…
Returns the org's connected accounts — each one's id, network, handle, status and timestamps, most-recently-updated first.
GET /v1/social/accounts
| Address | https://api.hanzo.ai/v1/social/accounts |
| Method | GET |
| Operation | get_social_accounts |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the org's connected accounts — each one's id, network, handle, status and timestamps, most-recently-updated first.
An account's provider access token is NEVER included in any response on this surface. Only the publisher reads it.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
provider | query | string | — | Provider keeps only accounts on one network — x, facebook, instagram, linkedin, tiktok, youtube or threads. Omit it for every network. |
limit | query | string | — | Limit bounds the page, defaulting to 200 and capped at 1000. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | socialAccounts | ok |
200 body — 7 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | socialAccount[] | — | Data is the accounts, most-recently-updated first, bounded by the limit. |
data[].createdAt | body | integer | — | CreatedAt is when the account was connected, as a unix timestamp in seconds. |
data[].handle | body | string | — | Handle is the account's public name on the network, as the customer knows it. |
data[].id | body | string | — | ID is the account's identifier, minted on connect and the id every later call addresses it by. |
data[].provider | body | string | — | Provider is the network this account is on: x, facebook, instagram, linkedin, tiktok, youtube or threads. |
data[].status | body | string | — | Status is the connection lifecycle: connected, disconnected or error. |
data[].updatedAt | body | integer | — | UpdatedAt is when the account row last changed, as a unix timestamp in seconds. |
Failure carries the platform error shape — see Errors.
Examples
hanzo social accounts listimport { Configuration, SocialApi } from 'hanzoai';
const api = new SocialApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getSocialAccounts();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import SocialApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = SocialApi(client).get_social_accounts()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.SocialAPI.GetSocialAccounts(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, social_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = social_api::get_social_accounts(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.SocialApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new SocialApi(client).getSocialAccounts();curl https://api.hanzo.ai/v1/social/accounts \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches social through the social tool, which names its 13 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_social_accounts"
}
}
}'How is this guide?