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

Retrieve a User

Request

Get a User resource by it's ID.

Security
BearerAuth
Path
user_idinteger(ResourceIdSchema)required

The resource ID of the User

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

Responses

JSON response for a User resource

Bodyapplication/json
first_namestring
last_namestring
emailstring(email)
phonestring or null
activated_onstring(date-time)
verified_onstring or null(date-time)
activity_onstring or null(date-time)
statusstring
optionsobject
idinteger(ResourceIdSchema)
created_onstring(date-time)
modified_onstring or null(date-time)
countrystring or null
_embeddedobject
_linksobject
_computedobject
Response
application/json
{ "first_name": "string", "last_name": "string", "email": "user@example.com", "phone": "string", "activated_on": "2019-08-24T14:15:22Z", "verified_on": "2019-08-24T14:15:22Z", "activity_on": "2019-08-24T14:15:22Z", "status": "string", "options": { "tour": {} }, "id": 123456789, "created_on": "2019-08-24T14:15:22Z", "modified_on": "2019-08-24T14:15:22Z", "country": "string", "_embedded": { "memberships": {}, "roles": {}, "account": {} }, "_links": { "self": {} }, "_computed": { "email": "user@example.com", "has_password": true, "num_accounts": 0 } }

Update a User

Request

Update a User's settings.

Security
BearerAuth
Path
user_idinteger(ResourceIdSchema)required

The resource ID of the User

Example: 123456789
Bodyapplication/jsonrequired

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

first_namestring<= 255 characters

First name of the user.

last_namestring<= 255 characters

Last name of the user.

emailstring(email)

Email address of the user.

phonestring

Phone number of the user.

optionsArray of strings or null

Additional options.

accountstring

Account associated with the user.

rolesArray of strings or null

List of roles assigned to the user.

curl -i -X PATCH \
  https://api.foleon.com/v2/user/123456789 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "phone": "string",
    "options": [
      "string"
    ],
    "account": "string",
    "roles": [
      "string"
    ]
  }'

Responses

JSON response for a User resource

Bodyapplication/json
first_namestring
last_namestring
emailstring(email)
phonestring or null
activated_onstring(date-time)
verified_onstring or null(date-time)
activity_onstring or null(date-time)
statusstring
optionsobject
idinteger(ResourceIdSchema)
created_onstring(date-time)
modified_onstring or null(date-time)
countrystring or null
_embeddedobject
_linksobject
_computedobject
Response
application/json
{ "first_name": "string", "last_name": "string", "email": "user@example.com", "phone": "string", "activated_on": "2019-08-24T14:15:22Z", "verified_on": "2019-08-24T14:15:22Z", "activity_on": "2019-08-24T14:15:22Z", "status": "string", "options": { "tour": {} }, "id": 123456789, "created_on": "2019-08-24T14:15:22Z", "modified_on": "2019-08-24T14:15:22Z", "country": "string", "_embedded": { "memberships": {}, "roles": {}, "account": {} }, "_links": { "self": {} }, "_computed": { "email": "user@example.com", "has_password": true, "num_accounts": 0 } }

Delete a User

Request

WARNING: Deleting a User is permanent and cannot be undone. Using this endpoint is risky.

Security
BearerAuth
Path
user_idinteger(ResourceIdSchema)required

The resource ID of the User

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

Responses

Deletion was successful

List Users

Request

Query all Users available in your scope to return a list of Users. 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/user?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 Users. 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": { "user": [] } }

Create a User

Request

Create a new User, select a Workspace (account) for the User by providing the Workspace ID.

Security
BearerAuth
Bodyapplication/jsonrequired

Add a name and a workspace ID (account)

first_namestring<= 255 charactersrequired

First name of the user.

last_namestring<= 255 charactersrequired

Last name of the user.

emailstring(email)required

Email address of the user.

phonestringrequired

Phone number of the user.

optionsArray of strings or null

Additional options.

accountstringrequired

Account associated with the user.

rolesArray of strings or null

List of roles assigned to the user.

curl -i -X POST \
  https://api.foleon.com/v2/user \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "phone": "string",
    "options": [
      "string"
    ],
    "account": "string",
    "roles": [
      "string"
    ]
  }'

Responses

JSON response for a User resource

Bodyapplication/json
first_namestring
last_namestring
emailstring(email)
phonestring or null
activated_onstring(date-time)
verified_onstring or null(date-time)
activity_onstring or null(date-time)
statusstring
optionsobject
idinteger(ResourceIdSchema)
created_onstring(date-time)
modified_onstring or null(date-time)
countrystring or null
_embeddedobject
_linksobject
_computedobject
Response
application/json
{ "first_name": "string", "last_name": "string", "email": "user@example.com", "phone": "string", "activated_on": "2019-08-24T14:15:22Z", "verified_on": "2019-08-24T14:15:22Z", "activity_on": "2019-08-24T14:15:22Z", "status": "string", "options": { "tour": {} }, "id": 123456789, "created_on": "2019-08-24T14:15:22Z", "modified_on": "2019-08-24T14:15:22Z", "country": "string", "_embedded": { "memberships": {}, "roles": {}, "account": {} }, "_links": { "self": {} }, "_computed": { "email": "user@example.com", "has_password": true, "num_accounts": 0 } }

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