Skip to main content

Toolblox API

Toolblox API is split into two: Toolblox Development API and Toolblox Contract API (or dAPI).

Toolblox Development API

With Tooblox Development API users can automate smart-contract generation. In summary this is the general workflow:

  • Use API to create new smart-contract workflows or to update existing workflows (SLA 99.9%)
  • The API will
    • Use AI to create a workflow
    • Construct the workflow, store it and provide a URL in return
    • If id is given, update an existing workflow
  • The URL can be used to open the workflow and deploy it onto a selected blockchain
  • The URL can be shared with customers to initiate a transfer of ownership. The idea is that while a solution provider can help businesses build blockchain solutions it is up to to the customers to deploy the smart-contracts in the end to ensure proper custody.

Prerequisites

  • Credits to use the AI generator (credits are included in each plan)

Toolblox Development API Endpoint

Parameters

NameMandatoryDescription
apiKeyYesGenerated in Toolblox profile page
textYesContains freetext description of the desired workflow. It should describe the object type stored in the smart contract, its properties, and user roles who can perform actions throughout its lifecycle. Recommended at least 3 sentences for a good outcome but more is better.

Any language can be used although English gets the best results. Workflow will be created in English.

POST requests can omit the text parameter and replace it with request content instead. For GET requests text parameter is mandatory.
idNoContains the workflow id - if given will perform an update of existing smart contract workflow instead of creating a new workflow.

Example to create workflow

Creation of an apartment rental service using blockchain, built with API builder.

Parameters
ParameterValue
apiKeyactive API key
textcreate a workflow for managing appartment rent. add also way to pay rent each month
URL

https://toolbloxfunctions-api.azure-api.net/api/Generate?apiKey=TIX-xxxxxxx&text=create%20a%20workflow%20for%20managing%20appartment%20rent.%20add%20also%20way%20to%20pay%20rent%20each%20month

Response
{
"currentUsage": 1,
"url": "https://app.toolblox.net/transfer/appartment_rent_workflow_xxxxxx",
"id": "xxxxxxx-xxxxx-xxxxx-xxxx-xxxxxx"
}

This is the smart contract workflow that got generated and opens using the received link.

Generated workflow for real estate rental

Example to update workflow

Parameters
ParameterValue
apiKeyactive API key
textAdd a way to make apartments unavailable for rent
idid returned from first request
URL

https://toolbloxfunctions-api.azure-api.net/api/Generate?apiKey=TIX-xxxxxxx&text=Add%20a%20way%20to%20make%20apartments%20unavailable%20for%20rent&id=xxxxxxx-xxxxx-xxxxx-xxxx-xxxxxx

Response

When refreshing the UI for the smart contract we see that an 'Unavailable' state has been added:

Updated smart contract for real estate rental