---
title: "Creates a draft entry in a product."
---

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

Path: Sherpo merchant API › entry

`POST /v1/stores/{store}/products/{product}/entries`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `entry:write`

## Path parameters

- `store` (`createEntry.path.store`; string, required) — The store's id.
- `product` (`createEntry.path.product`; string, required) — An id, or `slug:<slug>`.
  - minLength 1

## Header parameters

- `Idempotency-Key` (`createEntry.header.Idempotency-Key`; string, optional) — Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.
  - minLength 1; maxLength 255; pattern `^[\x21-\x7E]+$`

## Request body

_Required._

- `title` (`createEntry.title`; string, required)
  - minLength 1; maxLength 200
- `text_format` (`createEntry.text_format`; string, optional) — The format the rich text fields are written in: the rich text format’s HTML, or Markdown converted into it before it is validated. A text already stored in the format (starting with `<rich-text`) is kept as it is either way.
  - one of `"html"`, `"markdown"`; default `"html"`
- `full` (`createEntry.full`; boolean, optional) — Answers the texts, attachments and file lists the short answer leaves out.
- `slug` (`createEntry.slug`; string, optional) — Made from the title when absent: its words, numbered past a twin under the product and the product's own routes, which a given one may not name either.
  - minLength 1; maxLength 120; pattern `^[a-z0-9]+(?:-[a-z0-9]+)*$`
- `subtitle` (`createEntry.subtitle`; any of, optional)
  - any of: `string`, `null`
- `section` (`createEntry.section`; any of, optional)
  - any of: `string`, `null`
- `author` (`createEntry.author`; any of, optional) — Who signs it; null leaves it unsigned. A new entry is signed by the member writing it, or by the store with no member behind the call.
  - any of: `object`, `object`, `object`, `null`
- `tags` (`createEntry.tags`; array<string>, optional) — Labels the product's entries are listed by, in this order, none twice ignoring case: visible, well-formed text with no comma, its words parted by single plain spaces.
  - minLength 1; maxLength 60; pattern `^[^\s,\u0000-\u001f\u007f-\u009f]( ?[^\s,\u0000-\u001f\u007f-\u009f])*$`
- `unlisted` (`createEntry.unlisted`; boolean, optional) — Reachable by id or slug but out of the product's lists, the sitemap and notifications, and served noindex; the first unlist's stamp is kept.
- `preview` (`createEntry.preview`; any of, optional) — The teaser, a rich text with the blocks a lesson takes, stored in its canonical form in 16 KiB of UTF-8, an image it starts showing at most 15 MB; empty clears it.
  - any of: `string`, `null`
- `release` (`createEntry.release`; any of, optional) — An event entry's release relative to one of its sessions, its content locked to everyone until then; null opens it as published.
  - any of: `object`, `null`
- `settings` (`createEntry.settings`; object, optional)
  - `ai_generated` (`createEntry.settings.ai_generated`; boolean, optional) — The description was machine-written, which readers are told.
- `metadata` (`createEntry.metadata`; map<any of>, optional)
- `place` (`createEntry.place`; string, optional) — After the last entry of its chapter, or past the product's last when the chapter has none; an update moves it only when its section changes.
- `new_section` (`createEntry.new_section`; boolean, optional) — Refuse a section another chapter holds, so a new chapter never joins one by accident.
- `held_section` (`createEntry.held_section`; boolean, optional) — Refuse a section no chapter holds as `not_found`, so a chapter renamed or removed meanwhile never comes back; no chapter always passes; not with `new_section`.

## Example request

```json
{
  "text_format": "html",
  "full": true,
  "slug": "string",
  "title": "string",
  "subtitle": "string",
  "section": "string",
  "author": {
    "kind": "member",
    "user": {
      "id": "string"
    }
  },
  "tags": [
    "string"
  ],
  "unlisted": true,
  "preview": "string",
  "release": {
    "session": {
      "id": "string"
    },
    "anchor": "start",
    "offset_minutes": -43200
  },
  "settings": {
    "ai_generated": true,
    "property1": true,
    "property2": true
  },
  "metadata": {
    "property1": true,
    "property2": true
  },
  "place": "chapter",
  "new_section": true,
  "held_section": true
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/entries' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text_format": "html",
  "full": true,
  "slug": "string",
  "title": "string",
  "subtitle": "string",
  "section": "string",
  "author": {
    "kind": "member",
    "user": {
      "id": "string"
    }
  },
  "tags": [
    "string"
  ],
  "unlisted": true,
  "preview": "string",
  "release": {
    "session": {
      "id": "string"
    },
    "anchor": "start",
    "offset_minutes": -43200
  },
  "settings": {
    "ai_generated": true,
    "property1": true,
    "property2": true
  },
  "metadata": {
    "property1": true,
    "property2": true
  },
  "place": "chapter",
  "new_section": true,
  "held_section": true
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/entries';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    text_format: 'html',
    full: true,
    slug: 'string',
    title: 'string',
    subtitle: 'string',
    section: 'string',
    author: {kind: 'member', user: {id: 'string'}},
    tags: ['string'],
    unlisted: true,
    preview: 'string',
    release: {session: {id: 'string'}, anchor: 'start', offset_minutes: -43200},
    settings: {ai_generated: true, property1: true, property2: true},
    metadata: {property1: true, property2: true},
    place: 'chapter',
    new_section: true,
    held_section: true
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/entries"

payload = {
    "text_format": "html",
    "full": True,
    "slug": "string",
    "title": "string",
    "subtitle": "string",
    "section": "string",
    "author": {
        "kind": "member",
        "user": { "id": "string" }
    },
    "tags": ["string"],
    "unlisted": True,
    "preview": "string",
    "release": {
        "session": { "id": "string" },
        "anchor": "start",
        "offset_minutes": -43200
    },
    "settings": {
        "ai_generated": True,
        "property1": True,
        "property2": True
    },
    "metadata": {
        "property1": True,
        "property2": True
    },
    "place": "chapter",
    "new_section": True,
    "held_section": True
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

Creates a draft entry in a product.

#### Example

```json
{
  "search": "string",
  "status": "string",
  "id": "string",
  "slug": "string",
  "title": "string",
  "subtitle": "string",
  "published_at": "string",
  "unlisted_at": "string",
  "created_at": "string",
  "updated_at": "string",
  "settings": {
    "ai_generated": true,
    "property1": true,
    "property2": true
  },
  "metadata": {
    "property1": true,
    "property2": true
  },
  "unlisted": true,
  "section": "string",
  "position": 0,
  "in_use": [
    {
      "kind": "string",
      "count": 0
    }
  ],
  "product_id": "string",
  "tags": [
    "string"
  ],
  "released_at": "string",
  "path": "string",
  "url": "string",
  "release": {
    "session": {
      "id": "string"
    },
    "anchor": "string",
    "offset_minutes": 0
  },
  "access": [
    {
      "resource": {
        "kind": "string",
        "id": "string"
      },
      "channel": "string",
      "tier_id": "string",
      "closed": true
    }
  ],
  "author": {
    "kind": "member",
    "user": {
      "id": "string"
    }
  },
  "preview": "string",
  "attachments": [
    {
      "id": "string",
      "target": {
        "kind": "string",
        "id": "string"
      },
      "role": "string",
      "delivery": "string",
      "preview_only": true,
      "from_body": true,
      "release_file": true,
      "position": 0,
      "asset": {
        "id": "string",
        "locator": "string",
        "origin": "string",
        "custodian": "string",
        "enforcement": "string",
        "mime": "string",
        "bytes": 0,
        "quota_bytes": 0,
        "name": "string",
        "title": "string",
        "ext": "string",
        "status": "string",
        "optimized": true,
        "parent_id": "string",
        "redacted": true,
        "security": "string",
        "description": "string",
        "processed_at": "string",
        "metadata": {
          "width": 0,
          "height": 0,
          "duration": 0,
          "pages": 0,
          "waveform": "string",
          "transcript": {
            "language": "string",
            "confidence": 0
          },
          "arguments": [
            {
              "name": "string",
              "description": "string",
              "required": true,
              "default": "string",
              "match": "string",
              "flags": "string",
              "message": "string",
              "lenient": true
            }
          ],
          "property1": true,
          "property2": true
        },
        "created_at": "string"
      }
    }
  ],
  "files": {
    "property1": {
      "id": "string",
      "kind": "string",
      "mime": "string",
      "name": "string",
      "bytes": 0,
      "width": 0,
      "height": 0,
      "duration": 0,
      "pages": 0,
      "status": "string",
      "url": "string",
      "resized": [
        {
          "width": 1,
          "avif": "string",
          "webp": "string"
        }
      ],
      "attachment_id": "string",
      "unlocks": [
        {
          "product_id": "string",
          "product_name": "string",
          "tier": {
            "id": "string",
            "name": "string",
            "rank": 0
          }
        }
      ],
      "video": {
        "attachment_id": "string",
        "tracks": [
          {
            "id": "string",
            "label": "string",
            "language": "string",
            "generated": true
          }
        ],
        "outputs": [
          "string"
        ]
      },
      "audio": {
        "waveform": "string",
        "attachment_id": "string",
        "tracks": [
          {
            "id": "string",
            "label": "string",
            "language": "string",
            "generated": true
          }
        ],
        "outputs": [
          "string"
        ]
      }
    },
    "property2": {
      "id": "string",
      "kind": "string",
      "mime": "string",
      "name": "string",
      "bytes": 0,
      "width": 0,
      "height": 0,
      "duration": 0,
      "pages": 0,
      "status": "string",
      "url": "string",
      "resized": [
        {
          "width": 1,
          "avif": "string",
          "webp": "string"
        }
      ],
      "attachment_id": "string",
      "unlocks": [
        {
          "product_id": "string",
          "product_name": "string",
          "tier": {
            "id": "string",
            "name": "string",
            "rank": 0
          }
        }
      ],
      "video": {
        "attachment_id": "string",
        "tracks": [
          {
            "id": "string",
            "label": "string",
            "language": "string",
            "generated": true
          }
        ],
        "outputs": [
          "string"
        ]
      },
      "audio": {
        "waveform": "string",
        "attachment_id": "string",
        "tracks": [
          {
            "id": "string",
            "label": "string",
            "language": "string",
            "generated": true
          }
        ],
        "outputs": [
          "string"
        ]
      }
    }
  },
  "quizzes": {
    "items": [
      {
        "id": "string",
        "entry_id": "string",
        "product_id": "string",
        "version": 0,
        "settings": {
          "attempts_allowed": 0,
          "pass_mark": 0,
          "show_answers": true
        },
        "created_at": "string",
        "updated_at": "string"
      }
    ],
    "total": 0
  },
  "created": [
    {
      "id": "string",
      "role": "string",
      "asset": {
        "id": "string"
      }
    }
  ]
}
```

- `search` (`createEntry.response.201.search`; any of, required)
  - any of: `string`, `null`
- `status` (`createEntry.response.201.status`; string, required)
- `id` (`createEntry.response.201.id`; string, required)
- `slug` (`createEntry.response.201.slug`; string, required)
- `title` (`createEntry.response.201.title`; string, required)
- `subtitle` (`createEntry.response.201.subtitle`; any of, required)
  - any of: `string`, `null`
- `published_at` (`createEntry.response.201.published_at`; any of, required)
  - any of: `string`, `null`
- `unlisted_at` (`createEntry.response.201.unlisted_at`; any of, required)
  - any of: `string`, `null`
- `created_at` (`createEntry.response.201.created_at`; any of, required)
  - any of: `string`, `null`
- `updated_at` (`createEntry.response.201.updated_at`; any of, required)
  - any of: `string`, `null`
- `settings` (`createEntry.response.201.settings`; object, required)
  - `ai_generated` (`createEntry.response.201.settings.ai_generated`; boolean, optional) — The description was machine-written, which readers are told.
- `metadata` (`createEntry.response.201.metadata`; map<any of>, required)
- `unlisted` (`createEntry.response.201.unlisted`; boolean, required)
- `section` (`createEntry.response.201.section`; any of, required)
  - any of: `string`, `null`
- `position` (`createEntry.response.201.position`; number, required)
- `in_use` (`createEntry.response.201.in_use`; array<object>, required)
  - `kind` (`createEntry.response.201.in_use.kind`; string, required)
  - `count` (`createEntry.response.201.in_use.count`; number, required)
- `product_id` (`createEntry.response.201.product_id`; string, required)
- `tags` (`createEntry.response.201.tags`; array<string>, required)
- `released_at` (`createEntry.response.201.released_at`; any of, required) — Since when a write keeps its passed release open, so a later release no longer locks it; cleared with the release.
  - any of: `string`, `null`
- `path` (`createEntry.response.201.path`; string, required) — The storefront path.
- `url` (`createEntry.response.201.url`; any of, required) — The absolute URL on the store's verified hostname, or null before it has one.
  - any of: `string`, `null`
- `release` (`createEntry.response.201.release`; any of, required) — When its content opens relative to one of its event's sessions, or null when it opens as published.
  - any of: `object`, `null`
- `access` (`createEntry.response.201.access`; array<object>, required)
  - `resource` (`createEntry.response.201.access.resource`; object, required)
    - `kind` (`createEntry.response.201.access.resource.kind`; string, required)
    - `id` (`createEntry.response.201.access.resource.id`; string, required)
  - `channel` (`createEntry.response.201.access.channel`; string, required)
  - `tier_id` (`createEntry.response.201.access.tier_id`; any of, required)
    - any of: `string`, `null`
  - `closed` (`createEntry.response.201.access.closed`; boolean, required)
- `author` (`createEntry.response.201.author`; any of, required) — Who signs it, or null when unsigned.
  - any of: `object`, `object`, `null`
- `created` (`createEntry.response.201.created`; array<object>, required) — The attachments the write bound: the files a new teaser names.
  - `id` (`createEntry.response.201.created.id`; string, required)
  - `role` (`createEntry.response.201.created.role`; string, required)
  - `asset` (`createEntry.response.201.created.asset`; object, required)
    - `id` (`createEntry.response.201.created.asset.id`; string, required)
- `preview` (`createEntry.response.201.preview`; any of, optional) — The teaser, in the rich text format as stored; answered only with `full`.
  - any of: `string`, `null`
- `attachments` (`createEntry.response.201.attachments`; array<object>, optional) — Every attachment on the entry with its asset whole; answered only with `full`.
  - `id` (`createEntry.response.201.attachments.id`; string, required)
  - `target` (`createEntry.response.201.attachments.target`; object, required)
    - `kind` (`createEntry.response.201.attachments.target.kind`; string, required)
    - `id` (`createEntry.response.201.attachments.target.id`; string, required)
  - `role` (`createEntry.response.201.attachments.role`; string, required)
  - `delivery` (`createEntry.response.201.attachments.delivery`; string, required)
  - `preview_only` (`createEntry.response.201.attachments.preview_only`; boolean, required)
  - `from_body` (`createEntry.response.201.attachments.from_body`; boolean, required)
  - `release_file` (`createEntry.response.201.attachments.release_file`; boolean, required) — A file a software release ships, which its release edits and the product's own list leaves out.
  - `position` (`createEntry.response.201.attachments.position`; number, required)
  - `asset` (`createEntry.response.201.attachments.asset`; object, required)
    - `id` (`createEntry.response.201.attachments.asset.id`; string, required)
    - `locator` (`createEntry.response.201.attachments.asset.locator`; any of, required)
      - any of: `string`, `null`
    - `origin` (`createEntry.response.201.attachments.asset.origin`; string, required)
    - `custodian` (`createEntry.response.201.attachments.asset.custodian`; string, required)
    - `enforcement` (`createEntry.response.201.attachments.asset.enforcement`; string, required)
    - `mime` (`createEntry.response.201.attachments.asset.mime`; any of, required)
      - any of: `string`, `null`
    - `bytes` (`createEntry.response.201.attachments.asset.bytes`; any of, required) — The file's size in bytes; null when it is charged nothing.
      - any of: `number`, `null`
    - `quota_bytes` (`createEntry.response.201.attachments.asset.quota_bytes`; number, required) — The file's size in bytes; zero when it is charged nothing.
    - `name` (`createEntry.response.201.attachments.asset.name`; string, required)
    - `title` (`createEntry.response.201.attachments.asset.title`; any of, required)
      - any of: `string`, `null`
    - `ext` (`createEntry.response.201.attachments.asset.ext`; any of, required)
      - any of: `string`, `null`
    - `status` (`createEntry.response.201.attachments.asset.status`; string, required)
    - `optimized` (`createEntry.response.201.attachments.asset.optimized`; boolean, required)
    - `parent_id` (`createEntry.response.201.attachments.asset.parent_id`; any of, required)
      - any of: `string`, `null`
    - `redacted` (`createEntry.response.201.attachments.asset.redacted`; boolean, required)
    - `security` (`createEntry.response.201.attachments.asset.security`; any of, required)
      - any of: `string`, `null`
    - `description` (`createEntry.response.201.attachments.asset.description`; any of, required)
      - any of: `string`, `null`
    - `processed_at` (`createEntry.response.201.attachments.asset.processed_at`; any of, required)
      - any of: `string`, `null`
    - `metadata` (`createEntry.response.201.attachments.asset.metadata`; object, required)
      - `width` (`createEntry.response.201.attachments.asset.metadata.width`; integer, optional)
        - min 0
      - `height` (`createEntry.response.201.attachments.asset.metadata.height`; integer, optional)
        - min 0
      - `duration` (`createEntry.response.201.attachments.asset.metadata.duration`; number, optional) — Seconds, measured, so rarely whole.
      - `pages` (`createEntry.response.201.attachments.asset.metadata.pages`; integer, optional)
        - min 0
      - `waveform` (`createEntry.response.201.attachments.asset.metadata.waveform`; any of, optional) — An audio file's waveform: 256 levels from 0 to 255, base64; null when it can't be drawn.
        - any of: `string`, `null`
      - `transcript` (`createEntry.response.201.attachments.asset.metadata.transcript`; object, optional)
        - `language` (`createEntry.response.201.attachments.asset.metadata.transcript.language`; string, optional)
        - `confidence` (`createEntry.response.201.attachments.asset.metadata.transcript.confidence`; number, optional)
      - `arguments` (`createEntry.response.201.attachments.asset.metadata.arguments`; array<object>, optional) — What an MCP prompt asks for; only an authored prompt carries it.
        - `name` (`createEntry.response.201.attachments.asset.metadata.arguments.name`; string, required)
        - `description` (`createEntry.response.201.attachments.asset.metadata.arguments.description`; any of, required)
          - any of: `string`, `null`
        - `required` (`createEntry.response.201.attachments.asset.metadata.arguments.required`; boolean, required)
        - `default` (`createEntry.response.201.attachments.asset.metadata.arguments.default`; any of, required)
          - any of: `string`, `null`
        - `match` (`createEntry.response.201.attachments.asset.metadata.arguments.match`; any of, required) — Pattern the whole value must match, diacritic-insensitive.
          - any of: `string`, `null`
        - `flags` (`createEntry.response.201.attachments.asset.metadata.arguments.flags`; any of, required) — Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.
          - any of: `string`, `null`
        - `message` (`createEntry.response.201.attachments.asset.metadata.arguments.message`; any of, required) — What a refused value is told instead of the default reason.
          - any of: `string`, `null`
        - `lenient` (`createEntry.response.201.attachments.asset.metadata.arguments.lenient`; boolean, required)
    - `created_at` (`createEntry.response.201.attachments.asset.created_at`; any of, required)
      - any of: `string`, `null`
- `files` (`createEntry.response.201.files`; map<object>, optional) — The files its teaser names, and every other file it binds; answered only with `full`.
- `quizzes` (`createEntry.response.201.quizzes`; object, optional) — Its quiz versions, the current one first; answered only with `full`.
  - `items` (`createEntry.response.201.quizzes.items`; array<object>, required)
    - `id` (`createEntry.response.201.quizzes.items.id`; string, required)
    - `entry_id` (`createEntry.response.201.quizzes.items.entry_id`; string, required)
    - `product_id` (`createEntry.response.201.quizzes.items.product_id`; string, required)
    - `version` (`createEntry.response.201.quizzes.items.version`; number, required)
    - `settings` (`createEntry.response.201.quizzes.items.settings`; object, required)
      - `attempts_allowed` (`createEntry.response.201.quizzes.items.settings.attempts_allowed`; any of, required)
        - any of: `number`, `null`
      - `pass_mark` (`createEntry.response.201.quizzes.items.settings.pass_mark`; any of, required)
        - any of: `number`, `null`
      - `show_answers` (`createEntry.response.201.quizzes.items.settings.show_answers`; boolean, required)
    - `created_at` (`createEntry.response.201.quizzes.items.created_at`; any of, required)
      - any of: `string`, `null`
    - `updated_at` (`createEntry.response.201.quizzes.items.updated_at`; any of, required)
      - any of: `string`, `null`
  - `total` (`createEntry.response.201.quizzes.total`; number, required)

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`createEntry.response.default.type`; string, required)
  - format `uri`
- `title` (`createEntry.response.default.title`; string, required)
- `status` (`createEntry.response.default.status`; integer, required)
- `detail` (`createEntry.response.default.detail`; string, required)
- `code` (`createEntry.response.default.code`; string, optional)
- `context` (`createEntry.response.default.context`; object, optional)
- `reached_core` (`createEntry.response.default.reached_core`; boolean, optional)
- `core_answer` (`createEntry.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/create-entry/index.md
