๐ Prerequisites#
To send content via the API Call Block, you will need:๐๏ธ Block Hierarchy
The block must be parent to the blocks to export๐ Attribute IDs
IDs of the attributes you want to use๐งฉ Block IDs
IDs of the blocks whose content you want to retrieve๐ Flexible Structure: The API Call Block doesn't need to be directly parent to each block to export - it simply needs to be parent and contain within it, even if it's several nesting levels below, the content blocks to emit.
1. ๐ Retrieving IDs#
๐ Attribute IDs#
Attributes allow you to send your files and data to Thinkeo for use in the App.1
๐ Access Attributes Page
You can find their IDs in the Attributes page, then by clicking on one of the attributes.
2
๐ View Attribute Details
3
๐ Copy ID
You can click on the icon next to the ID to copy it with one click.
๐งฉ Block IDs#
1
๐ฏ Select Block
In the Studio, by selecting a block from the hierarchy or central panel, click on the icon corresponding to the block parameters.
2
๐ Access Block ID
From there you will have access to the block ID, which can also be copied/pasted with one click.
3
๐ Alternative Method
To do this, click on the "..." of a block from the tree view, select "open in new tab" then retrieve the ID.
2. โ๏ธ API Call Block Configuration#
๐ ๏ธ Parameter Settings#
You can modify all these fields from the block parameters.The API Block does not support complex authentication methods but will allow you to perform, for example, POSTs to webhooks or APIs using Bearer Token authentication.โ๏ธ Basic Settings
You will need to choose the Method, specify the target URL, the Headers, and add the appropriate Body in JSON format.๐ Content Type
Think about specifying the type of content emitted by the block. We recommend "application/json" which corresponds to the majority of use cases, particularly if you are users of Make, n8n, or Zapier.๐ Body Syntax#
For the Body of the Block, here's the syntax to respect to retrieve content from an attribute or block:{
"Attribute": "{{attributes["attribute_id"] | escape_json }}",
"Block": "{{blocks["block_id"] | escape_json }}"
}
๐ง Key Configuration#
"Attribute" and "Block" are keys that can be renamed according to your needs
attribute_id should be replaced by the attribute ID available in the Attribute Editor
block_id is the uuid mentioned in the browser URL once the block is opened in a new tab
โ ๏ธ Important Notes#
Always add | escape_json to avoid syntax errors during export via Call API
Block content is in HTML format, attribute content in String format
These two formats are not modifiable
โ ๏ธ Critical Requirement: An API Call Block must be executed from a Wizard Step. It should be assigned to a blocking Step to ensure that all blocks have been executed before triggering the API Call execution. You can consult the dedicated Wizard article in the Apps documentation.
๐ Multiple Values Syntax#
You can use the following syntax for an attribute having multiple values, as the default syntax only accepts a single value:{
"Attribute": "{{attributes["attribute_id"] | string | escape_json }}"
}
3. ๐ URL, Headers and Query#
๐ Dynamic Variables#
The URL and Headers support the use of attributes as dynamic variables. You can therefore use the following syntax to feed these fields:{{attributes["attribute_id"] | escape_json }}
๐ Query Parameters#
If you want to add query parameters to your URL, you can use syntax like this:https://thinkeo.io/targeturl?queryparameter1={{attributes['attribute_id'] | escape_json }}&queryparameter2={{attributes['attribute_id'] | escape_json }}
๐ฏ URL Configuration
In this example, the URL should be replaced by the target endpoint and "queryparameter" by the key to use for your API.โ ๏ธ Block Content Limitation
Blocks export HTML content, so it's not possible to use them as variables in URL and Headers fields. You can feed attributes via a "free input" step of your wizard or a "predefined responses" step.๐ Best Practices#
๐ Authentication
Use Bearer Token authentication for secure API calls where supported๐ Data Structure
Structure your JSON body clearly with descriptive key names๐งช Testing
Test your API calls thoroughly with different data combinationsโก Performance
Assign API calls to blocking wizard steps for proper execution order๐ Debugging
Use escape_json consistently to prevent syntax errors๐ Documentation
Document your API integration for team maintenance