Pin Post
POST
/tw-v2/interaction/pin-post1 API unit per call · How billing works
Description
Pin one of your posts to the top of your profile.
Usage notes
Pass the ID of a post by the authToken account. X can also add the pinned post to the account's Highlights tab; metadata.added_to_highlights says whether it did. To unpin it, use /tw-v2/interaction/unpin-post. If the change can't be confirmed, the request fails with 502 and is not billed.
A request costs one API unit. 400, 401, 403, 409, 422, 429 and 5xx errors are free; a 404 is billed.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| auth | string | required | Authentication token (auth_token cookie value) of the X account that owns the post |
| tweet | string | required | ID of the post to pin |
| proxystringoptional | string | optional | Optional proxy in format 'host:port@user:pass' |
Code Examples
const body = {
authToken: 'YOUR_AUTH_TOKEN',
tweetId: '1234567890'
};
const response = await fetch('https://api.tweetapi.com/tw-v2/interaction/pin-post', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
});
const data = await response.json();
console.log(data);
Response
Success Response (200 OK)
Synthetic example:
200
{
"data": {
"id": "1234567890",
"action": "pin_tweet",
"timestamp": "2026-11-03T12:00:00.000Z",
"success": true,
"metadata": {
"tweet_id": "1234567890",
"added_to_highlights": false
}
}
}Errors
Errors return { statusCode, message } with a non-2xx HTTP status.
400
{
"statusCode": 400,
"message": "Request validation failed"
}TweetAPI is a third-party API and is not affiliated with X Corp.