Skip to main content

Themes

What is a theme?

Themes allow you to categorize your campaigns and/or links in your campaigns.

Themes also allow you to target your subscribers according to their activity (opens/clicks) on a campaign for which a theme was defined. In other words, you can target subscribers based on their interest in different campaign and link themes.

It's possible to create themes children of a parent theme. It is recommended to not exceed four steps.

Parameters of a theme

The api uses a Thematic object to do GET/POST/PUT.

A Thematic object has the following parameters:

  • idThematic : its identifier
  • name : The name of the theme (mandatory parameter at creation, maximum 50 characters). The name must be unique.
  • idParentThematic : the ID of the parent theme (0 if it is a main theme, otherwise the id of the parent theme)
  • isEnabled : indicates whether the theme is active or deleted. True by default. if isEnabled = false, it cannot be used.
    Note that all the children of a theme will inherit the modification of this parameter.

The Thematics api

Create a theme

The api allows you to create a theme by making a POST /api/{idSite}/Thematics call and providing a Thematic object (without id).

Example: Here, we create a new parent theme:

{
"idParentThematic": 0,
"name": "Ma Thématique",
"isEnabled": true
}

Then, we create a new child theme :

{
"idParentThematic": 1,
"name": "Ma sous Thématique",
"isEnabled": true
}
Caution

If the name is already used, the theme will not be created and an empty content will be returned.

Update a theme.

The api allows you to update a theme by making a call PUT /api/{idSite}/Thematics

Example: Update theme 141 with a new name.

Attention!

It is mandatory to pass the entire object to update all or part of the theme.

Example of a change in theme 141:

{
"idThematic": 141,
"idParentThematic": 1,
"name": "Nouveau Nom Thématique",
"isEnabled": true
}
info
  • You can reactivate a deleted theme by changing its isEnabled parameter back to true.
  • If the name is already used by another theme, an error will be returned.

Delete a theme

It is possible to delete a theme, if it has children, these will also be deleted.

This is done by calling DELETE /api/{idSite}/Thematics/{idThematic}

Example to delete the theme 141 on the database 101: DELETE https://api.mindbaz.com/api/101/Thematics/141

View one or all themes.

The api allows you to consult all the themes by making a call GET /api/{idSite}/Thematics

Return of the request :

{
"data": [
{
"idThematic": 1,
"idParentThematic": 0,
"name": "Thématique",
"description": "string",
"isEnabled": true
},
{
"idThematic": 2,
"idParentThematic": 1,
"name": "Sous Thématique",
"description": "string",
"isEnabled": true
}
],
"error": null,
"success": true,
"typeName": "Thematic[]"
}
Caution

All themes will be returned (isEnabled true or false)

The api also allows you to consult a specific theme by making a call GET /api/{idSite}/Thematics/{idthematic}

Example : to retrieve the theme 141: https://api.mindbaz.com/api/101/Thematics/141

Return of the request :

{
"data": [
{
"idThematic": 141,
"idParentThematic": 0,
"name": "Thématique 141",
"description": "string",
"isEnabled": true
}
],
"error": null,
"success": true,
"typeName": "Thematic"
}