API reference
Links
Create a link for every product, user or campaign straight from your code.
Create a link
POST/linkslinks:write
Creates a smart link and returns its short_url. It is live immediately.
Supports the Idempotency-Key header, so a retried request cannot create duplicates.
| Parameter | Type | Description |
|---|---|---|
app_idRequired |
integer | The app this belongs to, from GET /apps. |
domain_idRequired |
integer | A verified domain, from GET /domains. |
slug |
string | Last part of the address, using letters, digits, _ and -. Generated if left out. |
web_urlRequired |
string | Destination for computers and the fallback for everyone else. |
title |
string | A name for your own reference. |
ios_url |
string | Destination for iPhone and iPad. |
android_url |
string | Destination for Android. |
deep_link_path |
string | The screen your app should open. |
deep_link_data |
object | Extra values passed to your app. |
ios_paste_page |
boolean | Show the continue page on iOS for exact matches after install. |
channel |
string | Marketing channel label. |
campaign |
string | Campaign label, used in reports. |
ad_group |
string | Ad group label. |
creative |
string | Creative label. |
is_active |
boolean | Set to false to pause the link. |
expires_at |
string | ISO 8601 time after which the link stops working. |
curl -X POST "https://baiocodesolutions.com/api/v1/links" \
-H "Authorization: Bearer $DEEPBERTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"app_id": 12,
"domain_id": 7,
"slug": "summer",
"title": "Summer sale",
"web_url": "https://yourbrand.com/summer",
"ios_url": "https://apps.apple.com/app/id123456789",
"android_url": "https://play.google.com/store/apps/details?id=com.yourbrand",
"deep_link_path": "/offers/summer",
"deep_link_data": {
"coupon": "SUN20"
},
"campaign": "summer-2026"
}'const response = await fetch("https://baiocodesolutions.com/api/v1/links", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DEEPBERTH_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"app_id": 12,
"domain_id": 7,
"slug": "summer",
"title": "Summer sale",
"web_url": "https://yourbrand.com/summer",
"ios_url": "https://apps.apple.com/app/id123456789",
"android_url": "https://play.google.com/store/apps/details?id=com.yourbrand",
"deep_link_path": "/offers/summer",
"deep_link_data": {
"coupon": "SUN20"
},
"campaign": "summer-2026"
}),
});
console.log(await response.json());import os, requests
response = requests.post(
"https://baiocodesolutions.com/api/v1/links",
headers={"Authorization": f"Bearer {os.environ['DEEPBERTH_TOKEN']}"},
json={
"app_id": 12,
"domain_id": 7,
"slug": "summer",
"title": "Summer sale",
"web_url": "https://yourbrand.com/summer",
"ios_url": "https://apps.apple.com/app/id123456789",
"android_url": "https://play.google.com/store/apps/details?id=com.yourbrand",
"deep_link_path": "/offers/summer",
"deep_link_data": {
"coupon": "SUN20"
},
"campaign": "summer-2026"
},
)
print(response.status_code, response.json())$response = Http::withToken(env('DEEPBERTH_TOKEN'))
->post('https://baiocodesolutions.com/api/v1/links',
[
'app_id' => 12,
'domain_id' => 7,
'slug' => 'summer',
'title' => 'Summer sale',
'web_url' => 'https://yourbrand.com/summer',
'ios_url' => 'https://apps.apple.com/app/id123456789',
'android_url' => 'https://play.google.com/store/apps/details?id=com.yourbrand',
'deep_link_path' => '/offers/summer',
'deep_link_data' => [
'coupon' => 'SUN20',
],
'campaign' => 'summer-2026',
]);
dump($response->status(), $response->json());201 Created
{
"data": {
"id": 4821,
"short_url": "https://link.yourbrand.com/summer",
"app_id": 12,
"domain_id": 7,
"slug": "summer",
"title": "Summer sale",
"web_url": "https://yourbrand.com/summer",
"ios_url": "https://apps.apple.com/app/id123456789",
"android_url": "https://play.google.com/store/apps/details?id=com.yourbrand",
"deep_link_path": "/offers/summer",
"deep_link_data": {
"coupon": "SUN20"
},
"ios_paste_page": false,
"channel": "paid_social",
"campaign": "summer-2026",
"ad_group": null,
"creative": null,
"is_active": true,
"expires_at": null,
"created_at": "2026-11-08T12:00:00+00:00",
"updated_at": "2026-11-08T12:00:00+00:00"
}
}Create many links
POST/links/batchlinks:write
Creates up to 100 links. Each item succeeds or fails independently, so check every result.
Supports the Idempotency-Key header, so a retried request cannot create duplicates.
| Parameter | Type | Description |
|---|---|---|
linksRequired |
array | Up to 100 link objects, using the fields from Create a link. |
curl -X POST "https://baiocodesolutions.com/api/v1/links/batch" \
-H "Authorization: Bearer $DEEPBERTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"links": [
{
"app_id": 12,
"domain_id": 7,
"web_url": "https://yourbrand.com/a"
},
{
"app_id": 12,
"domain_id": 7,
"web_url": "not-a-url"
}
]
}'const response = await fetch("https://baiocodesolutions.com/api/v1/links/batch", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DEEPBERTH_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"links": [
{
"app_id": 12,
"domain_id": 7,
"web_url": "https://yourbrand.com/a"
},
{
"app_id": 12,
"domain_id": 7,
"web_url": "not-a-url"
}
]
}),
});
console.log(await response.json());import os, requests
response = requests.post(
"https://baiocodesolutions.com/api/v1/links/batch",
headers={"Authorization": f"Bearer {os.environ['DEEPBERTH_TOKEN']}"},
json={
"links": [
{
"app_id": 12,
"domain_id": 7,
"web_url": "https://yourbrand.com/a"
},
{
"app_id": 12,
"domain_id": 7,
"web_url": "not-a-url"
}
]
},
)
print(response.status_code, response.json())$response = Http::withToken(env('DEEPBERTH_TOKEN'))
->post('https://baiocodesolutions.com/api/v1/links/batch',
[
'links' => [
[
'app_id' => 12,
'domain_id' => 7,
'web_url' => 'https://yourbrand.com/a',
],
[
'app_id' => 12,
'domain_id' => 7,
'web_url' => 'not-a-url',
],
],
]);
dump($response->status(), $response->json());200 OK
{
"data": [
{
"index": 0,
"status": "created",
"data": {
"id": 4822,
"short_url": "https://link.yourbrand.com/x7Kp2mQa"
}
},
{
"index": 1,
"status": "failed",
"error": {
"code": "validation_failed",
"details": {
"web_url": [
"The web url field must be a valid URL."
]
}
}
}
]
}List links
GET/linkslinks:read
Returns links, newest first.
| Parameter | Type | Description |
|---|---|---|
limit |
integer | Number of results. 1 to 100 for links, up to 5000 for report rankings. |
cursor |
string | The next_cursor value from the previous page. |
app_id |
integer | The app this belongs to, from GET /apps. |
domain_id |
integer | A verified domain, from GET /domains. |
campaign |
string | Campaign label, used in reports. |
is_active |
boolean | Set to false to pause the link. |
curl -X GET "https://baiocodesolutions.com/api/v1/links?campaign=summer-2026&limit=25" \
-H "Authorization: Bearer $DEEPBERTH_TOKEN"const response = await fetch("https://baiocodesolutions.com/api/v1/links?campaign=summer-2026&limit=25", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.DEEPBERTH_TOKEN}`,
},
});
console.log(await response.json());import os, requests
response = requests.get(
"https://baiocodesolutions.com/api/v1/links?campaign=summer-2026&limit=25",
headers={"Authorization": f"Bearer {os.environ['DEEPBERTH_TOKEN']}"},
)
print(response.status_code, response.json())$response = Http::withToken(env('DEEPBERTH_TOKEN'))
->get('https://baiocodesolutions.com/api/v1/links?campaign=summer-2026&limit=25');
dump($response->status(), $response->json());200 OK
{
"data": [
{
"id": 4821,
"short_url": "https://link.yourbrand.com/summer",
"app_id": 12,
"domain_id": 7,
"slug": "summer",
"title": "Summer sale",
"web_url": "https://yourbrand.com/summer",
"ios_url": "https://apps.apple.com/app/id123456789",
"android_url": "https://play.google.com/store/apps/details?id=com.yourbrand",
"deep_link_path": "/offers/summer",
"deep_link_data": {
"coupon": "SUN20"
},
"ios_paste_page": false,
"channel": "paid_social",
"campaign": "summer-2026",
"ad_group": null,
"creative": null,
"is_active": true,
"expires_at": null,
"created_at": "2026-11-08T12:00:00+00:00",
"updated_at": "2026-11-08T12:00:00+00:00"
}
],
"next_cursor": "eyJpZCI6NDgyMX0",
"has_more": true
}Get a link
GET/links/{id}links:read
Returns one link.
curl -X GET "https://baiocodesolutions.com/api/v1/links/4821" \
-H "Authorization: Bearer $DEEPBERTH_TOKEN"const response = await fetch("https://baiocodesolutions.com/api/v1/links/4821", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.DEEPBERTH_TOKEN}`,
},
});
console.log(await response.json());import os, requests
response = requests.get(
"https://baiocodesolutions.com/api/v1/links/4821",
headers={"Authorization": f"Bearer {os.environ['DEEPBERTH_TOKEN']}"},
)
print(response.status_code, response.json())$response = Http::withToken(env('DEEPBERTH_TOKEN'))
->get('https://baiocodesolutions.com/api/v1/links/4821');
dump($response->status(), $response->json());200 OK
{
"data": {
"id": 4821,
"short_url": "https://link.yourbrand.com/summer",
"app_id": 12,
"domain_id": 7,
"slug": "summer",
"title": "Summer sale",
"web_url": "https://yourbrand.com/summer",
"ios_url": "https://apps.apple.com/app/id123456789",
"android_url": "https://play.google.com/store/apps/details?id=com.yourbrand",
"deep_link_path": "/offers/summer",
"deep_link_data": {
"coupon": "SUN20"
},
"ios_paste_page": false,
"channel": "paid_social",
"campaign": "summer-2026",
"ad_group": null,
"creative": null,
"is_active": true,
"expires_at": null,
"created_at": "2026-11-08T12:00:00+00:00",
"updated_at": "2026-11-08T12:00:00+00:00"
}
}Update a link
PATCH/links/{id}links:write
Changes take effect immediately and the address stays the same. app_id, domain_id and slug cannot be changed.
| Parameter | Type | Description |
|---|---|---|
web_url |
string | Destination for computers and the fallback for everyone else. |
title |
string | A name for your own reference. |
ios_url |
string | Destination for iPhone and iPad. |
android_url |
string | Destination for Android. |
deep_link_path |
string | The screen your app should open. |
deep_link_data |
object | Extra values passed to your app. |
ios_paste_page |
boolean | Show the continue page on iOS for exact matches after install. |
channel |
string | Marketing channel label. |
campaign |
string | Campaign label, used in reports. |
ad_group |
string | Ad group label. |
creative |
string | Creative label. |
is_active |
boolean | Set to false to pause the link. |
expires_at |
string | ISO 8601 time after which the link stops working. |
curl -X PATCH "https://baiocodesolutions.com/api/v1/links/4821" \
-H "Authorization: Bearer $DEEPBERTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"web_url": "https://yourbrand.com/winter",
"is_active": true
}'const response = await fetch("https://baiocodesolutions.com/api/v1/links/4821", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.DEEPBERTH_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"web_url": "https://yourbrand.com/winter",
"is_active": true
}),
});
console.log(await response.json());import os, requests
response = requests.patch(
"https://baiocodesolutions.com/api/v1/links/4821",
headers={"Authorization": f"Bearer {os.environ['DEEPBERTH_TOKEN']}"},
json={
"web_url": "https://yourbrand.com/winter",
"is_active": True
},
)
print(response.status_code, response.json())$response = Http::withToken(env('DEEPBERTH_TOKEN'))
->patch('https://baiocodesolutions.com/api/v1/links/4821',
[
'web_url' => 'https://yourbrand.com/winter',
'is_active' => true,
]);
dump($response->status(), $response->json());200 OK
{
"data": {
"web_url": "https://yourbrand.com/winter",
"id": 4821,
"short_url": "https://link.yourbrand.com/summer",
"app_id": 12,
"domain_id": 7,
"slug": "summer",
"title": "Summer sale",
"ios_url": "https://apps.apple.com/app/id123456789",
"android_url": "https://play.google.com/store/apps/details?id=com.yourbrand",
"deep_link_path": "/offers/summer",
"deep_link_data": {
"coupon": "SUN20"
},
"ios_paste_page": false,
"channel": "paid_social",
"campaign": "summer-2026",
"ad_group": null,
"creative": null,
"is_active": true,
"expires_at": null,
"created_at": "2026-11-08T12:00:00+00:00",
"updated_at": "2026-11-08T12:00:00+00:00"
}
}Delete a link
DELETE/links/{id}links:write
The link stops working immediately. Its slug can never be reused on that domain.
curl -X DELETE "https://baiocodesolutions.com/api/v1/links/4821" \
-H "Authorization: Bearer $DEEPBERTH_TOKEN"const response = await fetch("https://baiocodesolutions.com/api/v1/links/4821", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.DEEPBERTH_TOKEN}`,
},
});
console.log(response.status);import os, requests
response = requests.delete(
"https://baiocodesolutions.com/api/v1/links/4821",
headers={"Authorization": f"Bearer {os.environ['DEEPBERTH_TOKEN']}"},
)
print(response.status_code)$response = Http::withToken(env('DEEPBERTH_TOKEN'))
->delete('https://baiocodesolutions.com/api/v1/links/4821');
dump($response->status());204 No Content