---
title: "Create an X Article"
method: POST
path: "/v1/workspaces/{workspaceId}/articles"
tags: ["Articles"]
---

# Create an X Article

`POST /v1/workspaces/{workspaceId}/articles`

## Request

- Base URL: `https://api.maevesocial.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maevesocial.com/v1/workspaces/{workspaceId}/articles`
- Auth: HTTP bearer

Creates a draft article. Upload images to the Media Room first, then set coverMediaId and reference inline images with <img data-media-id="...">. Nothing is sent to X.

## Path parameters

- `workspaceId` string, uuid, required

## Headers

- `idempotency-key` string, required
- `Idempotency-Key` string

## Request body

- object
  - `integrationId` string, uuid, required: X integration from integrations.list whose content.canPublishArticles is true (X Premium).
  - `title` string, required: Article title shown on X, up to 200 characters.
  - `bodyHtml` string: Article body as HTML: p, h1 to h3, strong, em, s, a href, blockquote, ul, ol, li, hr, br and img. Each img needs data-media-id set to a still image of 5 MB or less from the Media Room, and Maeve fills in its src. Up to 100,000 characters of text and 20 images.
  - `coverMediaId` string, uuid: Media Room ID of a still image of 5 MB or less (not a GIF) to use as the cover.

## Response `201`

Created article

- object
  - `data` object, required
    - `article` object, required
      - `contentId` string, required: Names the article here and in content.* lifecycle operations.
      - `rootId` string, required
      - `title` string, required
      - `status` string, required
      - `workflowStatus` string, required
      - `editable` boolean, required: False while the article is scheduled, in review, publishing or published. Unschedule it to edit.
      - `destination` object, required
        - `integrationId` string, required
        - `platform` string, required
        - `username` string, nullable, required
        - `name` string, nullable, required
        - `canPublishArticles` boolean, required
      - `cover` object, nullable, required
        - `mediaId` string, required
        - `url` string, required
        - `altText` string, nullable, required: Media Room alt text, which X receives with the image.
      - `scheduledAt` string, nullable, required
      - `sentAt` string, nullable, required
      - `permalink` string, nullable, required: The published article on X. Null until X returns one.
      - `xDraft` object, nullable, required: The last draft sent to X drafts, if any.
        - `articleId` string, required
        - `sentAt` string, nullable, required
      - `updatedAt` string, required
      - `bodyHtml` string, required
      - `bodyVersion` string, required: Pass as expectedBodyVersion when replacing bodyHtml.
      - `images` object[], required: Inline images in body order.
        - `mediaId` string, required
        - `url` string, required
        - `altText` string, nullable, required: Media Room alt text, which X receives with the image.
      - `characterCount` integer, required: Body text length, counted as publishing counts it.
      - `error` string, nullable, required: Why the last publish failed, when status is failed.
    - `idempotency` object, required
      - `key` string, required
      - `replayed` boolean, required
  - `meta` unknown, required

---

[API](https://skmtc.dev/maevesocial/apis/maeve-social-api.md) · [All operations](https://skmtc.dev/maevesocial/apis/maeve-social-api/llms.txt) · [OpenAPI document](https://skmtc.dev/maevesocial/apis/maeve-social-api/revisions/1b00fd7e4b15?raw)
