Skip to content

Add Articles draft lifecycle endpoints to Preview spec#542

Open
alexpetrash-code wants to merge 4 commits into
mainfrom
alex.petrash/articles-draft-api-docs
Open

Add Articles draft lifecycle endpoints to Preview spec#542
alexpetrash-code wants to merge 4 commits into
mainfrom
alex.petrash/articles-draft-api-docs

Conversation

@alexpetrash-code

Copy link
Copy Markdown
Contributor

Why?

The Articles draft-lifecycle endpoints are available in the API (Preview) but were missing from the OpenAPI spec, so they were absent from the generated SDKs and Postman collections.

How?

Adds three Preview paths for the article draft lifecycle (retrieve / stage / publish), reusing the existing article response schema plus a new publish_article_draft_request schema.

sent by alexbot

Generated with Claude Code

Document the three Articles draft endpoints (Preview):
- GET /articles/{id}/draft — retrieve a staged draft
- PUT /articles/{id}/draft — stage a draft
- POST /articles/{id}/draft/publish — publish a staged draft

Responses reuse the existing article schema; the PUT body reuses
update_article_request. Adds a publish_article_draft_request schema for
the publish endpoint.

_sent by alexbot_

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexpetrash-code alexpetrash-code self-assigned this Jun 8, 2026
alexpetrash-code and others added 3 commits June 8, 2026 09:22
Add the required OAuth scope to each draft operation description, matching
the convention used by other documented endpoints:
- retrieve draft → read_articles_scope
- stage / publish draft → read_write_articles_scope

_sent by alexbot_

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add has_unpublished_changes + draft_updated_at to article_list_item and
  article_content schemas (Preview-only); show them in the retrieve/stage/publish
  200 examples
- Fix stage/publish 422 examples to the real {message, status} shape and add the
  multilingual-locales and locale-without-pending-changes examples
- Clarify the GET /draft 404 (empty body when no draft), note that only versioned
  text content is staged, and state the Intercom-Version: Preview requirement

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Use Pattern B shared responses ($ref) for 401 (Unauthorized) and 404
  (ObjectNotFound) per openapi-conventions.md
- Resolve the GET /draft 404 empty-body/schema contradiction by referencing
  ObjectNotFound (the no-draft trigger is already in the operation description)
- Revert the stage/publish 422 examples to the schema-conformant {code, message}
  shape (the error schema requires code; status was non-conformant)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant