POST /x/accounts/{id}/following

Follow a user (X allows API follows only with Enterprise access since 2026-04-20); pendingFollow when the account is protected. LIVE and public (except bookmarks); queued for approval (202) while approval applies

POST
/x/accounts/{id}/following

Authorization

BearerAuth
headerAuthorizationBearer <token>

API key sk_...

Path Parameters

id*string

X account id

Request Body

application/json
  1. body
userId?string

Numeric X user id

username?string

@username (instead of userId)

Response Body

{accountId, action, undo, target, reposted | liked | bookmarked | following}

application/json
  1. response
accountId?string
action?string
Value in"repost""like""bookmark""follow"
undo?boolean
target?string
reposted?boolean
liked?boolean
bookmarked?boolean
following?boolean
pendingFollow?boolean
Example Request
curl -X POST 'https://example.com/api/v1/x/accounts/string/following' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "accountId": "string",  "action": "repost",  "undo": true,  "target": "string",  "reposted": true,  "liked": true,  "bookmarked": true,  "following": true,  "pendingFollow": true}