Publish Cms Drafts
POST
/api/superadmin/cms/{page_id}/publish
const url = 'https://example.com/api/superadmin/cms/example/publish';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"content_keys":["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://example.com/api/superadmin/cms/example/publish \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "content_keys": [ "example" ] }'Promote drafts to live content.
If content_keys is omitted, all drafts for the page are published.
Otherwise, only the specified keys are promoted.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” page_id
required
Page Id
string
Request Body required
Section titled “Request Body required ” Media type application/json
CMSPublishRequest
Request model for POST /api/superadmin/cms/{page_id}/publish.
object
content_keys
Any of:
Array<string>
null
Example generated
{ "content_keys": [ "example" ]}Responses
Section titled “ Responses ”Successful Response
Media type application/json
CMSPublishResponse
Response model for POST /api/superadmin/cms/{page_id}/publish.
object
page_id
required
Page Id
string
published
required
Published
integer
keys
required
Keys
Array<string>
Example generated
{ "page_id": "example", "published": 1, "keys": [ "example" ]}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}