API reference
Tracked links
Base URL https://api.beplan.io/v1. Authentication, envelopes, pagination, idempotency and rate limits:
conventions. OpenAPI document: openapi.json.
All 4 Tracked links operations
List a post's tracked links with their clicks
/organizations/{organizationId}/workspaces/{workspaceId}/insights/posts/{postId}/tracked-links trackedLinks.forPost.list - Scope
- links:write
- Role permission
- Any member who can see it
- Effect
- Changes nothing.
- Stability
- Beta. May still change before it is marked stable. Since 2026-11-20.
Returns the stats of every tracked link a post went out with, newest link first, each across every post using it: the post's own publications are the placements with its postId. platforms adds every publication up per platform, most clicked first; placements lists each publication (post × account) carrying the link with its own short URL and clicks, most clicked first; days covers the last 30 UTC days, oldest first, with empty days at 0. Clicks are counts only (a bot's first hit on a code may count); nothing about visitors is stored. An empty list when the post carried none, and also for an unknown post or one of another workspace (no 404). Any member who sees the workspace can read it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
postId required | path | string (uuid) |
Responses
200 OK
object · PostTrackedLinksResponse
dataarray of objectrequired4fields in each item
linkobject · TrackedLinkrequired5fields
idstringrequiredThe tracked link's id (a UUID). Write{{link:<id>}}in a caption to share it.urlstringrequiredThe destination the short links redirect to, as created.createdAtstring (date-time)requiredWhen the tracked link was created, ISO 8601 UTC.clicksnumberrequiredClicks so far, every publication added up. A count only: nothing about the visitors is stored (no countries, devices, referrers or unique visitors).placementsnumberrequiredHow many publications carry it: one per post and account that went out with it (each has its own short link).
platformsarray of objectrequired2fields in each item
platformstringrequiredclicksnumberrequired
placementsarray of objectrequired9fields in each item
idstringrequiredThe publication's placement id (a UUID).postIdstringrequiredThe post that went out with the link (it may have been deleted since).postTitlestringrequiredThe post's title;""when it has none or was deleted since.socialAccountIdstringrequiredThe account it went out on (it may have been removed since).platformstringrequiredThe account's platform (instagram,x,tiktok…), kept after the account is removed.usernamestringrequirednullableThe account's handle;nullwhen the account was removed.shortUrlstringrequiredThe short link this publication carries (https://bpln.to/<8 characters>).clicksnumberrequiredClicks on this publication's short link so far.createdAtstring (date-time)requiredWhen the publication went out with the link, ISO 8601 UTC.
daysarray of objectrequired2fields in each item
daystringrequiredA UTC day,YYYY-MM-DD.clicksnumberrequired
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 429, 500.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 404 | ORGANIZATION_NOT_FOUND | This organization doesn't exist or you're not a member of it. |
| 404 | WORKSPACE_NOT_FOUND | This workspace doesn't exist or you don't have access to it. |
9 more that every operation can answer (tokens, scopes, limits)
| 401 | APP_SUSPENDED | This app has been suspended by Beplan and can't access your account. |
| 401 | TOKEN_EXPIRED | This token has expired. Create a new one or sign in again. |
| 401 | TOKEN_REVOKED | This token was revoked. Connect again to get a new one. |
| 401 | UNAUTHENTICATED | Your session has expired. Please sign in again. |
| 403 | INSUFFICIENT_SCOPE | This token doesn't have the access this needs. Connect again and allow it. |
| 403 | INTEGRATION_BLOCKED_BY_ORGANIZATION | This organization doesn't allow this integration. Ask an admin of the organization. |
| 403 | INTEGRATION_PENDING_APPROVAL | An admin of this organization needs to approve this connection first. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. Please try again. |
Example
A post with one tracked link
curl -X GET "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/insights/posts/6f1c2a3b-4d5e-4f60-8a71-92b3c4d5e6f7/tracked-links" \
-H "Authorization: Bearer beplan_pat_…" const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/insights/posts/6f1c2a3b-4d5e-4f60-8a71-92b3c4d5e6f7/tracked-links", {
method: "GET",
headers: {
Authorization: "Bearer beplan_pat_…",
},
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json(); import requests
response = requests.get(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/insights/posts/6f1c2a3b-4d5e-4f60-8a71-92b3c4d5e6f7/tracked-links",
headers={"Authorization": "Bearer beplan_pat_…"},
)
response.raise_for_status()
data = response.json()["data"] Response 200
{
"data": [
{
"link": {
"id": "5d2c8e1a-3b4f-4a6d-9e7c-1f2a3b4c5d6e",
"url": "https://shop.example.com/drop",
"createdAt": "2026-11-18T09:30:00.000Z",
"clicks": 42,
"placements": 1
},
"platforms": [
{
"platform": "instagram",
"clicks": 42
}
],
"placements": [
{
"id": "7a6b5c4d-3e2f-4a1b-8c9d-0e1f2a3b4c5d",
"postId": "6f1c2a3b-4d5e-4f60-8a71-92b3c4d5e6f7",
"postTitle": "Spring drop teaser",
"socialAccountId": "0b6f5c1e-2a7d-4c3b-9e8f-1a2b3c4d5e6f",
"platform": "instagram",
"username": "studio.example",
"shortUrl": "https://bpln.to/k3m9x2pq",
"clicks": 42,
"createdAt": "2026-11-19T14:00:00.000Z"
}
],
"days": [
{
"day": "2026-11-19",
"clicks": 30
},
{
"day": "2026-11-20",
"clicks": 12
}
]
}
]
} Find tracked links
/organizations/{organizationId}/workspaces/{workspaceId}/tracked-links trackedLinks.list - Scope
- links:write
- Role permission
- Any of: Create posts (
post:create), Edit posts (post:update) - Effect
- Changes nothing.
- Stability
- Beta. May still change before it is marked stable. Since 2026-11-20.
Finds the workspace's tracked links, to reuse one in a caption instead of creating another: without ids, the links whose destination contains q (all of them without q), newest first, at most 30 (no pagination); with ids (comma separated), those links (unknown ids are left out). Each comes with its clicks so far and how many publications carry it. Needs the right to create or edit posts in the workspace. Use trackedLinks.stats.get for where the clicks came from.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
q optional | query | string | Text the destination address contains (case-insensitive). at most 2048 characters |
ids optional | query | one of | Tracked link ids, comma separated (at most 30): answers those links instead of a search. Unknown ids and other workspaces' are left out. |
Responses
200 OK
object · ListTrackedLinksResponse
dataarray of objectrequired5fields in each item
idstringrequiredThe tracked link's id (a UUID). Write{{link:<id>}}in a caption to share it.urlstringrequiredThe destination the short links redirect to, as created.createdAtstring (date-time)requiredWhen the tracked link was created, ISO 8601 UTC.clicksnumberrequiredClicks so far, every publication added up. A count only: nothing about the visitors is stored (no countries, devices, referrers or unique visitors).placementsnumberrequiredHow many publications carry it: one per post and account that went out with it (each has its own short link).
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 429, 500.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | ORGANIZATION_NOT_FOUND | This organization doesn't exist or you're not a member of it. |
| 404 | WORKSPACE_NOT_FOUND | This workspace doesn't exist or you don't have access to it. |
9 more that every operation can answer (tokens, scopes, limits)
| 401 | APP_SUSPENDED | This app has been suspended by Beplan and can't access your account. |
| 401 | TOKEN_EXPIRED | This token has expired. Create a new one or sign in again. |
| 401 | TOKEN_REVOKED | This token was revoked. Connect again to get a new one. |
| 401 | UNAUTHENTICATED | Your session has expired. Please sign in again. |
| 403 | INSUFFICIENT_SCOPE | This token doesn't have the access this needs. Connect again and allow it. |
| 403 | INTEGRATION_BLOCKED_BY_ORGANIZATION | This organization doesn't allow this integration. Ask an admin of the organization. |
| 403 | INTEGRATION_PENDING_APPROVAL | An admin of this organization needs to approve this connection first. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. Please try again. |
Example
Links to the shop
curl -X GET "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/tracked-links?q=shop.example.com" \
-H "Authorization: Bearer beplan_pat_…" const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/tracked-links?q=shop.example.com", {
method: "GET",
headers: {
Authorization: "Bearer beplan_pat_…",
},
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json(); import requests
response = requests.get(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/tracked-links?q=shop.example.com",
headers={"Authorization": "Bearer beplan_pat_…"},
)
response.raise_for_status()
data = response.json()["data"] Response 200
{
"data": [
{
"id": "5d2c8e1a-3b4f-4a6d-9e7c-1f2a3b4c5d6e",
"url": "https://shop.example.com/drop",
"createdAt": "2026-11-18T09:30:00.000Z",
"clicks": 42,
"placements": 1
}
]
} Create a tracked link
/organizations/{organizationId}/workspaces/{workspaceId}/tracked-links trackedLinks.create - Scope
- links:write
- Role permission
- Any of: Create posts (
post:create), Edit posts (post:update) - Effect
- Changes data in Beplan.
- Idempotency
- Send an
Idempotency-Keyto retry safely: the same key with the same body within 24 hours returns the stored response. - Stability
- Beta. May still change before it is marked stable. Since 2026-11-20.
Creates a tracked link to a destination (url: a full http:// or https:// address, up to 2,048 characters). Put {{link:<id>}} in a post's caption, an account's customCaption or a thread post (posts.create, posts.update): when each publication goes out, the token becomes its own short link (https://bpln.to/<code>), and clicks are counted per publication. Nothing is published by this call. The same address twice makes two separate links; a link can't be edited or deleted. Answers 201 with the link. Needs the right to create or edit posts in the workspace.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) |
Request body JSON, required
object · CreateTrackedLinkBody
urlstringrequiredThe destination: a fullhttp://orhttps://address with a host name (spaces around it are trimmed). Anything else answers422 TRACKED_LINK_INVALID_URL.at most 2048 characters
Responses
201 Created
object · TrackedLinkResponse
dataobject · TrackedLinkrequired5fields
idstringrequiredThe tracked link's id (a UUID). Write{{link:<id>}}in a caption to share it.urlstringrequiredThe destination the short links redirect to, as created.createdAtstring (date-time)requiredWhen the tracked link was created, ISO 8601 UTC.clicksnumberrequiredClicks so far, every publication added up. A count only: nothing about the visitors is stored (no countries, devices, referrers or unique visitors).placementsnumberrequiredHow many publications carry it: one per post and account that went out with it (each has its own short link).
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 409, 413, 415, 422, 429, 500.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | ORGANIZATION_NOT_FOUND | This organization doesn't exist or you're not a member of it. |
| 404 | WORKSPACE_NOT_FOUND | This workspace doesn't exist or you don't have access to it. |
| 422 | TRACKED_LINK_INVALID_URL | Enter a full web address, starting with https://. |
13 more that every operation can answer (tokens, scopes, limits)
| 401 | APP_SUSPENDED | This app has been suspended by Beplan and can't access your account. |
| 401 | TOKEN_EXPIRED | This token has expired. Create a new one or sign in again. |
| 401 | TOKEN_REVOKED | This token was revoked. Connect again to get a new one. |
| 401 | UNAUTHENTICATED | Your session has expired. Please sign in again. |
| 403 | INSUFFICIENT_SCOPE | This token doesn't have the access this needs. Connect again and allow it. |
| 403 | INTEGRATION_BLOCKED_BY_ORGANIZATION | This organization doesn't allow this integration. Ask an admin of the organization. |
| 403 | INTEGRATION_PENDING_APPROVAL | An admin of this organization needs to approve this connection first. |
| 409 | CONFLICT | This changed in the meantime. Refresh and try again. |
| 409 | IDEMPOTENCY_KEY_REUSED | This Idempotency-Key was already used for a different request. Send a new key. |
| 413 | PAYLOAD_TOO_LARGE | This request is too large to be sent with an Idempotency-Key. Send a smaller body or no key. |
| 415 | UNSUPPORTED_MEDIA_TYPE | This API reads JSON bodies only. Send the body as JSON with `Content-Type: application/json`. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. Please try again. |
Example
A link to a product page
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/tracked-links" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"url": "https://shop.example.com/drop"
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/tracked-links", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://shop.example.com/drop"
}),
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json(); import uuid
import requests
response = requests.post(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/tracked-links",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"url": "https://shop.example.com/drop",
},
)
response.raise_for_status()
data = response.json()["data"] Response 201
{
"data": {
"id": "5d2c8e1a-3b4f-4a6d-9e7c-1f2a3b4c5d6e",
"url": "https://shop.example.com/drop",
"createdAt": "2026-11-18T09:30:00.000Z",
"clicks": 0,
"placements": 0
}
} Get a tracked link's clicks
/organizations/{organizationId}/workspaces/{workspaceId}/tracked-links/{trackedLinkId}/stats trackedLinks.stats.get - Scope
- links:write
- Role permission
- Any member who can see it
- Effect
- Changes nothing.
- Stability
- Beta. May still change before it is marked stable. Since 2026-11-20.
Returns where a tracked link's clicks came from, across every post using it. platforms adds every publication up per platform, most clicked first; placements lists each publication (post × account) carrying the link with its own short URL and clicks, most clicked first; days covers the last 30 UTC days, oldest first, with empty days at 0. Clicks are counts only (a bot's first hit on a code may count); nothing about visitors is stored. Any member who sees the workspace can read it. Find ids with trackedLinks.list, or from a post with trackedLinks.forPost.list.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
trackedLinkId required | path | string (uuid) |
Responses
200 OK
object · TrackedLinkStatsResponse
dataobject · TrackedLinkStatsrequired4fields
linkobject · TrackedLinkrequired5fields
idstringrequiredThe tracked link's id (a UUID). Write{{link:<id>}}in a caption to share it.urlstringrequiredThe destination the short links redirect to, as created.createdAtstring (date-time)requiredWhen the tracked link was created, ISO 8601 UTC.clicksnumberrequiredClicks so far, every publication added up. A count only: nothing about the visitors is stored (no countries, devices, referrers or unique visitors).placementsnumberrequiredHow many publications carry it: one per post and account that went out with it (each has its own short link).
platformsarray of objectrequired2fields in each item
platformstringrequiredclicksnumberrequired
placementsarray of objectrequired9fields in each item
idstringrequiredThe publication's placement id (a UUID).postIdstringrequiredThe post that went out with the link (it may have been deleted since).postTitlestringrequiredThe post's title;""when it has none or was deleted since.socialAccountIdstringrequiredThe account it went out on (it may have been removed since).platformstringrequiredThe account's platform (instagram,x,tiktok…), kept after the account is removed.usernamestringrequirednullableThe account's handle;nullwhen the account was removed.shortUrlstringrequiredThe short link this publication carries (https://bpln.to/<8 characters>).clicksnumberrequiredClicks on this publication's short link so far.createdAtstring (date-time)requiredWhen the publication went out with the link, ISO 8601 UTC.
daysarray of objectrequired2fields in each item
daystringrequiredA UTC day,YYYY-MM-DD.clicksnumberrequired
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 429, 500.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 404 | ORGANIZATION_NOT_FOUND | This organization doesn't exist or you're not a member of it. |
| 404 | TRACKED_LINK_NOT_FOUND | This tracked link doesn't exist in this workspace. |
| 404 | WORKSPACE_NOT_FOUND | This workspace doesn't exist or you don't have access to it. |
9 more that every operation can answer (tokens, scopes, limits)
| 401 | APP_SUSPENDED | This app has been suspended by Beplan and can't access your account. |
| 401 | TOKEN_EXPIRED | This token has expired. Create a new one or sign in again. |
| 401 | TOKEN_REVOKED | This token was revoked. Connect again to get a new one. |
| 401 | UNAUTHENTICATED | Your session has expired. Please sign in again. |
| 403 | INSUFFICIENT_SCOPE | This token doesn't have the access this needs. Connect again and allow it. |
| 403 | INTEGRATION_BLOCKED_BY_ORGANIZATION | This organization doesn't allow this integration. Ask an admin of the organization. |
| 403 | INTEGRATION_PENDING_APPROVAL | An admin of this organization needs to approve this connection first. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. Please try again. |
Example
One Instagram post's clicks
curl -X GET "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/tracked-links/5d2c8e1a-3b4f-4a6d-9e7c-1f2a3b4c5d6e/stats" \
-H "Authorization: Bearer beplan_pat_…" const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/tracked-links/5d2c8e1a-3b4f-4a6d-9e7c-1f2a3b4c5d6e/stats", {
method: "GET",
headers: {
Authorization: "Bearer beplan_pat_…",
},
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json(); import requests
response = requests.get(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/tracked-links/5d2c8e1a-3b4f-4a6d-9e7c-1f2a3b4c5d6e/stats",
headers={"Authorization": "Bearer beplan_pat_…"},
)
response.raise_for_status()
data = response.json()["data"] Response 200
{
"data": {
"link": {
"id": "5d2c8e1a-3b4f-4a6d-9e7c-1f2a3b4c5d6e",
"url": "https://shop.example.com/drop",
"createdAt": "2026-11-18T09:30:00.000Z",
"clicks": 42,
"placements": 1
},
"platforms": [
{
"platform": "instagram",
"clicks": 42
}
],
"placements": [
{
"id": "7a6b5c4d-3e2f-4a1b-8c9d-0e1f2a3b4c5d",
"postId": "6f1c2a3b-4d5e-4f60-8a71-92b3c4d5e6f7",
"postTitle": "Spring drop teaser",
"socialAccountId": "0b6f5c1e-2a7d-4c3b-9e8f-1a2b3c4d5e6f",
"platform": "instagram",
"username": "studio.example",
"shortUrl": "https://bpln.to/k3m9x2pq",
"clicks": 42,
"createdAt": "2026-11-19T14:00:00.000Z"
}
],
"days": [
{
"day": "2026-11-19",
"clicks": 30
},
{
"day": "2026-11-20",
"clicks": 12
}
]
}
}