مرجع API
الروابط
أنشئ رابطًا لكل منتج أو مستخدم أو حملة مباشرة من الكود.
إنشاء رابط
POST/linkslinks:write
ينشئ رابطًا ذكيًا ويعيد short_url، ويعمل الرابط فورًا.
يدعم ترويسة Idempotency-Key، فلا تُنشئ إعادة الطلب نسخًا مكررة.
| الحقل | النوع | الوصف |
|---|---|---|
app_idمطلوب |
integer | التطبيق التابع له، من GET /apps. |
domain_idمطلوب |
integer | نطاق موثق، من GET /domains. |
slug |
string | الجزء الأخير من العنوان بأحرف إنجليزية وأرقام و_ و-. يُنشأ تلقائيًا إذا تُرك. |
web_urlمطلوب |
string | وجهة أجهزة الكمبيوتر والبديل للجميع. |
title |
string | اسم للرجوع إليه داخليًا. |
ios_url |
string | وجهة iPhone وiPad. |
android_url |
string | وجهة Android. |
deep_link_path |
string | الشاشة التي يجب أن يفتحها تطبيقك. |
deep_link_data |
object | قيم إضافية تُمرر إلى تطبيقك. |
ios_paste_page |
boolean | عرض صفحة المتابعة على iOS للمطابقة المؤكدة بعد التثبيت. |
channel |
string | اسم القناة التسويقية. |
campaign |
string | اسم الحملة، ويُستخدم في التقارير. |
ad_group |
string | اسم المجموعة الإعلانية. |
creative |
string | اسم الإعلان. |
is_active |
boolean | اجعله false لإيقاف الرابط مؤقتًا. |
expires_at |
string | وقت بصيغة ISO 8601 يتوقف بعده الرابط. |
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"
}
}إنشاء روابط متعددة
POST/links/batchlinks:write
ينشئ حتى 100 رابط. ينجح كل عنصر أو يفشل بشكل مستقل، فراجع كل نتيجة.
يدعم ترويسة Idempotency-Key، فلا تُنشئ إعادة الطلب نسخًا مكررة.
| الحقل | النوع | الوصف |
|---|---|---|
linksمطلوب |
array | حتى 100 رابط بحقول إنشاء رابط نفسها. |
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."
]
}
}
}
]
}عرض الروابط
GET/linkslinks:read
يعيد الروابط من الأحدث إلى الأقدم.
| الحقل | النوع | الوصف |
|---|---|---|
limit |
integer | عدد النتائج، من 1 إلى 100 للروابط وحتى 5000 لترتيب التقارير. |
cursor |
string | قيمة next_cursor من الصفحة السابقة. |
app_id |
integer | التطبيق التابع له، من GET /apps. |
domain_id |
integer | نطاق موثق، من GET /domains. |
campaign |
string | اسم الحملة، ويُستخدم في التقارير. |
is_active |
boolean | اجعله false لإيقاف الرابط مؤقتًا. |
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/links/{id}links:read
يعيد رابطًا واحدًا.
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"
}
}تعديل رابط
PATCH/links/{id}links:write
تسري التغييرات فورًا ويبقى العنوان كما هو. ولا يمكن تغيير app_id وdomain_id وslug.
| الحقل | النوع | الوصف |
|---|---|---|
web_url |
string | وجهة أجهزة الكمبيوتر والبديل للجميع. |
title |
string | اسم للرجوع إليه داخليًا. |
ios_url |
string | وجهة iPhone وiPad. |
android_url |
string | وجهة Android. |
deep_link_path |
string | الشاشة التي يجب أن يفتحها تطبيقك. |
deep_link_data |
object | قيم إضافية تُمرر إلى تطبيقك. |
ios_paste_page |
boolean | عرض صفحة المتابعة على iOS للمطابقة المؤكدة بعد التثبيت. |
channel |
string | اسم القناة التسويقية. |
campaign |
string | اسم الحملة، ويُستخدم في التقارير. |
ad_group |
string | اسم المجموعة الإعلانية. |
creative |
string | اسم الإعلان. |
is_active |
boolean | اجعله false لإيقاف الرابط مؤقتًا. |
expires_at |
string | وقت بصيغة ISO 8601 يتوقف بعده الرابط. |
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/links/{id}links:write
يتوقف الرابط فورًا، ولا يمكن إعادة استخدام اسمه على ذلك النطاق.
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