# Insert of article

Creates a new article.

Endpoint: POST /api/articles
Version: 1.0.0
Security: shoptetAccessToken, shoptetPrivateApiToken

## Header parameters:

  - `Content-Type` (string, required)

## Request fields (application/json):

  - `data` (object, required)

  - `data.title` (string, required)
    Title of the article

  - `data.language` (string)
    Language of the article. Available and settable only if module Foreign languages is active and initialized.

  - `data.defaultSectionId` (integer, required)
    Id of the section

  - `data.sectionIds` (array)
    Id of the section

  - `data.indexName` (string)
    ending part of article URL

  - `data.redirectUrl` (string,null)
    canonical URL for redirecting

  - `data.content` (string,null)
    Content of the article

  - `data.metaTitle` (string,null)
    Meta title of the article

  - `data.metaDescription` (string,null)
    Meta description of the article

  - `data.publishDate` (string,null)
    Date of publishing - test. Deprecation of required timezone part of datetime, and will be removed in the future

  - `data.visible` (boolean)
    Flag whether the article is visible on web

  - `data.access` (any)
    Flag indicating, whether the article can be viewed by everyone (value of the flag is: 'all'), by logged in users only ('logged-in'), by logged out users only ('logged-out'), or by administrators only ('admin-only')
    Enum: "all", "logged-in", "logged-out", "admin-only"

  - `data.sourceImageName` (string,null)
    Name of file in [Files upload](#section/basic-principles/files-upload) storage to be set as article image. When set to null, image will be removed.

  - `data.sourceOgImageName` (string,null)
    Name of file in [Files upload](#section/basic-principles/files-upload) storage to be set as article open-graph image. When set to null, image will be removed.

  - `data.metaKeywords` (string,null)
    DEPRECATED - Keywords of the article

## Response 201 fields (application/json):

  - `data` (object, required)

  - `data.article` (object, required)

  - `data.article.id` (integer, required)
    article ID

  - `data.article.defaultSectionId` (integer)
    article section ID

  - `data.article.sectionIds` (array,null)
    array of section IDs

  - `data.article.title` (string, required)
    article title

  - `data.article.language` (string)
    Article language. Available only if module foreignLanguages is active and initialized.

  - `data.article.indexName` (string,null, required)
    ending part of article URL

  - `data.article.url` (string)
    article URL

  - `data.article.urls` (array)
    array of section IDs and their URLs

  - `data.article.urls.sectionId` (integer, required)
    article section ID

  - `data.article.urls.url` (string, required)
    article URL

  - `data.article.redirectUrl` (string,null, required)
    canonical URL for redirecting

  - `data.article.content` (string,null, required)
    article content

  - `data.article.metaTitle` (string,null, required)
    article meta title

  - `data.article.metaDescription` (string,null, required)
    article meta description

  - `data.article.publishDate` (string,null, required)
    article date of publishing

  - `data.article.changeDate` (string,null, required)
    article date of the last modification

  - `data.article.visible` (boolean, required)
    flag whether the article is visible on web

  - `data.article.access` (any, required)
    flag indicating, whether the article can be viewed by everyone (value of the flag is: all), by logged in users only ('logged-in'), or by logged out users only ('logged-out'), or by administrators only ('admin-only')
    Enum: "all", "logged-in", "logged-out", "admin-only"

  - `data.article.image` (string,null)
    article image

  - `data.article.ogImage` (string,null)
    article og:image

  - `data.article.metaKeywords` (string,null, required)
    article keywords

  - `errors` (array,null, required)

  - `errors.errorCode` (string, required)
    Short text error identification

  - `errors.message` (string, required)
    Descriptive error message

  - `errors.instance` (string, required)
    Identification of the entity referenced

  - `metadata` (object, required)

  - `metadata.requestId` (string, required)
    Request identifier. Useful for logging/reporting purposes.

## Response 422 fields (application/json):

  - `data` (object,null)

  - `errors` (array,null)

  - `errors.errorCode` (string, required)
    Short text error identification

  - `errors.message` (string, required)
    Descriptive error message

  - `errors.instance` (string, required)
    Identification of the entity referenced

  - `metadata` (object)

  - `metadata.requestId` (string, required)
    Request identifier. Useful for logging/reporting purposes.


