Create an article from stories
POST
/cms/print/v2/subpages/{id}/articles
const url = 'https://api.example.com/cms/print/v2/subpages/1/articles';const options = { method: 'POST', headers: { 'API-Key': '<API-Key>', 'Token-User': '<Token-User>', 'Content-Type': 'application/json' }, body: '{"typeId":1,"sectionId":1,"stories":[{"id":1,"field":"example"}],"images":[{"id":1,"caption":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.example.com/cms/print/v2/subpages/1/articles \ --header 'API-Key: <API-Key>' \ --header 'Content-Type: application/json' \ --header 'Token-User: <Token-User>' \ --data '{ "typeId": 1, "sectionId": 1, "stories": [ { "id": 1, "field": "example" } ], "images": [ { "id": 1, "caption": "example" } ] }'As “Create article” in the CMS Stories view: each story’s latest text goes to the field it is mapped to (field from GET /subpages/{id}/article-draft, empty to skip it). The article gets a draft version on the default platform and on the issue’s print platform, is filed in sectionId and planned for this issue and page (its page field), and the stories are linked to it in a group named after it, matching the print version. stories[].role is the wb- tag the extension gives each story so page edits are written back.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
typeId
integer
sectionId
integer
stories
Array<object>
object
id
integer
field
string
images
CMS images on the page to attach, as copies titled with caption when set
Array<object>
object
id
integer
caption
string
Example generated
{ "typeId": 1, "sectionId": 1, "stories": [ { "id": 1, "field": "example" } ], "images": [ { "id": 1, "caption": "example" } ]}Responses
Section titled “Responses”The article, and the role per story