# Create an article

Creates an article in the current account, with the calling user recorded
as its author. The response is the same shape as reading the article, so a
follow-up read is not needed.

A public token is generated on create and returned as object.token. It is
the token the publicly accessible URL uses, and it cannot be set by the
caller.

Endpoint: POST /api/v2/blog/article
Version: 2.0.0
Security: default

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `name` (string, required)
    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"}.

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

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

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

  - `public` (boolean, required)
    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.

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

  - `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.

  - `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.

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

## Response 201 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)

