vlayer logovlayer
API reference

Social accounts

Creator social account links

Connect social account

Get a Vouch redirect URL to connect an Instagram or TikTok account.

POST
/social-accounts/connect

Authorization

AuthorizationRequiredBearer <token>

API token. Send it as Authorization: Bearer <API_TOKEN>.

In: header

Request Body

application/jsonRequired
platformRequiredstring
Value in: "instagram" | "tiktok"
inputsobject

Optional platform-specific inputs

curl -X POST "//social-accounts/connect" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "inputs": {}
  }'

OAuth redirect URL

{
  "data": {
    "url": "http://example.com"
  }
}

List connected social accounts

GET
/social-accounts

Authorization

AuthorizationRequiredBearer <token>

API token. Send it as Authorization: Bearer <API_TOKEN>.

In: header

curl -X GET "//social-accounts" \
  -H "Authorization: Bearer <token>"

Social accounts

{
  "data": [
    {
      "id": 1,
      "platform": "instagram",
      "platformUsername": "creator_jane",
      "connectedAt": "2019-08-24T14:15:22Z"
    }
  ]
}

Create creator + linked social account (admin)

Admin-only. Registers a creator (by externalId) and links a social account in one step, without going through Vouch handle-ownership verification. The caller asserts the handle is valid. Profile data is fetched best-effort and stored on the account.

Uniqueness is on externalId + platform + handle: the same handle may be linked under different externalIds, and an existing externalId is reused (not rejected). Re-posting the same externalId + platform + handle is idempotent and returns 200 with the existing record; a new link returns 201.

POST
/social-accounts

Authorization

AuthorizationRequiredBearer <token>

API token. Send it as Authorization: Bearer <API_TOKEN>.

In: header

Request Body

application/jsonRequired
platformRequiredstring
Value in: "instagram" | "tiktok"
handleRequiredstring

Platform handle (with or without leading @)

externalIdRequiredstring

Customer-side identity for this creator (stored on users.externalId)

emailstring

Optional. If omitted, defaults to a placeholder address derived from externalId

Format: "email"
displayNamestring

Optional display name

curl -X POST "//social-accounts" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "handle": "creator_jane",
    "externalId": "cust_abc123",
    "email": "jane@example.com",
    "displayName": "Jane Doe"
  }'

Already linked — this externalId + platform + handle existed; existing record returned unchanged

{
  "data": {
    "user": {
      "id": 42,
      "externalId": "cust_abc123",
      "email": "jane@example.com"
    },
    "socialAccount": {
      "id": 7,
      "platform": "instagram",
      "platformUsername": "creator_jane",
      "profileData": {},
      "connectedAt": "2019-08-24T14:15:22Z"
    }
  }
}

Disconnect a social account (admin)

Admin-only. Soft-disconnects the active social account matching externalId + platform + handle (sets disconnectedAt). The account immediately stops counting for verification and listings; historical attempts, matched comments, and point rewards are kept intact.

After disconnecting, the same user may verify a different handle, and a different externalId may link the freed handle. Re-posting the same link via POST /social-accounts reconnects it.

POST
/social-accounts/disconnect

Authorization

AuthorizationRequiredBearer <token>

API token. Send it as Authorization: Bearer <API_TOKEN>.

In: header

Request Body

application/jsonRequired
platformRequiredstring
Value in: "instagram" | "tiktok"
handleRequiredstring

Platform handle (with or without leading @); case-insensitive

externalIdRequiredstring

Customer-side identity of the creator the handle is linked to

curl -X POST "//social-accounts/disconnect" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "handle": "creator_jane",
    "externalId": "cust_abc123"
  }'

Social account disconnected

{
  "data": {
    "id": 7,
    "platform": "instagram",
    "platformUsername": "creator_jane",
    "disconnectedAt": "2019-08-24T14:15:22Z"
  }
}