Skip to main content
POST
/
social_accounts
Create a Social Account
curl --request POST \
  --url https://api.whop.com/api/v1/social_accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "platform": "facebook",
  "account_id": "<string>"
}
'
import requests

url = "https://api.whop.com/api/v1/social_accounts"

payload = {
"platform": "facebook",
"account_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({platform: 'facebook', account_id: '<string>'})
};

fetch('https://api.whop.com/api/v1/social_accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/social_accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'platform' => 'facebook',
'account_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.whop.com/api/v1/social_accounts"

payload := strings.NewReader("{\n \"platform\": \"facebook\",\n \"account_id\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.whop.com/api/v1/social_accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": \"facebook\",\n \"account_id\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.whop.com/api/v1/social_accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform\": \"facebook\",\n \"account_id\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "external_id": "<string>",
  "id": "<string>",
  "name": "<string>",
  "platform": "x",
  "profile_picture_url": "<string>",
  "scopes": [
    "<string>"
  ],
  "url": "<string>",
  "username": "<string>",
  "verified": true
}
{
"error": {
"message": "<string>",
"type": "<string>"
}
}
{
"error": {
"message": "<string>",
"type": "<string>"
}
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Headers

Api-Version-Date
string

Pins the request to a dated API version.

Example:

"2026-07-08-1"

Body

application/json
platform
enum<string>
required

The platform to create the social account on.

Available options:
facebook
account_id
string

The Account (biz_ identifier) to create the social account for. An account-scoped API key may omit this to default to its own account.

Response

social account created

external_id
string | null
required

The platform-specific ID for this social account.

id
string
required

Unique identifier for the social account.

name
string | null
required

The display name of the social account on the platform.

platform
enum<string>
required

The platform the social account exists on.

Available options:
x,
instagram,
youtube,
tiktok,
facebook
Example:

"x"

profile_picture_url
string | null
required

The URL where the profile picture of the social account can be accessed.

scopes
string[]
required

Capabilities Whop retains specific to this social account. For example, Whop may request the ability to run advertisements that use this social account's identity, reflected by the presence of advertise in this value.

url
string
required

The URL where the social account can be accessed on the platform.

username
string
required

The username of the social account on the platform.

verified
boolean
required

Whether the social account is verified on the platform.