POST /v1/workflows/{id}/widget
Enable public widget for a workflow
POST
/v1/workflows/{id}/widget
Enable public widget for a workflow
Path Parameters
id
string
required
path
Workflow ID
Request Body required
Widget configuration
application/jsonOne of:
Option 1
Option 2
buttonLabel
string
ButtonLabel is the text displayed on the trigger button (optional, defaults to "Send")
description
string
Description explains what the workflow does (optional)
maxAmount
string
MaxAmount is the maximum amount allowed per trigger (optional)
minAmount
string
MinAmount is the minimum amount required to trigger (optional)
title
string
REQUIRED
Title is the display title for the widget (required)
Responses
200
OK
application/jsoncode
integer
data
object
Widget contains the public widget configuration with derived trigger values
buttonLabel
string
ButtonLabel is the text displayed on the trigger button
chainId
integer
ChainID is derived from the trigger's chainId
description
string
Description explains what the workflow does
enabled
boolean
Enabled controls whether the public widget is active
maxAmount
string
MaxAmount is the maximum amount allowed per trigger (in smallest unit)
minAmount
string
MinAmount is the minimum amount required to trigger (in smallest unit)
recipientAddress
string
RecipientAddress is derived from the trigger's toAddress/contractAddress
title
string
Title is the display title for the widget
tokenAddress
string
TokenAddress is derived from the trigger's tokenAddress (empty for native token)
message
string
requestId
string
400
Bad Request
404
Not Found
curl -X POST 'https://api.example.com/v1/workflows/string/widget' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{}'
const response = await fetch('https://api.example.com/v1/workflows/string/widget', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({})});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://api.example.com/v1/workflows/string/widget', headers=headers, json={})print(response.json())
package mainimport ( "fmt" "io" "net/http" "strings")func main() { body := strings.NewReader(`{}`) req, _ := http.NewRequest("POST", "https://api.example.com/v1/workflows/string/widget", body) req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN") req.Header.Set("Content-Type", "application/json") resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() result, _ := io.ReadAll(resp.Body) fmt.Println(string(result))}
200
Response
{ "code": 200, "data": { "buttonLabel": "<string>", "chainId": 123, "description": "<string>", "enabled": true, "maxAmount": "<string>", "minAmount": "<string>", "recipientAddress": "<string>", "title": "<string>", "tokenAddress": "<string>" }, "message": "success", "requestId": "abc-123"}
API Playground
Try this endpoint
POST
/v1/workflows/{id}/widget
