İçeriğe geç
Twexapi
Türkçe
Esc
gezin⌘Jönizle

[Quick] One-step article publish

Publish a complete X Article in a single call. Suitable for simple, one-shot use cases.

⚠️ Recommended: use the step-by-step flow instead. The step-by-step flow gives you full control — preview the draft before publishing, retry individual steps on failure, and reuse the same article_id across multiple calls.

Step-by-step endpoints:

  1. POST /x/articles/draft → get article_id
  2. PUT /x/articles/{article_id}/cover (optional)
  3. PUT /x/articles/{article_id}/title
  4. PUT /x/articles/{article_id}/content
  5. POST /x/articles/{article_id}/publish → get tweet_id

Returns article_id and tweet_id on success.

API Belgelerine Dön
/Article Endpoints
POST/x/articles/publish
API Yetkilendirmesi
AuthorizationBearer token · headerzorunlu
TwexAPI genel Bearer Token kimlik bilgisi. İstek başlığı: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
İstek Gövdesi
zorunluapplication/json
cookiestringzorunlu
Kullanıcının kendi yetkilendirilmiş Twitter oturum kimlik bilgileri veya auth_token (BYOC — Bring Your Own Cookie). Sıfır kimlik bilgisi saklama ile durum bilgisi olmayan proxy yürütmesi. [Kimlik Doğrulama Güvenliği](/tr/authentication#write-operations--byoc-bring-your-own-cookie) ve [Cookie Nasıl Alınır](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie) sayfasına bakın.
titlestringzorunlu
Article title
markdownstringzorunlu
Article body in Markdown format
cover_imagestring | any
Cover image: https URL or local file path (optional)
Özellikleri göster
Any of:
string
string
any
any
visibilitystring
Visibility: Public / Followers / Mentioned
default: "Public"
Yanıtlar
200Başarılı Yanıt
codeintegerzorunlu
HTTP durum kodu (200 başarılı anlamına gelir)
msgstringzorunlu
Yanıt mesajı (örn: 'success')
dataArticlePublishData | any
Uç nokta tarafından döndürülen ana veri
Özellikleri göster
Any of:
ArticlePublishData
article_idstringzorunlu
Article draft ID
tweet_idstringzorunlu
Tweetin benzersiz ID'si
any
any
422Parametre Doğrulama Hatası
detailValidationError[]
Özellikleri göster
Array of ValidationError
locstring | integer[]zorunlu
Özellikleri göster
Array of string | integer
Any of:
string
string
integer
integer
msgstringzorunlu
Yanıt mesajı (örn: 'success')
typestringzorunlu
inputany
ctxobject
429Daily tweet limit reached
500Server error
Etkileşimli KonsolPOST
Etkileşimli Konsol / API TestiPOST
Live Console
🌐Hedef Sunucu:https://api.twexapi.io
● Canlı Ortam Hazır
✍️
Yazma İşlemi Kimlik Kılavuzu (TwexAPI Anahtarı + Twitter Çerezi)

1. TwexAPI Anahtarı (Bearer Token): İstek faturalandırması ve kimlik doğrulama için aşağıdaki "API Yetkilendirmesi"ne girin.

2. Twitter Hesabı Çerezi: Yazma işlemleri için (tweet, beğeni, takip), aşağıdaki cookie alanına hedef hesabın Çerezini (örn. auth_token=...; ct0=...) girin.

🔑API Yetkilendirmesi
📝İstek Gövdesiapplication/json
📡
暂无响应数据

请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。

İstek
curl -X POST "https://api.twexapi.io/x/articles/publish" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "cookie": "string",
  "title": "string",
  "markdown": "string",
  "cover_image": "string",
  "visibility": "Public"
}'
Yanıt
{
  "code": 0,
  "msg": "string",
  "data": {
    "article_id": "string",
    "tweet_id": "string"
  }
}