For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Overview
    • Introduction
    • Response Codes
  • API Reference
      • GETGet template
      • PUTUpdate template
      • DELDelete template
      • GETList templates
      • POSTCreate template
LogoLogo
API ReferenceTemplates

Create template

||View as Markdown|
POST
https://hublinks.io/rest/accounts/:account_id/templates
POST
/rest/accounts/:account_id/templates
$curl -X POST "https://hublinks.io/rest/accounts/account_id/templates?group=account_workflows" \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json"
200Response
1{
2 "success": true,
3 "template": {
4 "group": "account_workflows",
5 "workflow": {
6 "body": {
7 "edges": [
8 {
9 "id": "edge-6701c7f8-c0df716b6632",
10 "data": {
11 "isPreviewMode": false
12 },
13 "type": "workflow",
14 "style": {
15 "opacity": 1
16 },
17 "source": "start-node",
18 "target": "node-58f338b0-dd155247e1b2",
19 "selectable": false
20 },
21 {
22 "id": "edge-f6e2a7c0-febf9b4ce4dd",
23 "data": {
24 "isPreviewMode": false
25 },
26 "type": "workflow",
27 "style": {
28 "opacity": 1
29 },
30 "source": "node-58f338b0-dd155247e1b2",
31 "target": "node-6826a837-aefd401b1cfe",
32 "selectable": false
33 },
34 {
35 "id": "edge-41608b56-66f8a0405c97",
36 "data": {
37 "isPreviewMode": false
38 },
39 "type": "workflow",
40 "style": {
41 "opacity": 1
42 },
43 "source": "node-6826a837-aefd401b1cfe",
44 "target": "node-8a14ea89-be3a281b9686",
45 "selectable": false
46 },
47 {
48 "id": "edge-1fdfafb4-b83436b59c39",
49 "data": {
50 "isPreviewMode": false
51 },
52 "type": "workflow",
53 "style": {
54 "opacity": 1
55 },
56 "source": "node-8a14ea89-be3a281b9686",
57 "target": "node-dbb52df8-87a460d9578e",
58 "selectable": false
59 }
60 ],
61 "nodes": [
62 {
63 "id": "start-node",
64 "data": {
65 "icon": "FaRegPaperPlane",
66 "title": "Once it begins...",
67 "isPreviewMode": false
68 },
69 "type": "start-node",
70 "style": {
71 "opacity": 1
72 },
73 "measured": {
74 "width": 200,
75 "height": 45
76 },
77 "position": {
78 "x": 87,
79 "y": 12
80 },
81 "selected": false
82 },
83 {
84 "id": "node-58f338b0-dd155247e1b2",
85 "data": {
86 "icon": "string",
87 "title": "View profile",
88 "isPreviewMode": false,
89 "action": "ln_profile_view"
90 },
91 "type": "action-node",
92 "style": {
93 "opacity": 1
94 },
95 "measured": {
96 "width": 280,
97 "height": 74
98 },
99 "position": {
100 "x": 87,
101 "y": 212
102 },
103 "selected": false
104 },
105 {
106 "id": "node-6826a837-aefd401b1cfe",
107 "data": {
108 "icon": "string",
109 "title": "Follow profile",
110 "isPreviewMode": false,
111 "delay": 24,
112 "action": "ln_profile_follow"
113 },
114 "type": "action-node",
115 "style": {
116 "opacity": 1
117 },
118 "measured": {
119 "width": 280,
120 "height": 74
121 },
122 "position": {
123 "x": 87,
124 "y": 412
125 },
126 "selected": false
127 },
128 {
129 "id": "node-8a14ea89-be3a281b9686",
130 "data": {
131 "icon": "string",
132 "title": "Like post",
133 "isPreviewMode": false,
134 "delay": 24,
135 "action": "ln_profile_like_post",
136 "variants": [
137 {
138 "body": "",
139 "name": "Variant A"
140 }
141 ]
142 },
143 "type": "action-node",
144 "style": {
145 "opacity": 1
146 },
147 "measured": {
148 "width": 280,
149 "height": 74
150 },
151 "position": {
152 "x": 87,
153 "y": 612
154 },
155 "selected": true
156 },
157 {
158 "id": "node-dbb52df8-87a460d9578e",
159 "data": {
160 "icon": "string",
161 "title": "View profile",
162 "isPreviewMode": false,
163 "delay": 24,
164 "action": "ln_profile_view"
165 },
166 "type": "action-node",
167 "style": {
168 "opacity": 1
169 },
170 "measured": {
171 "width": 280,
172 "height": 74
173 },
174 "position": {
175 "x": 87,
176 "y": 812
177 },
178 "selected": true
179 }
180 ]
181 },
182 "name": "Profile Magnet Updated",
183 "description": "Profile Magnet Updated"
184 },
185 "account_id": "ACCO136ce10b5f8a7682efb3",
186 "created_at": 1756560674735,
187 "template_id": "template_3cd3786f8006f39d4a73"
188 },
189 "ignored_keys": [
190 "string"
191 ]
192}
Create a template. For `*_workflows`, include a `workflow` object. **Request body fields:** - `group` (string, required) - Template group identifier (e.g. `account_workflows`). - `workflow` (object, required for workflow templates) - Contains `name`, `description`, and `body` (nodes + edges graph). - `body.nodes` (array) - Workflow action nodes (type: `start-node` | `action-node`). - `body.edges` (array) - Connections between nodes. - `name` (string, optional on update) - Template display name.
Was this page helpful?
Previous

List templates

Next

Get log

Built with

Create a template. For *_workflows, include a workflow object.

Request body fields:

  • group (string, required) - Template group identifier (e.g. account_workflows).
  • workflow (object, required for workflow templates) - Contains name, description, and body (nodes + edges graph).
    • body.nodes (array) - Workflow action nodes (type: start-node | action-node).
    • body.edges (array) - Connections between nodes.
  • name (string, optional on update) - Template display name.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

account_idstringRequired

Query parameters

groupstringOptional

Request

This endpoint expects an object.
groupstringRequired
workflowobjectRequired

Response

This endpoint returns an object.
successboolean
templateobject
ignored_keyslist of strings