> ## Documentation Index
> Fetch the complete documentation index at: https://docs.twexapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# [Step 5/5] Publish an article draft

> **Step 5 of 5** — Publish the draft. Returns `article_id` and `tweet_id`.

- `article_id`: obtained from Step 1
- `visibility`: `Public` (default) / `Followers` / `Mentioned`

⚠️ Make sure Steps 3 and 4 are completed before publishing. A draft without a title or content can still be published but will appear empty.



## OpenAPI

````yaml /api-reference/openapi.json post /x/articles/{article_id}/publish
openapi: 3.1.0
info:
  title: Twitter API Service
  description: |2-

            A comprehensive Twitter API service that provides various Twitter operations including:
            
            * **Search Operations**: Advanced search, hashtags, cashtags
            * **Tweet Operations**: Post, like, retweet, quote, bookmark, delete
            * **User Operations**: Batch user information retrieval
            * **Influencer Operations**: Get tweets from top influencers
            
            All endpoints return standardized responses in the format:
            ```json
            {
                "code": 200,
                "msg": "success", 
                "data": {...}
            }
            ```
            
            ## Authentication
            
            This API uses Bearer token authentication. Include your token in the Authorization header:
            ```
            Authorization: Bearer your_token_here
            ```
            
  contact:
    name: API Support
    email: support@twitterxapi.com
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.twexapi.io
    description: Development server
security: []
paths:
  /x/articles/{article_id}/publish:
    post:
      tags:
        - Article Endpoints
      summary: '[Step 5/5] Publish an article draft'
      description: >-
        **Step 5 of 5** — Publish the draft. Returns `article_id` and
        `tweet_id`.


        - `article_id`: obtained from Step 1

        - `visibility`: `Public` (default) / `Followers` / `Mentioned`


        ⚠️ Make sure Steps 3 and 4 are completed before publishing. A draft
        without a title or content can still be published but will appear empty.
      operationId: article_publish_x_articles__article_id__publish_post
      parameters:
        - name: article_id
          in: path
          required: true
          schema:
            type: string
            title: Article Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArticlePublishBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArticlePublishResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Daily tweet limit reached
          content:
            application/json:
              example:
                code: 429
                msg: Daily tweet limit reached, please try again tomorrow.
        '500':
          description: Server error
          content:
            application/json:
              example:
                code: 500
                msg: Internal server error
      security:
        - HTTPBearer: []
components:
  schemas:
    ArticlePublishBody:
      properties:
        cookie:
          type: string
          title: Cookie
          description: Twitter cookie string
        visibility:
          type: string
          title: Visibility
          description: Public / Followers / Mentioned
          default: Public
      type: object
      required:
        - cookie
      title: ArticlePublishBody
    ArticlePublishResponse:
      properties:
        code:
          type: integer
          title: Code
          description: 200 = success, 429 = rate limit, 500 = server error
        msg:
          type: string
          title: Msg
          description: Human-readable result message
        data:
          anyOf:
            - $ref: '#/components/schemas/ArticlePublishData'
            - type: 'null'
      type: object
      required:
        - code
        - msg
      title: ArticlePublishResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ArticlePublishData:
      properties:
        article_id:
          type: string
          title: Article Id
          description: Article draft ID
        tweet_id:
          type: string
          title: Tweet Id
          description: Tweet ID of the published article post
      type: object
      required:
        - article_id
        - tweet_id
      title: ArticlePublishData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````