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
BearerAuthheader
AuthorizationBearer <token>API key sk_...
id*stringX account id
application/json- body
userId?stringNumeric X user id
username?string@username (instead of userId)
{accountId, action, undo, target, reposted | liked | bookmarked | following}
application/json- response
accountId?stringaction?stringValue in
"repost""like""bookmark""follow"undo?booleantarget?stringreposted?booleanliked?booleanbookmarked?booleanfollowing?booleanpendingFollow?booleancurl -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}