# Update an article

Updates the fields supplied and leaves the rest untouched, then returns the
article in the same shape as reading it. Every field is optional. Invalid
input returns a 422 identifying the fields at fault.

Sending a translatable field as a plain string replaces only the value for
the request locale. Send an object keyed by locale to set several at once.

Endpoint: PUT /api/v2/blog/article/{id}
Version: 2.0.0
Security: default

## Path parameters:

  - `id` (integer, required)
    The ID of the article.

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `name` (string)
    The article title. Translatable: send a plain string to set it for the request locale, or an object keyed by locale such as {"en-US": "Title"}.

  - `sub_heading` (string)
    A secondary heading shown under the title. Translatable, as for name.

  - `description` (string)
    A short summary of the article. Translatable, as for name. When empty, the nice.description in responses falls back to the first 100 characters of content.

  - `content` (string)
    The article body as HTML. Translatable, as for name. HTML is sanitised on read, so scripts and unsafe attributes are stripped from responses.

  - `thumbnail` (string)
    URL of, or an upload for, the thumbnail image shown in the half-width article list. Recommended 300x300 pixels.

  - `wide_thumbnail` (string)
    URL of, or an upload for, the thumbnail image shown in the full-width article list. Recommended 600x300 pixels.

  - `banner_image` (string)
    URL of, or an upload for, the banner image shown at the top of the article. Recommended 1200x300 pixels.

  - `blog_article_type_id` (integer)
    The ID of the article type to categorise this article under.

  - `publish` (boolean)
    Boolean. Whether the article appears in the portal News Articles section.

  - `public` (boolean)
    Boolean. Whether the article is reachable without logging in, via its token. Independent of publish.

  - `promoted` (boolean)
    Boolean. Whether the article appears on the portal dashboard. Rejected if it would exceed the account's limit:max_promoted_news setting.

## Response 200 fields (application/json):

  - `object` (object)

  - `object.id` (integer)

  - `object.name` (string)

  - `object.sub_heading` (string | null)

  - `object.description` (string)

  - `object.content` (string)

  - `object.blog_article_type_id` (string | null)

  - `object.author_id` (integer)

  - `object.thumbnail` (string)

  - `object.wide_thumbnail` (string | null)

  - `object.banner_image` (string)

  - `object.token` (string)

  - `object.public` (integer)

  - `object.publish` (integer)

  - `object.promoted` (integer)

  - `object.created_at` (string)

  - `object.updated_at` (string)

  - `nice` (object)

  - `nice.description` (string)

  - `nice.read_at` (string)

  - `nice.liked` (boolean)

  - `nice.total_likes` (integer)

  - `relations` (array)

  - `permissions` (object)

  - `permissions.read` (boolean)

  - `permissions.update` (boolean)

  - `permissions.delete` (boolean)

