Skip to content

Foleon API (1.0.0)

The Foleon API enables you to quickly and easily develop functional applications or integrations. In fact, this is the same API that powers the Foleon platform itself.

The API follows RESTful principles, so if you've worked with a RESTful API before, many of its concepts will be familiar to you. It leverages standard HTTP features, making it compatible with most HTTP clients. Most responses, including errors, are returned in JSON format.

Designed for clarity and ease of use, the API adheres to standard HTTP response codes, providing detailed error messages when necessary.

Download OpenAPI description
Overview
License
Languages
Servers
EU cluster
https://api.foleon.com/
US cluster
https://api.us.foleon.com/

Authentication

Authenticate your requests using your api credentials by creating a bearer token.

Operations

Docs

All endpoints related to creating, retrieving or deleting Docs (editions), or updating their settings.

Operations

Retrieve a Doc

Request

Get a Doc resource by it's ID.

Security
BearerAuth
Path
doc_idinteger(ResourceIdSchema)required

The resource ID of the Doc

Example: 123456789
curl -i -X GET \
  https://api.foleon.com/v2/magazine/edition/123456789 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

JSON response for a Doc resource

Bodyapplication/json
namestring
identifierstring
uidstring
published_onstring or null(date-time)
affected_onstring(date-time)
first_published_onstring or null(date-time)
statusstring(DocStatusSchema)
Enum"draft""published"
is_visibleboolean
optionsobject
levelstring
categorystring
screenshot_storestring
is_defaultboolean
idinteger
created_onstring(date-time)
modified_onstring(date-time)
commentsobject
_embeddedobject
Response
application/json
{ "name": "string", "identifier": "string", "uid": "string", "published_on": "2019-08-24T14:15:22Z", "affected_on": "2019-08-24T14:15:22Z", "first_published_on": "2019-08-24T14:15:22Z", "status": "draft", "is_visible": true, "options": { "anonymize_ip": true, "authentication": {}, "cookie_check_message": {}, "has_cookie_check": true, "custom_url_target_blank": true, "has_custom_url": true, "custom_url": "string", "disable_cdn": true, "enable_comments": true, "gtm_code": "string", "has_accessibility_button": true, "has_cobranding": true, "has_private_preview": true, "has_depth_indicator": true, "has_disabled_navigation": true, "has_editions_hidden": true, "page_overview_type": "string", "has_nofollow": true, "page_arrows_placement": "string", "has_page_buttons": true, "has_page_menu_button": true, "has_page_numbers": true, "has_personalization": true, "has_search": true, "has_sneak_preview": true, "sneak_preview_type": "string", "has_social": true, "has_tracking_disabled": true, "enable_foleon_tracking": true, "header_code": "string", "locale": "string", "utm_code": "string" }, "level": "string", "category": "string", "screenshot_store": "string", "is_default": true, "id": 0, "created_on": "2019-08-24T14:15:22Z", "modified_on": "2019-08-24T14:15:22Z", "comments": {}, "_embedded": { "title": {}, "pages": {}, "overlays": {}, "theme": {}, "jobs": {}, "screenshot": {} } }

Update a Doc

Request

Update a Doc's properties and settings, such as the remarketing code, or utm code.

Security
BearerAuth
Path
doc_idinteger(ResourceIdSchema)required

The resource ID of the Doc

Example: 123456789
Bodyapplication/jsonrequired

Updated Doc attributes in JSON. Only the listed attributes can be updated. Not all of them have to be included in the request body.

namestring
Example: "My new Doc name"
identifierstring
optionsobject
Example: {"type":"object","properties":{"header_code":{"type":"string","example":"<script>console.log('Hello from Foleon!')</script>"},"utm_code":{"type":"string","example":"?utm_source=Foleon"}}}
curl -i -X PATCH \
  https://api.foleon.com/v2/magazine/edition/123456789 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My new Doc name",
    "options": {
      "type": "object",
      "properties": {
        "header_code": {
          "type": "string",
          "example": "<script>console.log('\''Hello from Foleon!'\'')</script>"
        },
        "utm_code": {
          "type": "string",
          "example": "?utm_source=Foleon"
        }
      }
    }
  }'

Responses

JSON response for a Doc resource

Bodyapplication/json
namestring
identifierstring
uidstring
published_onstring or null(date-time)
affected_onstring(date-time)
first_published_onstring or null(date-time)
statusstring(DocStatusSchema)
Enum"draft""published"
is_visibleboolean
optionsobject
levelstring
categorystring
screenshot_storestring
is_defaultboolean
idinteger
created_onstring(date-time)
modified_onstring(date-time)
commentsobject
_embeddedobject
Response
application/json
{ "name": "string", "identifier": "string", "uid": "string", "published_on": "2019-08-24T14:15:22Z", "affected_on": "2019-08-24T14:15:22Z", "first_published_on": "2019-08-24T14:15:22Z", "status": "draft", "is_visible": true, "options": { "anonymize_ip": true, "authentication": {}, "cookie_check_message": {}, "has_cookie_check": true, "custom_url_target_blank": true, "has_custom_url": true, "custom_url": "string", "disable_cdn": true, "enable_comments": true, "gtm_code": "string", "has_accessibility_button": true, "has_cobranding": true, "has_private_preview": true, "has_depth_indicator": true, "has_disabled_navigation": true, "has_editions_hidden": true, "page_overview_type": "string", "has_nofollow": true, "page_arrows_placement": "string", "has_page_buttons": true, "has_page_menu_button": true, "has_page_numbers": true, "has_personalization": true, "has_search": true, "has_sneak_preview": true, "sneak_preview_type": "string", "has_social": true, "has_tracking_disabled": true, "enable_foleon_tracking": true, "header_code": "string", "locale": "string", "utm_code": "string" }, "level": "string", "category": "string", "screenshot_store": "string", "is_default": true, "id": 0, "created_on": "2019-08-24T14:15:22Z", "modified_on": "2019-08-24T14:15:22Z", "comments": {}, "_embedded": { "title": {}, "pages": {}, "overlays": {}, "theme": {}, "jobs": {}, "screenshot": {} } }

Delete a Doc

Request

WARNING: Deleting a Doc is permanent and cannot be undone. Using this endpoint is risky. Consider unpublishing your Doc instead.

Security
BearerAuth
Path
doc_idinteger(ResourceIdSchema)required

The resource ID of the Doc

Example: 123456789
curl -i -X DELETE \
  https://api.foleon.com/v2/magazine/edition/123456789 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Deletion was successful

List Docs

Request

Query all jobs available in your scope to return a list of Docs. Use bracket notation in the parameters to filter and order the data.

Security
BearerAuth
Query
filter[0][field]string(FilterFieldParameterSchema)

The field to filter on

Example: filter[0][field]=id
filter[0][type]string(FilterTypeParameterSchema)

The type of filtering operation

Enum"eq""neq""lt""lte""gt""gte""isnull""isnotnull"
filter[0][value]string or integer(FilterValueParameterSchema)

The value to filter on

Example: filter[0][value]=123456789
order-by[0][field]string(OrderByFieldParameterSchema)

The field to sort by

Example: order-by[0][field]=created_on
order-by[0][type]string(OrderByTypeParameterSchema)

a fixed value

Value"field"
order-by[0][direction]string(OrderByDirectionParameterSchema)

Descending or ascending.

Enum"desc""asc"
curl -i -X GET \
  'https://api.foleon.com/v2/magazine/edition?filter%5B0%5D%5Bfield%5D=id&filter%5B0%5D%5Btype%5D=eq&filter%5B0%5D%5Bvalue%5D=123456789&order-by%5B0%5D%5Bfield%5D=created_on&order-by%5B0%5D%5Btype%5D=field&order-by%5B0%5D%5Bdirection%5D=desc' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

JSON response for a list of Docs. Additionally, it contains handy query information and href links to help navigate pagination.

Bodyapplication/json
_linksobject
page_countinteger
page_sizeinteger
total_itemsinteger
pageinteger
countinteger
totalinteger
_embeddedobject
Response
application/json
{ "_links": { "self": {}, "first": {}, "last": {} }, "page_count": 0, "page_size": 0, "total_items": 0, "page": 0, "count": 0, "total": 0, "_embedded": { "edition": [] } }

Create a Doc

Request

Create a new Doc in an existing project (title).

Security
BearerAuth
Bodyapplication/jsonrequired

Add a name and a project ID (title), optionally add various other settings such as a template ID.

namestringrequired
Example: "My new Doc!"
titleobjectrequired

The resource ID of the target project

title.​idinteger(ResourceIdSchema)required
categorystring
Enum"annual_report""branded_content""brochure""case_study""customer_magazine""ebook""event_magazine""manual""member_magazine""newsletter"
curl -i -X POST \
  https://api.foleon.com/v2/magazine/edition \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My new Doc!",
    "title": {
      "id": 123456789
    },
    "category": "annual_report"
  }'

Responses

Successfully created the Doc

Copy a Doc

Request

Copy a Doc into an existing project (title)

Security
BearerAuth
Path
doc_idinteger(ResourceIdSchema)required

The resource ID of the Doc

Example: 123456789
Bodyapplication/json

Provide the resource ID for the project (title) to copy the Doc into.

titleobjectrequired
title.​idinteger(ResourceIdSchema)required
curl -i -X POST \
  https://api.foleon.com/v3/magazine/edition/123456789/copy \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": {
      "id": 123456789
    }
  }'

Responses

JSON response for a Doc resource

Bodyapplication/json
namestring
identifierstring
uidstring
published_onstring or null(date-time)
affected_onstring(date-time)
first_published_onstring or null(date-time)
statusstring(DocStatusSchema)
Enum"draft""published"
is_visibleboolean
optionsobject
levelstring
categorystring
screenshot_storestring
is_defaultboolean
idinteger
created_onstring(date-time)
modified_onstring(date-time)
commentsobject
_embeddedobject
Response
application/json
{ "name": "string", "identifier": "string", "uid": "string", "published_on": "2019-08-24T14:15:22Z", "affected_on": "2019-08-24T14:15:22Z", "first_published_on": "2019-08-24T14:15:22Z", "status": "draft", "is_visible": true, "options": { "anonymize_ip": true, "authentication": {}, "cookie_check_message": {}, "has_cookie_check": true, "custom_url_target_blank": true, "has_custom_url": true, "custom_url": "string", "disable_cdn": true, "enable_comments": true, "gtm_code": "string", "has_accessibility_button": true, "has_cobranding": true, "has_private_preview": true, "has_depth_indicator": true, "has_disabled_navigation": true, "has_editions_hidden": true, "page_overview_type": "string", "has_nofollow": true, "page_arrows_placement": "string", "has_page_buttons": true, "has_page_menu_button": true, "has_page_numbers": true, "has_personalization": true, "has_search": true, "has_sneak_preview": true, "sneak_preview_type": "string", "has_social": true, "has_tracking_disabled": true, "enable_foleon_tracking": true, "header_code": "string", "locale": "string", "utm_code": "string" }, "level": "string", "category": "string", "screenshot_store": "string", "is_default": true, "id": 0, "created_on": "2019-08-24T14:15:22Z", "modified_on": "2019-08-24T14:15:22Z", "comments": {}, "_embedded": { "title": {}, "pages": {}, "overlays": {}, "theme": {}, "jobs": {}, "screenshot": {} } }

Publish a Doc

Request

Publish or Re-Publish a Doc.

Security
BearerAuth
Path
doc_idinteger(ResourceIdSchema)required

The resource ID of the Doc

Example: 123456789
curl -i -X POST \
  https://api.foleon.com/magazine/edition/123456789/publish \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successfully (Re-)Published the doc.

Projects

All endpoints related to Projects (titles).

Operations

Users

All endpoints related to Users.

Operations

Workspaces

All endpoints related to Workspaces (accounts).

Operations

Personalization Categories

All endpoints related to Personalization Categories.

Operations

Personalization Options

All endpoints related to Personalization Options.

Operations

Personalization Properties

All endpoints related to Personalization Properties.

Operations

Personalization Values

All endpoints related to Personalization Values.

Operations

Personalization Tokens

All endpoints related to Personalization Tokens.

Operations

Editing Content

All endpoints related to editing the content of you Foleon Docs.

Operations

Exporting Gzipped Docs

Export tar.gz webpackages to host Foleon Docs on your own server.

Operations

Foleon Analytics

All endpoints related to Foleons native analytics.

Operations

Media Library

All endpoints related to managing media in Foleon's media library.

Operations