---
title: "Connect a new social account"
method: POST
path: "/accounts"
tags: ["Accounts"]
---

# Connect a new social account

`POST /accounts`

## Request

- Base URL: `https://socialbu.com/api/v1`
- URL: `https://socialbu.com/api/v1/accounts`
- Auth: HTTP bearer

Initiates the OAuth connection flow for a new social media account. Returns a `connect_url` that should be opened in a browser popup. Optionally provide a `postback_url` to receive a webhook notification when the connection completes.

## Request body

- object
  - `provider` string, required: Social media network name e.g, (Instagram, Twitter etc.)
  - `postback_url` string: Receive postback at this URL. Sends a JSON POST request with parameters `account_action` (added, updated, connected, disconnected), `account_id`, `account_type`, and `account_name`. The `account_action` is `disconnected` if an account is found disconnected by the system, `connected` if a previously disconnected account is reconnected by the system automatically, `added` when a new account is added/connected for the first time, and `updated` when an existing account is reconnected.
  - `account_id` string: Social account id if reconnecting an existing account.

## Response `200`

You get the URL for connecting social accounts. Recommended to open it in a popup.

- object
  - `connect_url` string, uri: URL that you can visit to add your accounts

## Other responses

- `400`: The provider is not supported

---

[API](https://skmtc.dev/socialbu/apis/socialbu-api.md) · [All operations](https://skmtc.dev/socialbu/apis/socialbu-api/llms.txt) · [OpenAPI document](https://skmtc.dev/socialbu/apis/socialbu-api/revisions/841b3ab0f671?raw)
