Creating and managing links
Link kinds, the short form versus the full route graph, updating and deleting.
1 min read 3 sections
A link is a routing graph that contains one or more routes. The kind values are DIRECT, TREE, TREE_ITEM, BOARD and BOARD_ITEM; routingMode can be SIMPLE or ADVANCED.
Short form#
For links with a single destination URL, the url field is enough:
POST /api/v1/links
{
"kind": "DIRECT",
"domainId": "bekl.io",
"url": "https://example.com/launch",
"slug": "launch"
}Full route graph#
For targeted links, send the routes array. When using the full graph, at least one route and one global fallback must be defined.
POST /api/v1/links
{
"kind": "DIRECT",
"domainId": "bekl.io",
"routes": [{
"platform": "GLOBAL",
"actionType": "URL",
"actionConfig": { "url": "https://example.com/release" },
"isGlobalFallback": true
}]
}actionType values: URL, SMS, WHATSAPP, EMAIL, EVENT, EMBED.
Read, update, delete#
| Method | Path | Scope |
|---|---|---|
| GET | /api/v1/links | links:read |
| GET | /api/v1/links/:id | links:read |
| PATCH | /api/v1/links/:id | links:write |
| DELETE | /api/v1/links/:id | links:delete |
Deleting also removes the graph resources attached to the link. For route selection and targeting, see the Routing page.
Is something missing or wrong? Write to the support team; including the X-Request-Id value from the response speeds up the fix.