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

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

Retrieve a Topiary Folder

Request

Get a Topiary Folder resource by it's ID.

Security
BearerAuth
Path
topiary_idinteger(ResourceIdSchema)required

The resource ID of the Topiary Folder

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

Responses

JSON response for a topiary object (a media library folder)

Bodyapplication/json
idinteger(ResourceIdSchema)
namestring
Example: "My Media Library Folder"
created_onstring(date-time)
modified_onstring or null(date-time)
Example: null
shared_onstring or null(date-time)
Example: null
_linksobject
_embeddedobject
Response
application/json
{ "id": 123456789, "name": "My Media Library Folder", "created_on": "2019-08-24T14:15:22Z", "modified_on": null, "shared_on": null, "_links": { "self": {} }, "_embedded": { "children": [], "parent": {}, "images": [], "documents": [], "videos": [] } }

Upload file(s)

Request

Uploads files to a specified folder or account.

Security
BearerAuth
Bodymultipart/form-datarequired
fileArray of strings(binary)required

A file to upload. The multipart form-data will include the filename in Content-Disposition, and the MIME type as Content-Type. Repeat this field to upload multiple files.

Generate a multipart form that looks like this:

Content-Disposition: form-data; name="file"; filename="example.png"
Content-Type: image/png

<file bytes here>
topiary_idstringrequired

Folder ID where the file(s) will be uploaded. Use "0" for root folder.

account_idstring

Account ID, required if uploading to root folder.

curl -i -X POST \
  https://api.foleon.com/topiary/file \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string \
  -F topiary_id=string \
  -F account_id=string

Responses

File(s) uploaded successfully

Get an Image

Request

Get an Image from the Media Library by it's ID

Security
BearerAuth
Path
image_idinteger(ResourceIdSchema)required

The resource ID of the Image

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

Responses

JSON response for an Image object in the Media Library

Bodyapplication/json
idinteger(ResourceIdSchema)
namestring
Example: "My image.png"
altstring or null
Example: null
is_ai_generatedboolean
filetypestring
Example: "image/png"
filesizeinteger
Example: 3013
propertiesobject
_linksobject
_embeddedobject
Response
application/json
{ "id": 123456789, "name": "My image.png", "alt": null, "is_ai_generated": true, "filetype": "image/png", "filesize": 3013, "properties": { "width": 204, "height": 169 }, "_links": { "self": {}, "image": {}, "thumbnail": {} }, "_embedded": { "topiary": {} } }