본문으로 건너뛰기
Twexapi
한국어
Esc
이동열기⌘J미리보기

[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 참조로 돌아가기
/Article Endpoints
POST/x/articles/publish
API 인증
AuthorizationBearer token · header필수
TwexAPI 전역 인증 토큰 (Bearer Token). 헤더에 포함되어야 합니다: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
요청 본문
필수application/json
cookiestring필수
사용자가 직접 승인한 Twitter 세션 자격 증명 또는 auth_token (BYOC — Bring Your Own Cookie). 자격 증명은 저장되지 않으며 무상태 프록시로만 실행됩니다. 자세한 내용은 [인증 및 보안 안내](/ko/authentication#write-operations--byoc-bring-your-own-cookie) 및 [쿠키 확인 방법](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie)을 참조하세요.
titlestring필수
Article title
markdownstring필수
Article body in Markdown format
cover_imagestring | any
Cover image: https URL or local file path (optional)
속성 표시
Any of:
string
string
any
any
visibilitystring
Visibility: Public / Followers / Mentioned
default: "Public"
응답
200요청 성공 응답
codeinteger필수
HTTP 상태 코드 (200은 성공)
msgstring필수
응답 메시지 (예: 'success')
dataArticlePublishData | any
엔드포인트가 반환한 핵심 데이터
속성 표시
Any of:
ArticlePublishData
article_idstring필수
Article draft ID
tweet_idstring필수
트윗 고유 ID
any
any
422요청 매개변수 유효성 검사 오류
detailValidationError[]
속성 표시
Array of ValidationError
locstring | integer[]필수
속성 표시
Array of string | integer
Any of:
string
string
integer
integer
msgstring필수
응답 메시지 (예: 'success')
typestring필수
inputany
ctxobject
429Daily tweet limit reached
500Server error
대화형 콘솔POST
대화형 콘솔 / API 테스트POST
Live Console
🌐대상 서버:https://api.twexapi.io
● 프로덕션 준비 완료
✍️
쓰기 작업 인증 정보 가이드 (TwexAPI 키 + Twitter 쿠키)

1. TwexAPI 플랫폼 키 (Bearer Token): 요청 과금 및 인증을 위해 아래 "API 인증"에 입력하세요.

2. Twitter 계정 쿠키: 트윗, 좋아요, 팔로우 등 쓰기 작업을 위해 아래 요청 본문의 cookie 필드에 쿠키(예: auth_token=...; ct0=...)를 입력하세요.

🔑API 인증
📝요청 본문application/json
📡
暂无响应数据

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

요청 예시
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"
}'
응답 예시
{
  "code": 0,
  "msg": "string",
  "data": {
    "article_id": "string",
    "tweet_id": "string"
  }
}