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

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

Edit the content-tree of a Page

Request

Apply changes to the content of a page using Immer-style patches, which represent updates based on immutable state mutation logic. These patches follow a format similar to JSON Patch but use array-based paths (e.g., ["table", 0, "row"]) instead of string pointers.

Security
BearerAuth
Path
page_content_uuidstring(uuid)(UUIDSchema)required

The Universally Unique Identifier of an element

Bodyapplication/jsonrequired
patchesArray of objectsrequired

An array of immer-style patches

patches[].​opstringrequired

The patch operation

Enum"add""remove""replace"
patches[].​pathArray of strings or integersrequired

An array-based path to the field to mutate

One of:
string
patches[].​valueobjectrequired

The value to be applied by the patch

patches[].​value.​property name*anyadditional property
descriptionstringrequired

A human-readable explanation of the mutation operation

curl -i -X POST \
  'https://api.foleon.com/content/draft/{page_content_uuid}/mutate' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "patches": [
      {
        "op": "add",
        "path": [
          "string"
        ],
        "value": {}
      }
    ],
    "description": "string"
  }'

Responses

Mutation applied successfully

Get the content-tree of a Page

Request

Returns the content-tree of a page in json format.

Security
BearerAuth
Path
page_idinteger(ResourceIdSchema)

The resource ID of the Page

Example: 123456789
curl -i -X GET \
  https://api.foleon.com/content/draft/type/PAGE/reference/123456789 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

JSON response containing the content-tree and other content metadata of a Page.

Bodyapplication/json
idstring(uuid)(UUIDSchema)
accountIdinteger(ResourceIdSchema)
refIdinteger(ResourceIdSchema)
createdAtstring(date-time)
typestring
Value"PAGE"
foleonDocIdinteger(ResourceIdSchema)
contentobject
Example: {"row":{"497f6eca-6276-4993-bfeb-53cbbbba6f08":{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","refs":[],"value":"","parent":{"id":"some-other-uuid","identity":"block"},"styles":{},"identity":"row"},"b0f56c35-aaa0-40c1-a6d3-9f01ee1e2b1c":{"id":"b0f56c35-aaa0-40c1-a6d3-9f01ee1e2b1c","refs":[],"value":"","parent":{"id":"another-parent","identity":"block"},"styles":{},"identity":"row"}},"column":{"c6e9f7a9-8327-4cf7-946b-58b1e0d3172f":{"id":"c6e9f7a9-8327-4cf7-946b-58b1e0d3172f","refs":[],"value":"","parent":{"id":"third-parent","identity":"block"},"styles":{},"identity":"column"}}}
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "accountId": 123456789, "refId": 123456789, "createdAt": "2019-08-24T14:15:22Z", "type": "PAGE", "foleonDocId": 123456789, "content": { "row": {}, "column": {} } }

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