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

# Create an article

> **Scope:** [`write_content`](/scopes)

Creates an article. `title`, `description` and `content` are
required. It starts unpublished unless you send `published: true`.

- `content` is HTML, up to 51,200 bytes as sent. Unsafe HTML is
  removed before it is saved, and the answer holds the cleaned
  content. Content that cleaning leaves empty is refused. See
  [HTML content](/api-reference/articles/overview#html-content).
- `description` and `meta_description` are plain text: `<` is refused.
- Without `slug`, one is made from the title. A `slug` another
  article of the store has answers `409 slug_taken`.
- Each of `category_ids` must be an article category of the store,
  or the answer is `422` with the rule `article_category`.
- The text goes through an AI content check, which can take up to 15
  seconds. When it flags the text, the article is saved anyway, as
  sent, with `is_need_review: true`.

Send an `Idempotency-Key` to retry safely.




## OpenAPI

````yaml /openapi.json post /articles
openapi: 3.1.0
info:
  title: EasyOrders Admin API
  version: v1
  summary: Read and write a merchant's store data from your app.
  description: |
    The EasyOrders Admin API lets an installed app work with one merchant's
    store: its orders, shipping settings and shipping areas, within the
    scopes the merchant approved.

    - Every request needs an access token (`Authorization: Bearer eo_at_...`)
      from the OAuth flow. A token works on one store only.
    - Request and response bodies are JSON. Unknown fields and query
      parameters are refused.
    - Errors share one shape: `{"error": {"code", "message", "details"}}`.
    - `v1` is stable: new fields and endpoints are added to it; a breaking
      change ships as a new version.
  contact:
    name: EasyOrders developers
    url: https://easyorders.eg
servers:
  - url: https://api.easy-orders.net/api/partners-apps/v1
    description: Production
security:
  - accessToken: []
tags:
  - name: Article categories
    description: >-
      The categories of the store's blog, which articles name in their
      `category_ids`.
  - name: Articles
    description: The articles of the store's blog, with HTML content, tags and categories.
  - name: Billing
    description: >-
      Your app's plan subscription and usage wallet on the store, and debiting
      the wallet by usage.
  - name: Categories
    description: The store's product categories and subcategories.
  - name: Checkout fields
    description: >-
      The fields of the store's checkout form, their labels, order, and whether
      they show and are required.
  - name: Coupons
    description: >-
      The store's coupons, by code or automatic, and the products, variants and
      categories they apply to.
  - name: Labels
    description: >-
      Your app's short colored words on orders and products, shown in the
      merchant's orders and products tables.
  - name: Missed orders
    description: >-
      Checkouts the shopper started and did not finish, to follow up and
      recover.
  - name: Orders
    description: The store's orders, their status, payment status and notes.
  - name: Pages
    description: >-
      The store's pages, such as About us or the return policy, with HTML
      content.
  - name: Products
    description: The store's products, their options, variants and stock.
  - name: Reviews
    description: >-
      The reviews of the store's products, and which of them the product page
      shows.
  - name: Shipping
    description: The store's shipping settings and shipping areas (governorates).
  - name: Store
    description: >-
      The store the access token belongs to, its addresses, currency, language
      and plan.
paths:
  /articles:
    post:
      tags:
        - Articles
      summary: Create an article
      description: |
        **Scope:** [`write_content`](/scopes)

        Creates an article. `title`, `description` and `content` are
        required. It starts unpublished unless you send `published: true`.

        - `content` is HTML, up to 51,200 bytes as sent. Unsafe HTML is
          removed before it is saved, and the answer holds the cleaned
          content. Content that cleaning leaves empty is refused. See
          [HTML content](/api-reference/articles/overview#html-content).
        - `description` and `meta_description` are plain text: `<` is refused.
        - Without `slug`, one is made from the title. A `slug` another
          article of the store has answers `409 slug_taken`.
        - Each of `category_ids` must be an article category of the store,
          or the answer is `422` with the rule `article_category`.
        - The text goes through an AI content check, which can take up to 15
          seconds. When it flags the text, the article is saved anyway, as
          sent, with `is_need_review: true`.

        Send an `Idempotency-Key` to retry safely.
      operationId: createArticle
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArticleCreate'
            example:
              title: How to choose a winter jacket
              description: >-
                Five things to check before you buy a jacket for the cold
                months.
              content: >-
                <h2>1. Insulation</h2><p>Down keeps you warmest for its
                weight.</p><img src="https://cdn.example.com/blog/down.jpg"
                alt="Down jacket">
              meta_description: A short guide to choosing a warm, waterproof winter jacket.
              thumbnail: https://cdn.example.com/blog/winter-jacket.jpg
              tags:
                - winter
                - guides
              published: true
              category_ids:
                - 4a7c9e1b-2d3f-4b5a-8c6d-7e8f9a0b1c20
      responses:
        '201':
          description: The article created. `Location` is its path.
          headers:
            Location:
              schema:
                type: string
            Idempotent-Replayed:
              description: >-
                `true` when this is the saved answer of an earlier request with
                the same `Idempotency-Key`.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - article
                properties:
                  article:
                    $ref: '#/components/schemas/Article'
              example:
                article:
                  id: 8d2f4a6c-1b3e-4c5d-9e7f-0a1b2c3d4e50
                  title: How to choose a winter jacket
                  slug: how-to-choose-a-winter-jacket
                  description: >-
                    Five things to check before you buy a jacket for the cold
                    months.
                  content: >-
                    <h2>1. Insulation</h2><p>Down keeps you warmest for its
                    weight.</p><img src="https://cdn.example.com/blog/down.jpg"
                    alt="Down jacket">
                  meta_description: A short guide to choosing a warm, waterproof winter jacket.
                  thumbnail: https://cdn.example.com/blog/winter-jacket.jpg
                  tags:
                    - winter
                    - guides
                  published: true
                  is_need_review: false
                  category_ids:
                    - 4a7c9e1b-2d3f-4b5a-8c6d-7e8f9a0b1c20
                  created_at: '2026-11-28T08:00:00Z'
                  updated_at: '2026-11-28T08:00:00Z'
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '409':
          description: >-
            `slug_taken`, or `idempotency_in_progress` while a request with the
            same `Idempotency-Key` is still running.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: slug_taken
                  message: Another article of the store has this slug
        '413':
          $ref: '#/components/responses/ArticleBodyTooLarge'
        '422':
          $ref: '#/components/responses/ArticleValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -X POST
            "https://api.easy-orders.net/api/partners-apps/v1/articles" \
              -H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN" \
              -H "Idempotency-Key: post-winter-jacket-guide" \
              -H "Content-Type: application/json" \
              -d '{
              "title": "How to choose a winter jacket",
              "description": "Five things to check before you buy a jacket for the cold months.",
              "content": "<h2>1. Insulation</h2><p>Down keeps you warmest for its weight.</p><img src=\"https://cdn.example.com/blog/down.jpg\" alt=\"Down jacket\">",
              "meta_description": "A short guide to choosing a warm, waterproof winter jacket.",
              "thumbnail": "https://cdn.example.com/blog/winter-jacket.jpg",
              "tags": [
                "winter",
                "guides"
              ],
              "published": true,
              "category_ids": [
                "4a7c9e1b-2d3f-4b5a-8c6d-7e8f9a0b1c20"
              ]
            }'
        - lang: typescript
          label: TypeScript
          source: >-
            const response = await
            fetch('https://api.easy-orders.net/api/partners-apps/v1/articles', {
              method: 'POST',
              headers: {
                Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
                'Idempotency-Key': 'post-winter-jacket-guide',
                'Content-Type': 'application/json',
              },
              body: JSON.stringify({
                title: 'How to choose a winter jacket',
                description: 'Five things to check before you buy a jacket for the cold months.',
                content: '<h2>1. Insulation</h2><p>Down keeps you warmest for its weight.</p><img src="https://cdn.example.com/blog/down.jpg" alt="Down jacket">',
                meta_description: 'A short guide to choosing a warm, waterproof winter jacket.',
                thumbnail: 'https://cdn.example.com/blog/winter-jacket.jpg',
                tags: [
                  'winter',
                  'guides',
                ],
                published: true,
                category_ids: [
                  '4a7c9e1b-2d3f-4b5a-8c6d-7e8f9a0b1c20',
                ],
              }),
            })


            const json = await response.json()

            if (!response.ok) {
              throw new Error(`${json.error.code}: ${json.error.message}`)
            }

            const { article } = json
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\n\t  \"title\": \"How to choose a winter jacket\",\n\t  \"description\": \"Five things to check before you buy a jacket for the cold months.\",\n\t  \"content\": \"<h2>1. Insulation</h2><p>Down keeps you warmest for its weight.</p><img src=\\\"https://cdn.example.com/blog/down.jpg\\\" alt=\\\"Down jacket\\\">\",\n\t  \"meta_description\": \"A short guide to choosing a warm, waterproof winter jacket.\",\n\t  \"thumbnail\": \"https://cdn.example.com/blog/winter-jacket.jpg\",\n\t  \"tags\": [\n\t    \"winter\",\n\t    \"guides\"\n\t  ],\n\t  \"published\": true,\n\t  \"category_ids\": [\n\t    \"4a7c9e1b-2d3f-4b5a-8c6d-7e8f9a0b1c20\"\n\t  ]\n\t}`)\n\n\treq, err := http.NewRequest(\"POST\", \"https://api.easy-orders.net/api/partners-apps/v1/articles\", bytes.NewReader(body))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"EASYORDERS_ACCESS_TOKEN\"))\n\treq.Header.Set(\"Idempotency-Key\", \"post-winter-jacket-guide\")\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tres, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer res.Body.Close()\n\n\tvar answer map[string]any\n\tif err := json.NewDecoder(res.Body).Decode(&answer); err != nil {\n\t\tpanic(err)\n\t}\n\tif res.StatusCode >= 300 {\n\t\tpanic(fmt.Sprint(res.Status, answer[\"error\"]))\n\t}\n\tfmt.Println(answer[\"article\"])\n}"
        - lang: php
          label: PHP
          source: >-
            <?php


            $ch =
            curl_init('https://api.easy-orders.net/api/partners-apps/v1/articles');

            curl_setopt_array($ch, [
                CURLOPT_CUSTOMREQUEST => 'POST',
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_HTTPHEADER => [
                    'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
                    'Idempotency-Key: post-winter-jacket-guide',
                    'Content-Type: application/json',
                ],
                CURLOPT_POSTFIELDS => json_encode([
                    'title' => 'How to choose a winter jacket',
                    'description' => 'Five things to check before you buy a jacket for the cold months.',
                    'content' => '<h2>1. Insulation</h2><p>Down keeps you warmest for its weight.</p><img src="https://cdn.example.com/blog/down.jpg" alt="Down jacket">',
                    'meta_description' => 'A short guide to choosing a warm, waterproof winter jacket.',
                    'thumbnail' => 'https://cdn.example.com/blog/winter-jacket.jpg',
                    'tags' => [
                        'winter',
                        'guides',
                    ],
                    'published' => true,
                    'category_ids' => [
                        '4a7c9e1b-2d3f-4b5a-8c6d-7e8f9a0b1c20',
                    ],
                ]),
            ]);


            $answer = json_decode(curl_exec($ch), true);

            $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

            curl_close($ch);


            if ($status >= 300) {
                throw new RuntimeException($answer['error']['code'] . ': ' . $answer['error']['message']);
            }

            $article = $answer['article'];
        - lang: python
          label: Python
          source: |-
            import os

            import requests

            response = requests.post(
                "https://api.easy-orders.net/api/partners-apps/v1/articles",
                headers={
                    "Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
                    "Idempotency-Key": "post-winter-jacket-guide",
                },
                json={
                    "title": "How to choose a winter jacket",
                    "description": "Five things to check before you buy a jacket for the cold months.",
                    "content": "<h2>1. Insulation</h2><p>Down keeps you warmest for its weight.</p><img src=\"https://cdn.example.com/blog/down.jpg\" alt=\"Down jacket\">",
                    "meta_description": "A short guide to choosing a warm, waterproof winter jacket.",
                    "thumbnail": "https://cdn.example.com/blog/winter-jacket.jpg",
                    "tags": [
                        "winter",
                        "guides",
                    ],
                    "published": True,
                    "category_ids": [
                        "4a7c9e1b-2d3f-4b5a-8c6d-7e8f9a0b1c20",
                    ],
                },
                timeout=30,
            )
            answer = response.json()
            if not response.ok:
                raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
            article = answer["article"]
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: |
        A unique key (up to 255 printable ASCII characters). The same key
        from your app within 24 hours answers the first result again, with
        `Idempotent-Replayed: true`, instead of creating twice.
      schema:
        type: string
        maxLength: 255
  schemas:
    ArticleCreate:
      type: object
      required:
        - title
        - description
        - content
      additionalProperties: false
      properties:
        title:
          $ref: '#/components/schemas/ArticleTitle'
        slug:
          $ref: '#/components/schemas/ArticleSlug'
        description:
          $ref: '#/components/schemas/ArticleDescription'
        content:
          $ref: '#/components/schemas/ArticleContent'
        meta_description:
          $ref: '#/components/schemas/ArticleMetaDescription'
        thumbnail:
          $ref: '#/components/schemas/ArticleThumbnail'
        tags:
          $ref: '#/components/schemas/ArticleTags'
        published:
          type: boolean
          default: false
        category_ids:
          $ref: '#/components/schemas/ArticleCategoryIDs'
    Article:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        slug:
          type: string
          description: >-
            The article's name in its storefront URL. Unique among the store's
            articles.
        description:
          type: string
          description: Plain text, the excerpt the blog shows on the article's card.
        content:
          type: string
          description: >-
            The article's HTML, as saved after cleaning. Only in a single
            article's answer; lists leave it out.
        meta_description:
          type: string
          description: Plain text for search engines. Empty when not set.
        thumbnail:
          type: string
          description: An https image URL. Empty when there is none.
        tags:
          type: array
          items:
            type: string
          description: Empty (`[]`) when there are none.
        published:
          type: boolean
          description: Whether the article is on the blog.
        is_need_review:
          type: boolean
          description: >-
            Read only. `true` when the AI content check flagged the article's
            text for a human review.
        category_ids:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            The IDs of the article's categories, in ID order (not the order
            sent). Always there; `[]` when it has none.
        categories:
          type: array
          items:
            $ref: '#/components/schemas/ArticleCategoryRef'
          description: >-
            Only with `join=categories`. The categories of `category_ids`, in
            the same order.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: A stable, snake_case code. Branch on it, not on the message.
            message:
              type: string
              description: A human-readable explanation. It may change.
            details:
              description: More about the error, shaped per code.
    ArticleTitle:
      type: string
      minLength: 1
      maxLength: 255
      description: One line, trimmed, no invisible characters and no `<`.
    ArticleSlug:
      type: string
      maxLength: 255
      pattern: ^[a-zA-Z0-9-]+$
      description: >-
        Letters `a-z` and `A-Z`, digits and dashes. Unique among the store's
        articles (`409 slug_taken`).
    ArticleDescription:
      type: string
      minLength: 1
      maxLength: 1000
      description: >-
        Plain text, trimmed. Line breaks and tabs are kept; `<` and invisible
        characters are refused.
    ArticleContent:
      type: string
      description: >-
        HTML, up to 51,200 bytes as sent (rule `max`). Valid UTF-8 without NUL
        characters (rule `text`). Unsafe HTML is removed before it is saved;
        content that cleaning leaves empty is refused (rule `required`).
    ArticleMetaDescription:
      type: string
      maxLength: 1000
      description: >-
        One line of plain text, trimmed, no invisible characters and no `<`. May
        be empty.
    ArticleThumbnail:
      type: string
      maxLength: 2048
      description: >-
        An https URL with an ASCII host, without credentials or a fragment, and
        without spaces, quotes, `<`, `>`, backslashes or backticks. `""` removes
        the thumbnail.
    ArticleTags:
      type: array
      maxItems: 20
      uniqueItems: true
      items:
        type: string
        minLength: 1
        maxLength: 50
        description: One line, trimmed, no invisible characters and no `<`.
      description: Replaces the article's tags.
    ArticleCategoryIDs:
      type: array
      maxItems: 20
      uniqueItems: true
      items:
        type: string
        format: uuid
      description: >-
        Article categories of the store (rule `article_category` otherwise).
        Replaces the article's categories.
    ArticleCategoryRef:
      type: object
      description: >-
        An article category, in short. [Get an article
        category](/api-reference/article-categories/get-an-article-category) has
        the rest of it.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
  responses:
    InvalidRequest:
      description: >-
        The body is not a JSON object, or has a field of the wrong type or an
        unknown field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request
              message: 'Invalid JSON body: unknown field'
    Unauthenticated:
      description: The access token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthenticated
              message: Missing or invalid access token
    PaymentRequired:
      description: Your app's subscription on this store is suspended.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: payment_required
              message: The app's subscription on this store is suspended
    InsufficientScope:
      description: The token lacks the scope this endpoint needs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: insufficient_scope
              message: 'This request requires the scope: read_orders'
              details:
                required_scope: read_orders
    ArticleBodyTooLarge:
      description: The body is over 64 KiB.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: body_too_large
              message: Request body too large
    ArticleValidationFailed:
      description: |
        The request broke one or more rules; `details.fields` lists every one.
        A category ID that is not an article category of the store answers
        the rule `article_category` on `category_ids`, alone.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: validation_failed
              message: Validation failed
              details:
                fields:
                  - field: category_ids
                    rule: article_category
    RateLimited:
      description: More than 600 requests in a minute from your app on this store.
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: too_many_requests
              message: Rate limit exceeded
  headers:
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: >
        An access token from the OAuth flow (`eo_at_...`). It lasts one hour;

        refresh it with the refresh token. See
        [Authentication](/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.