Add Articles draft lifecycle endpoints to Preview spec#542
Open
alexpetrash-code wants to merge 4 commits into
Open
Add Articles draft lifecycle endpoints to Preview spec#542alexpetrash-code wants to merge 4 commits into
alexpetrash-code wants to merge 4 commits into
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
articleresponse schema plus a newpublish_article_draft_requestschema.sent by alexbot
Generated with Claude Code