Developers

डेवलपर्स के लिए एपीआई संदर्भ

An API key is required for requests to be processed by the system. Once a user registers, an API key is automatically generated for this user.

शुरू करना

सिस्टम द्वारा संसाधित किए जाने वाले अनुरोधों के लिए एक एपीआई कुंजी की आवश्यकता होती है।एक बार जब उपयोगकर्ता पंजीकृत हो जाता है, तो इस उपयोगकर्ता के लिए एक एपीआई कुंजी स्वचालित रूप से उत्पन्न हो जाती है।प्रत्येक अनुरोध के साथ एपीआई कुंजी भेजी जानी चाहिए (नीचे पूरा उदाहरण देखें)।यदि एपीआई कुंजी नहीं भेजी गई है या समाप्त हो गई है, तो एक त्रुटि होगी।दुरुपयोग को रोकने के लिए कृपया अपनी एपीआई कुंजी को गुप्त रखना सुनिश्चित करें।

प्रमाणीकरण

एपीआई प्रणाली के साथ प्रमाणित करने के लिए, आपको प्रत्येक अनुरोध के साथ अपनी एपीआई कुंजी को प्राधिकरण टोकन के रूप में भेजने की आवश्यकता है।आप नीचे नमूना कोड देख सकते हैं।

curl --location --request POST 'https://urlkai.com/api/account' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \ 

कीमत सीमा

हमारे एपीआई में इसकी स्थिरता को अधिकतम करने के अनुरोधों में स्पाइक के खिलाफ सुरक्षा के लिए एक दर सीमक है।हमारी दर सीमा वर्तमान में 30 अनुरोध प्रति 1 मिनट पर सीमित है।請注意,費率可能會根據訂閱的計劃而變化。

प्रतिक्रिया के साथ कई हेडर भेजे जाएंगे और अनुरोध के बारे में विभिन्न जानकारी निर्धारित करने के लिए इनकी जांच की जा सकती है।

X-RateLimit-Limit: 30X-RateLimit-Remaining: 29X-RateLimit-Reset: TIMESTAMP

रिस्पांस हैंडलिंग

सभी एपीआई प्रतिक्रिया डिफ़ॉल्ट रूप से JSON प्रारूप में लौटा दी जाती है।इसे प्रयोग करने योग्य डेटा में बदलने के लिए, भाषा के अनुसार उपयुक्त फ़ंक्शन का उपयोग करने की आवश्यकता होगी।PHP में, फ़ंक्शन json_decode() का उपयोग डेटा को किसी ऑब्जेक्ट (डिफ़ॉल्ट) या एक सरणी मेट ���रिवर्तित करने के लिए किया जा सकता है (दूसरे पैरामीटर को सत्य पर सेट करें)।。त्रुटि कुंजी की जांच करना बहुत महत्वपूर्ण है क्योंकि इससे यह जानकारी मिलती है कि कोई त्रुटि हुई या नहीं।आप हेडर कोड भी देख सकते हैं।

{
    "error": 1,
    "message": "An error occurred"
}

獲取帳戶

獲取 https://urlkai.com/api/account

要獲取有關該帳戶的資訊,您可以向此終端節點發送請求,它將返回該賬戶的數據。

curl --location --request GET 'https://urlkai.com/api/account' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "data": {
        "id": 1,
        "email": "[email protected]",
        "username": "sampleuser",
        "avatar": "https:\/\/domain.com\/content\/avatar.png",
        "status": "pro",
        "expires": "2022-11-15 15:00:00",
        "registered": "2020-11-10 18:01:43"
    }
}

更新帳戶

放 https://urlkai.com/api/account/update

要更新有關帳戶的資訊,您可以向此終端節點發送請求,它將更新有關該帳戶的數據。

curl --location --request PUT 'https://urlkai.com/api/account/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "password": "NewPassword1"
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Account has been successfully updated."
}

列出檔

獲取 https://urlkai.com/api/files?limit=2&page=1

獲取您的所有檔。您還可以按名稱搜索。

पैरामीटर विवरण
名字 (選擇)按名稱搜索檔
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/files?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "result": 3,
    "perpage": 15,
    "currentpage": 1,
    "nextpage": null,
    "maxpage": 1,
    "list": [
        {
            "id": 1,
            "name": "My Photo",
            "downloads": 10,
            "shorturl": "https:\/\/urlkai.com\/mNSHP",
            "date": "2022-08-09 17:00:00"
        },
        {
            "id": 2,
            "name": "My Documents",
            "downloads": 15,
            "shorturl": "https:\/\/urlkai.com\/yZBsJ",
            "date": "2022-08-10 17:01:00"
        },
        {
            "id": 3,
            "name": "My Files",
            "downloads": 5,
            "shorturl": "https:\/\/urlkai.com\/pXjSy",
            "date": "2022-08-11 19:01:00"
        }
    ]
}

上傳檔

發佈 https://urlkai.com/api/files/upload/:filename?name=My+File

通過將二進位數據作為post正文發送來上傳檔。您需要發送包含 extensions 而不是 url 中的 :filename 的檔名(例如 brandkit.zip)。您可以通過發送以下參數來設置選項。

पैरामीटर विवरण
名字 (選擇)檔名
習慣 (選擇)自定義別名而不是隨機別名。
域 (選擇)自訂域
密碼 (選擇)密碼保護
滿期 (選擇)下載示例的過期時間 2021-09-28
最大下載 (選擇)最大下載次數
curl --location --request POST 'https://urlkai.com/api/files/upload/:filename?name=My+File' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '"BINARY DATA"'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "id": 1,
    "shorturl": "https:\/\/urlkai.com\/GrTQQ"
}

अभियान

列出營銷活動

獲取 https://urlkai.com/api/campaigns?limit=2&page=1

要通過 API 獲取您的促銷活動,您可以使用此終端節點。您還可以篩選數據(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/campaigns?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "campaigns": [
            {
                "id": 1,
                "name": "Sample Campaign",
                "public": false,
                "rotator": false,
                "list": "https:\/\/domain.com\/u\/admin\/list-1"
            },
            {
                "id": 2,
                "domain": "Facebook Campaign",
                "public": true,
                "rotator": "https:\/\/domain.com\/r\/test",
                "list": "https:\/\/domain.com\/u\/admin\/test-2"
            }
        ]
    }
}

एक अभियान बनाएं

發佈 https://urlkai.com/api/campaign/add

可以使用此終端節點添加活動。

पैरामीटर विवरण
名字 (選擇)活動名稱
鼻涕蟲 (選擇)Rotator Slug
公共 (選擇)訪問
curl --location --request POST 'https://urlkai.com/api/campaign/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "id": 3,
    "domain": "New Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/new-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/new-campaign-3"
}
發佈 https://urlkai.com/api/campaign/:campaignid/assign/:linkid

可以使用此終端節點將短連結分配給營銷活動。終端節點需要活動ID和短連結ID。

curl --location --request POST 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Link successfully added to the campaign."
}

अभियान अपडेट करें

放 https://urlkai.com/api/campaign/:id/update

要更新活動,您需要通過 PUT 請求以 JSON 格式發送有效數據。數據必須作為請求的原始正文發送,如下所示。下面的示例顯示了您可以發送的所有參數,但您不需要發送所有參數(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
名字 (必填)活動名稱
鼻涕蟲 (選擇)Rotator Slug
公共 (選擇)訪問
curl --location --request PUT 'https://urlkai.com/api/campaign/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "id": 3,
    "domain": "Twitter Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/twitter-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/twitter-campaign-3"
}

刪除活動

刪除 https://urlkai.com/api/campaign/:id/delete

要刪除活動,您需要發送 DELETE 請求。

curl --location --request DELETE 'https://urlkai.com/api/campaign/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Campaign has been deleted successfully."
}

कस्टम स्पलैश

列出自定義啟動畫面

獲取 https://urlkai.com/api/splash?limit=2&page=1

To get Splash Pages via the API, you can use this endpoint. You can also filter data (See table for more info).

पैरामीटर विवरण
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/splash?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "splash": [
            {
                "id": 1,
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "name": "Product 2 Promo",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

क्यूआर कोड

列出二維碼

獲取 https://urlkai.com/api/qr?limit=2&page=1

要通過 API 獲取 QR 碼,您可以使用此終端節點。您還可以篩選數據(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/qr?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "link": "https:\/\/urlkai.com\/qr\/a2d5e",
                "scans": 0,
                "name": "Google",
                "date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "link": "https:\/\/urlkai.com\/qr\/b9edfe",
                "scans": 5,
                "name": "Google Canada",
                "date": "2020-11-10 18:00:25"
            }
        ]
    }
}

獲取單個 QR 碼

獲取 https://urlkai.com/api/qr/:id

要通過 API 獲取單個 QR 碼的詳細資訊,您可以使用此終端節點。

curl --location --request GET 'https://urlkai.com/api/qr/:id' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "details": {
        "id": 1,
        "link": "https:\/\/urlkai.com\/qr\/b9edfe",
        "scans": 5,
        "name": "Google Canada",
        "date": "2020-11-10 18:00:25"
    },
    "data": {
        "clicks": 1,
        "uniqueClicks": 1,
        "topCountries": {
            "Unknown": "1"
        },
        "topReferrers": {
            "Direct, email and other": "1"
        },
        "topBrowsers": {
            "Chrome": "1"
        },
        "topOs": {
            "Windows 10": "1"
        },
        "socialCount": {
            "facebook": 0,
            "twitter": 0,
            "instagram": 0
        }
    }
}

創建 QR 碼

發佈 https://urlkai.com/api/qr/add

要創建 QR 碼,您需要通過 POST 請求以 JSON 格式發送有效數據。數據必須作為請求的原始正文發送,如下所示。下面的示例顯示了您可以發送的所有參數,但您不需要發送所有參數(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
類型 (必填) text |電子名片 |連結 |電子郵件 |電話 |短信 |無線網路
數據 (必填)要嵌入二維碼中的數據。數據可以是字串或陣列,具體取決於類型
背景 (選擇)RGB 顏色,例如 rgb(255,255,255)
前景 (選擇)RGB 顏色,例如 rgb(0,0,0)
商標 (選擇)徽標的路徑 png 或 jpg
名字 (選擇)二維碼名稱
curl --location --request POST 'https://urlkai.com/api/qr/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png",
    "name": "QR Code API"
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "id": 3,
    "link": "https:\/\/urlkai.com\/qr\/a58f79"
}

更新二維碼

放 https://urlkai.com/api/qr/:id/update

要更新 QR 碼,您需要通過 PUT 請求以 JSON 格式發送有效數據。數據必須作為請求的原始正文發送,如下所示。下面的示例顯示了您可以發送的所有參數,但您不需要發送所有參數(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
數據 (必填)要嵌入二維碼中的數據。數據可以是字串或陣列,具體取決於類型
背景 (選擇)RGB 顏色,例如 rgb(255,255,255)
前景 (選擇)RGB 顏色,例如 rgb(0,0,0)
商標 (選擇)徽標的路徑 png 或 jpg
curl --location --request PUT 'https://urlkai.com/api/qr/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "QR has been updated successfully."
}

刪除 QR 碼

刪除 https://urlkai.com/api/qr/:id/delete

要刪除 QR 碼,您需要發送 DELETE 請求。

curl --location --request DELETE 'https://urlkai.com/api/qr/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}

चैनल

列出頻道

獲取 https://urlkai.com/api/channels?limit=2&page=1

要通過 API 獲取管道,您可以使用此終端節點。您還可以篩選數據(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/channels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "channels": [
            {
                "id": 1,
                "name": "Channel 1",
                "description": "Description of channel 1",
                "color": "#000000",
                "starred": true
            },
            {
                "id": 2,
                "name": "Channel 2",
                "description": "Description of channel 2",
                "color": "#FF0000",
                "starred": false
            }
        ]
    }
}

列出頻道項

獲取 https://urlkai.com/api/channel/:id?limit=1&page=1

要通過 API 獲取選定管道中的專案,您可以使用此端點。您還可以篩選數據(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/channel/:id?limit=1&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "items": [
            {
                "type": "links",
                "id": 1,
                "title": "My Sample Link",
                "preview": "https:\/\/google.com",
                "link": "https:\/\/urlkai.com\/google",
                "date": "2022-05-12"
            },
            {
                "type": "bio",
                "id": 1,
                "title": "My Sample Bio",
                "preview": "https:\/\/urlkai.com\/mybio",
                "link": "https:\/\/urlkai.com\/mybio",
                "date": "2022-06-01"
            }
        ]
    }
}

एक चैनल बनाएं

發佈 https://urlkai.com/api/channel/add

可以使用此終端節點添加通道。

पैरामीटर विवरण
名字 (必填)頻道名稱
描述 (選擇)頻道描述
顏色 (選擇)通道徽章顏色 (HEX)
主演 (選擇)是否為頻道加星標(true 或 false)
curl --location --request POST 'https://urlkai.com/api/channel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "id": 3,
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}

將專案分配給管道

發佈 https://urlkai.com/api/channel/:channelid/assign/:type/:itemid

通過發送包含頻道 ID、商品類型(連結、生物或 qr)和商品 ID 的請求,可以將商品分配給任何管道。

पैरामीटर विवरण
:channelid (必填)頻道ID
:類型 (必需)鏈接或個人簡介或二維碼
:itemid (必填)商品ID
curl --location --request POST 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Item successfully added to the channel."
}

चैनल अपडेट करें

放 https://urlkai.com/api/channel/:id/update

要更新通道,您需要通過 PUT 請求以 JSON 格式發送有效數據。數據必須作為請求的原始正文發送,如下所示。下面的示例顯示了您可以發送的所有參數,但您不需要發送所有參數(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
名字 (選擇)頻道名稱
描述 (選擇)頻道描述
顏色 (選擇)通道徽章顏色 (HEX)
主演 (選擇)是否為頻道加星標(true 或 false)
curl --location --request PUT 'https://urlkai.com/api/channel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Acme Corp",
    "description": "channel for items for Acme Corp",
    "color": "#FFFFFF",
    "starred": false
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Channel has been updated successfully."
}

刪除頻道

刪除 https://urlkai.com/api/channel/:id/delete

要刪除頻道,您需要發送 DELETE 請求。所有專案也將被取消分配。

curl --location --request DELETE 'https://urlkai.com/api/channel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Channel has been deleted successfully."
}

पिक्सल

列出圖元

獲取 https://urlkai.com/api/pixels?limit=2&page=1

要通過 API 獲取像素代碼,您可以使用此端點。您還可以篩選數據(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/pixels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "pixels": [
            {
                "id": 1,
                "type": "gtmpixel",
                "name": "GTM Pixel",
                "tag": "GA-123456789",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "twitterpixel",
                "name": "Twitter Pixel",
                "tag": "1234567",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

創建 Pixel 像素代碼

發佈 https://urlkai.com/api/pixel/add

可以使用此端點創建圖元。您需要發送像素類型和標籤。

पैरामीटर विवरण
類型 (必需) GTMepL |Gapixel 像素 |FB像素 |AdWords 像素 |領英圖元 |推特圖元 |廣告圖元 |QuoraPixel 像素代碼 |Pinterest 公司 |必應 |Snapchat 的 |Reddit |抖音
名字 (必填)圖元的自定義名稱
標記 (必填)像素的標籤
curl --location --request POST 'https://urlkai.com/api/pixel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "id": 1
}

पिक्सेल अपडेट करें

放 https://urlkai.com/api/pixel/:id/update

要更新 Pixel 像素代碼,您需要通過 PUT 請求以 JSON 格式發送有效數據。數據必須作為請求的原始正文發送,如下所示。下面的示例顯示了您可以發送的所有參數,但您不需要發送所有參數(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
名字 (選擇)圖元的自定義名稱
標記 (必填)像素的標籤
curl --location --request PUT 'https://urlkai.com/api/pixel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Pixel has been updated successfully."
}

刪除圖元

刪除 https://urlkai.com/api/pixel/:id/delete

要刪除圖元,您需要發送 DELETE 請求。

curl --location --request DELETE 'https://urlkai.com/api/pixel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Pixel has been deleted successfully."
}

ब्रांडेड डोमेन

列出品牌域

獲取 https://urlkai.com/api/domains?limit=2&page=1

要通過 API 獲取您的品牌域,您可以使用此終端節點。您還可以篩選數據(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/domains?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "domains": [
            {
                "id": 1,
                "domain": "https:\/\/domain1.com",
                "redirectroot": "https:\/\/rootdomain.com",
                "redirect404": "https:\/\/rootdomain.com\/404"
            },
            {
                "id": 2,
                "domain": "https:\/\/domain2.com",
                "redirectroot": "https:\/\/rootdomain2.com",
                "redirect404": "https:\/\/rootdomain2.com\/404"
            }
        ]
    }
}

創建品牌域

發佈 https://urlkai.com/api/domain/add

可以使用此終端節點添加域。請確保域正確指向我們的伺服器。

पैरामीटर विवरण
域 (必填)品牌域,包括 HTTP 或 HTTPs
重定向根 (選擇)當有人訪問您的域時進行根重定向
重定向404 (選擇)自定義 404 重定向
curl --location --request POST 'https://urlkai.com/api/domain/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "domain": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "id": 1
}

डोमेन अपडेट करें

放 https://urlkai.com/api/domain/:id/update

要更新品牌域,您需要通過 PUT 請求以 JSON 格式發送有效數據。數據必須作為請求的原始正文發送,如下所示。下面的示例顯示了您可以發送的所有參數,但您不需要發送所有參數(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
重定向根 (選擇)當有人訪問您的域時進行根重定向
重定向404 (選擇)自定義 404 重定向
curl --location --request PUT 'https://urlkai.com/api/domain/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}'

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Domain has been updated successfully."
}

刪除域

刪除 https://urlkai.com/api/domain/:id/delete

要刪除域,您需要發送 DELETE 請求。

curl --location --request DELETE 'https://urlkai.com/api/domain/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

सीटीए ओवरले

列出 CTA 疊加

獲取 https://urlkai.com/api/overlay?limit=2&page=1

要通過 API 獲取 CTA 疊加,您可以使用此端點。您還可以篩選數據(有關更多資訊,請參閱表格)。

पैरामीटर विवरण
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/overlay?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

सर्वर प्रतिक्रिया

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "cta": [
            {
                "id": 1,
                "type": "message",
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "contact",
                "name": "Contact Page",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}