PATCH https://api.usecommune.com/articles/{article} Production. There is no separate sandbox host.

Edit an article

Changes an article that already exists. Needs content: write, and is a write.

Absent and null are different. A property you leave out is left alone; a property you send as null is cleared. Send at least one property: an empty object answers 400.

content_markdown replaces the article's text in full. Send the whole article, not just the part that changed. It can't be null: an article always has text. It takes the same Markdown as Create an article (POST /newsletters/{newsletter}/articles), which documents it, and is parsed as strictly: text Commune cannot read answers 400 naming the line, and nothing is written.

This never moves the article's state. There is no status here, no posted_at, no scheduled_for. Queueing, cancelling, sending and retrying are their own operations. Neither is the byline: who is credited on an article cannot be changed here.

Which articles may be edited

A draft, a scheduled article, and one whose send failed. Everything else answers 422 with a message saying which case it is:

  • being sent right now: an edit mid send would reach part of the list and not the rest. Wait for it to finish.
  • sent: the email cannot be recalled, so an edit would change only the web page.
  • archived: unarchive it in Commune first.
  • imported: the body is a copy of what the newsletter's provider published and cannot be edited here.

Only a newsletter Commune publishes. Anything but a commune newsletter has its articles written elsewhere, and answers 422 with the code not_commune_newsletter, carrying a docs_url of https://usecommune.dev/errors/not_commune_newsletter.

Editing the body clears the HTML content returns until the article is next opened in Commune's editor. content_markdown is rendered from the article itself and is correct immediately.

Publishes no event. The article's updated_at is what says it changed.

Path parameters

  • string Required

Request Headers

  • string Required
  • string

Body

  • string | null
  • string | null
  • string(uri) | null
  • string
  • string
PATCH /articles/{article}
Loading...

Share your request

Use this link to easily share a pre-filled request of this operation. Everything you filled will be shared apart from the authentication fields.

Request URL

https://api-reference.usecommune.dev/explorer/operation/operation-updatearticle

Send a delete request

It looks like you’re about to send a DELETE request to this API. This type of request carries a risk of permanent and irreversible data loss.

Are you sure you want to continue?
Response
Waiting for a request to be sent.