Learn how to interact with Blinks via pure REST HTTP.
onSuccess
, onFailure
, …)YOUR_SECRET_TOKEN
.
X-Blink-Client-Key
header is optional. You can use our API endpoints without a client key, but you’ll miss out on the features mentioned above.Blink
, BlinkPreview
, and BlinkDataTable
.
BlinkPreview
allows you to display a preview version of the blink with its own title, description, and image. It can be used for marketing purposes or in cases where you only want to render a preview without needing the full blink data.
The Blink
endpoint contains all blink-related data, including its actions and the BlinkPreview. Use this API when you plan to interact with the blink.
It is highly recommended to use the Dialect API when fetching a blink to benefit from all the additional features our SaaS platform offers.
In the following example, we’ll use the stake blink from Jito to guide you through the different API requests.
GET
RequestsGET
endpoint returns a JSON
object that renders the blink or provides blink-relevant data, such as the BlinkDataTable
.
Blink
Blink
contains the complete, interactive data structure. It includes all necessary information to display and interact with a Blink
, including its current state, possible actions, and related data.
This is the primary structure you’ll work with when implementing blink functionality in your application.
JSON
object that can be used to render the blink.
BlinkDataTable
Blink
and BlinkPreview
endpoints, we offer a BlinkDataTable
endpoint. This can be used to highlight important information for your users, such as APY or balances.
Because BlinkDataTables
are often compute-intensive, they have their own endpoint. This separation allows you to fetch them only when needed.
BlinkPreview
BlinkPreview
is a small, static set of data used to display relevant information about the blink. Consider it an opportunity to use marketing language and render a preview instead of the full blink - useful for lists or websites that don’t yet unfurl blinks.
It is recommended to use a separate 16:9 image for this preview.
POST
requestshttps://jito.dial.to/stake/percentage/25
In this blink, we use our example from the Jito staking blink again. Please note that the URL has changed from /stake
(GET endpoint) to /stake/percentage
(POST endpoint). The number 25 indicates that 25% of the user’s SOL balance will be staked.
There are no specific requirements for the design of your link structure or endpoints. Most blinks use the same endpoint for their GET and POST requests and utilize URL parameters to add extra values.
POST
section, blinks offer a fast and secure way to implement new services into your app, and implementation becomes even easier when using our UI component kits.
Many wallets have already chosen to use blinks instead of implementing each service for their users themselves.