Skip to main content

publishFromText

This action allows you to publish a document from plain text.

info

The API key must have access rights to publish.

Request​

NameTypeDefaultDescription
apikeyRequired
stringAPI public key
signatureRequired
stringSignature of the request. See how to sign your requests
expires
timestampUNIX timestamp for request expiration (GMT)
output
stringFormat of the response. Either XML (default), JSON or PHP
textRequired
stringText to use as the document content
subscription_idRequired
integerID of the folder
name
stringTitle of the publication. If not present, the filename will be used
description
stringDescription of the publication. If not present, the first page's text will be used
date
dateDate of the publication for DRM management (YYYY-MM-DD)
is_published
booleanActivation status. Either 0 (disabled) or 1 (enabled)
publishing_mode
integerAccess to the publication. Either 1 (public) or 2 (private)
publish_date
datetimeDate and time (UTC) of the publication scheduled publishing (YYYY-MM-DD HH:MM:SS).
private_url
booleanUse a private URL. Either 0 (disabled) or 1 (enabled)
view
stringDefault viewing mode. Either book, slide, scroll
subscribe
integerAllow subscribers' access. Either 0 (disabled) or 1 (enabled)
comment
integerComments behavior. Either 0 (disabled), 1 (moderate all) or 4 (accept all)
download
integerDownload behavior. Either 0 (disabled) or 2 (everyone)
print
integerPrint behavior. Either 0 (disabled) or 2 (everyone)
share
integerShare menu. Either 0 (disabled), 1 (enabled). Enabled by default
adult
integerRestrict access to adults. Either 0 (no) or 1 (yes)
direction
integerReading direction. Either 0 (left-to-right) or 1 (right-to-left)
license
stringLicense. Either empty (traditional copyright) or pd (public domain), by, by_nc, by_nc_nd, by_nc_sa, by_nd or by_sa (Creative Commons)
skin_url
stringCustom skin URL. Must be an absolute URL
logo_url
stringCustom logo URL. Must be an absolute URL
logo_link_url
stringCustom logo link URL. Must be an absolute URL
background_url
stringCustom background URL. Must be an absolute URL
music
integerBackground music mode. Either 0 (loop forever), 1 (play only once)
music_url
stringCustom background music URL. Must be an absolute URL
sfx
integerPlay sound effects like page flipping. Either 0 (disabled) or 1 (enabled)
sfx_url
stringCustom page flipping sound URL. Must be an absolute URL

Response​

This method returns a Publication.

NameTypeDefaultDescription
IDstringID of the publication
AccountIDintegerPublication's owner account ID (should be your account ID)
SubscriptionIDintegerPublication's owner subscription ID
DescriptionstringDescription of the publication
StatusstringConversion status of the publication. Either QUEUE (waiting to be converted), PROCESS (processing document), STORE (converting document), ERROR (error during conversion) or DONE (publication ready)
IsPublishedintegerSends 1 if the publication is published and 0 if not
IsPrivateintegerSends 1 if the publication is private and 0 if not
AuthIDstringAuthentication parameter for private URLs (authid)
AllowMiniintegerSends 1 if the publication allows access to the miniCalaméo and 0 if not
PagesintegerNumber of pages of the publication
WidthintegerWidth of a page of the publication
HeightintegerHeight of a page of the publication
ViewsintegerNumber of views of the publication
DownloadsintegerNumber of downloads of the publication
CommentsintegerNumber of comments of the publication
FavoritesintegerNumber of favorites from the publication
DatedateReference date of the publication
CreationdatetimeDate of creation of the publication
PublicationdatetimeScheduled date of the publication (UTC)
ModificationdatetimeDate of the last modification of the publication
PosterUrlstringAbsolute URL for the publication's larger cover
PictureUrlstringAbsolute URL for the publication's cover
ThumbUrlstringAbsolute URL for the publication's thumbnail
PublicUrlstringAbsolute URL for the publication's overview
ViewUrlstringAbsolute URL for the publication's reading page
CommentsUrlstringAbsolute URL for the publication's comments

Example response​

JSON
{
"response": {
"status": "ok",
"version": 2,
"requestid": "X9p0h2",
"requests": 213,
"content": {
"ID": "0045168255f6738ad6193",
"SubscriptionID": 4540112,
"AccountID": 4516825,
"Name": "Book",
"Description": "",
"Category": "MISC",
"Format": "MISC",
"Dialect": "unknown",
"Status": "",
"IsPublished": 1,
"IsPrivate": 1,
"AuthID": "ZuOoYt9jRzPo",
"AllowMini": 1,
"Date": "2015-10-16",
"Pages": 0,
"Width": 0,
"Height": 0,
"Views": 0,
"Downloads": 0,
"Comments": 0,
"Favorites": 0,
"PosterUrl": "",
"PictureUrl": "",
"ThumbUrl": "",
"PublicUrl": "",
"ViewUrl": "",
"Creation": "2015-10-16 11:31:51",
"Modification": "2015-10-16 11:31:51"
}
}
}