Skip to main content

Prerequisites

  • A SocialAPI.AI API key — get one at social-api.ai
  • At least one connected social account (see Step 1 below)
  • curl or any HTTP client

Step 1: Connect a social account

OAuth connect is not yet live. During the beta, accounts are connected manually. Contact support@social-api.ai to connect your first account. You’ll receive an account ID like acc_01HZ9X3Q4R5M6N7P8V2K0W1J.

Step 2: List your connected accounts

curl https://api.social-api.ai/v1/accounts \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "count": 1,
  "data": [
    {
      "id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
      "platform": "instagram",
      "name": "Acme Corp",
      "username": "acmecorp"
    }
  ]
}

Step 3: Fetch recent comments

curl "https://api.social-api.ai/v1/accounts/acc_01HZ9X3Q4R5M6N7P8V2K0W1J/comments?limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "count": 10,
  "data": [
    {
      "id": "socapi_cmt_aW5zdGFncmFtOjE3ODQx",
      "platform": "instagram",
      "type": "comment",
      "author": { "name": "Jane Smith", "id": "17841405793187218" },
      "content": { "text": "Love this product!" },
      "created_at": "2026-02-15T14:30:00Z"
    }
  ]
}

Step 4: Reply to a comment

Use the id from the previous response. The prefix socapi_cmt_ tells SocialAPI.AI this is a comment — no extra parameters needed.
curl -X POST \
  "https://api.social-api.ai/v1/accounts/acc_01HZ9X3Q4R5M6N7P8V2K0W1J/interactions/socapi_cmt_aW5zdGFncmFtOjE3ODQx/reply" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Thanks Jane! We are glad you enjoyed it."}'
{
  "id": "socapi_cmt_cmVwbHk6MTIzNDU2Nzg5",
  "created_at": "2026-02-15T14:35:00Z"
}

Next steps