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

Retrieve a Project

Request

Get a Project resource by it's ID.

Security
BearerAuth
Path
project_idinteger(ResourceIdSchema)required

The resource ID of the Project

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

Responses

JSON response for a Project resource

Bodyapplication/json
namestring
identifierstring
hostnamestring or null(hostname)
ua_codestring or null
Example: "UA-xxxxxx-yy"
marketo_codeobject
hubspot_codeobject
pardot_codeobject
ga4_configobject
eloqua_codeobject
security_profilestring or null
websitestring or null
licenseinteger
has_secure_socket_layerboolean
affected_onstring(date-time)
optionsArray of arrays
certificatestring or null
certificate_chainstring or null
certificate_keystring or null
automated_certificateboolean
idinteger(ResourceIdSchema)
created_onstring(date-time)
modified_onstring(date-time)
logostring or null(uri)
iconstring or null(uri)
splashstring or null(uri)
rulesobject
_embeddedobject
_linksobject
_computedobject
Response
application/json
{ "name": "string", "identifier": "string", "hostname": "example.com", "ua_code": "UA-xxxxxx-yy", "marketo_code": { "munchkin_id": "string", "is_enabled": true }, "hubspot_code": { "hub_id": "string", "hublet": "string", "is_enabled": true }, "pardot_code": { "piCid": "string", "piAid": "string" }, "ga4_config": { "has_enabled": true, "has_events_enabled": true, "has_views_enabled": true, "measurement_id": "string" }, "eloqua_code": { "site_id": "string", "custom_tracker_subdomain": "string" }, "security_profile": "string", "website": "string", "license": 0, "has_secure_socket_layer": true, "affected_on": "2019-08-24T14:15:22Z", "options": [], "certificate": "string", "certificate_chain": "string", "certificate_key": "string", "automated_certificate": true, "id": 123456789, "created_on": "2019-08-24T14:15:22Z", "modified_on": "2019-08-24T14:15:22Z", "logo": "http://example.com", "icon": "http://example.com", "splash": "http://example.com", "rules": {}, "_embedded": { "account": {}, "editions": {} }, "_links": { "self": {}, "published": {} }, "_computed": { "background_color": "rgba(0,0,0,0)", "editions_count": 0, "editions_published_count": 0 } }

Update a Project

Request

Update a project's settings, such as your CRM set up, or your hostname.

Security
BearerAuth
Path
project_idinteger(ResourceIdSchema)required

The resource ID of the Project

Example: 123456789
Bodyapplication/jsonrequired

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

namestring
identifierstring
has_secure_socket_layerboolean
ua_codestring
Example: "UA-xxxxxx-yy"
security_profilestring or null
Enumnull"medium_2019""high_2019"
websitestring
ga4_configobject

Google Analytics 4 tracking object represents the configuration.

pardot_codeobject

Pardot tracking object represents the configuration for the client IDs.

eloqua_codeobject

Pardot tracking object represents the configuration for the client IDs.

hubspot_codeobject

HubSpot tracking object represents the configuration.

curl -i -X PATCH \
  https://api.foleon.com/v2/magazine/title/123456789 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "identifier": "string",
    "has_secure_socket_layer": true,
    "ua_code": "UA-xxxxxx-yy",
    "security_profile": null,
    "website": "string",
    "ga4_config": {
      "measurement_id": "string",
      "has_views_enabled": true,
      "has_events_enabled": true,
      "has_enabled": true
    },
    "pardot_code": {
      "piCid": "string",
      "piAid": "string"
    },
    "eloqua_code": {
      "piCid": "string",
      "piAid": "string"
    },
    "hubspot_code": {
      "hub_id": "string",
      "hublet": "string",
      "is_enabled": true
    }
  }'

Responses

JSON response for a Project resource

Bodyapplication/json
namestring
identifierstring
hostnamestring or null(hostname)
ua_codestring or null
Example: "UA-xxxxxx-yy"
marketo_codeobject
hubspot_codeobject
pardot_codeobject
ga4_configobject
eloqua_codeobject
security_profilestring or null
websitestring or null
licenseinteger
has_secure_socket_layerboolean
affected_onstring(date-time)
optionsArray of arrays
certificatestring or null
certificate_chainstring or null
certificate_keystring or null
automated_certificateboolean
idinteger(ResourceIdSchema)
created_onstring(date-time)
modified_onstring(date-time)
logostring or null(uri)
iconstring or null(uri)
splashstring or null(uri)
rulesobject
_embeddedobject
_linksobject
_computedobject
Response
application/json
{ "name": "string", "identifier": "string", "hostname": "example.com", "ua_code": "UA-xxxxxx-yy", "marketo_code": { "munchkin_id": "string", "is_enabled": true }, "hubspot_code": { "hub_id": "string", "hublet": "string", "is_enabled": true }, "pardot_code": { "piCid": "string", "piAid": "string" }, "ga4_config": { "has_enabled": true, "has_events_enabled": true, "has_views_enabled": true, "measurement_id": "string" }, "eloqua_code": { "site_id": "string", "custom_tracker_subdomain": "string" }, "security_profile": "string", "website": "string", "license": 0, "has_secure_socket_layer": true, "affected_on": "2019-08-24T14:15:22Z", "options": [], "certificate": "string", "certificate_chain": "string", "certificate_key": "string", "automated_certificate": true, "id": 123456789, "created_on": "2019-08-24T14:15:22Z", "modified_on": "2019-08-24T14:15:22Z", "logo": "http://example.com", "icon": "http://example.com", "splash": "http://example.com", "rules": {}, "_embedded": { "account": {}, "editions": {} }, "_links": { "self": {}, "published": {} }, "_computed": { "background_color": "rgba(0,0,0,0)", "editions_count": 0, "editions_published_count": 0 } }

Delete a Project

Request

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

Security
BearerAuth
Path
project_idinteger(ResourceIdSchema)required

The resource ID of the Project

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

Responses

Deletion was successful

List Projects

Request

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

Create a Project

Request

Create a new project, select a workspace (account) to put the project into by providing the workspace id.

Security
BearerAuth
Bodyapplication/jsonrequired

Add a name and a workspace ID (account)

namestringrequired
Example: "My new Project!"
accountobjectrequired

The resource ID of the target workspace

account.​idinteger(ResourceIdSchema)required
curl -i -X POST \
  https://api.foleon.com/v2/magazine/title \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My new Project!",
    "account": {
      "id": 123456789
    }
  }'

Responses

JSON response for a Project resource

Bodyapplication/json
namestring
identifierstring
hostnamestring or null(hostname)
ua_codestring or null
Example: "UA-xxxxxx-yy"
marketo_codeobject
hubspot_codeobject
pardot_codeobject
ga4_configobject
eloqua_codeobject
security_profilestring or null
websitestring or null
licenseinteger
has_secure_socket_layerboolean
affected_onstring(date-time)
optionsArray of arrays
certificatestring or null
certificate_chainstring or null
certificate_keystring or null
automated_certificateboolean
idinteger(ResourceIdSchema)
created_onstring(date-time)
modified_onstring(date-time)
logostring or null(uri)
iconstring or null(uri)
splashstring or null(uri)
rulesobject
_embeddedobject
_linksobject
_computedobject
Response
application/json
{ "name": "string", "identifier": "string", "hostname": "example.com", "ua_code": "UA-xxxxxx-yy", "marketo_code": { "munchkin_id": "string", "is_enabled": true }, "hubspot_code": { "hub_id": "string", "hublet": "string", "is_enabled": true }, "pardot_code": { "piCid": "string", "piAid": "string" }, "ga4_config": { "has_enabled": true, "has_events_enabled": true, "has_views_enabled": true, "measurement_id": "string" }, "eloqua_code": { "site_id": "string", "custom_tracker_subdomain": "string" }, "security_profile": "string", "website": "string", "license": 0, "has_secure_socket_layer": true, "affected_on": "2019-08-24T14:15:22Z", "options": [], "certificate": "string", "certificate_chain": "string", "certificate_key": "string", "automated_certificate": true, "id": 123456789, "created_on": "2019-08-24T14:15:22Z", "modified_on": "2019-08-24T14:15:22Z", "logo": "http://example.com", "icon": "http://example.com", "splash": "http://example.com", "rules": {}, "_embedded": { "account": {}, "editions": {} }, "_links": { "self": {}, "published": {} }, "_computed": { "background_color": "rgba(0,0,0,0)", "editions_count": 0, "editions_published_count": 0 } }

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