Developers

Riferimento API per sviluppatori

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.

Iniziare

È necessaria una chiave API affinché le richieste vengano elaborate dal sistema.Una volta che un utente si registra, viene generata automaticamente una chiave API per questo utente.La chiave API deve essere inviata con ogni richiesta (vedi esempio completo di seguito).Se la chiave API non viene inviata o è scaduta, si verificherà un errore.Assicurati di mantenere segreta la tua chiave API per prevenire abusi.

Autenticazione

Per autenticarti con il sistema API, devi inviare la tua chiave API come token di autorizzazione con ogni richiesta.Puoi vedere il codice di esempio di seguito.

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

Limite di tariffa

La nostra API ha un limitatore di velocità per salvaguardare da picchi di richieste per massimizzarne la stabilità.Il nostro limitatore di velocità è attualmente limitato a 30 richieste al 1 minuto.請注意,費率可能會根據訂閱的計劃而變化。

Insieme alla risposta verranno inviate diverse intestazioni che possono essere esaminate per determinare varie informazioni sulla richiesta.

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

Gestione della risposta

Tutte le risposte API vengono restituite in formato JSON per impostazione predefinita.Per convertirli in dati utilizzabili, sarà necessario utilizzare la funzione appropriata in base alla lingua.In PHP, la funzione json_decode() può essere utilizzata per convertire i dati in un oggetto (predefinito) o in un array (impostare il secondo parametro su true).È molto importante controllare la chiave di errore in quanto fornisce informazioni sull'eventuale presenza di un errore.Puoi anche controllare il codice dell'intestazione.

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

Ottieni account

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

Per ottenere informazioni sull'account, puoi inviare una richiesta a questo endpoint che restituirà i dati sull'account.

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

Risposta del server

{
    "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"
    }
}

Aggiorna account

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

Per aggiornare le informazioni sull'account, puoi inviare una richiesta a questo endpoint che aggiornerà i dati sull'account.

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"
}'

Risposta del server

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

坎帕涅

列出營銷活動

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

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

Parametro (帕拉梅特羅酒店) Descrizione
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/campaigns?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Risposta del server

{
    "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"
            }
        ]
    }
}

Crea una campagna

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

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

Parametro (帕拉梅特羅酒店) Descrizione
名字 (選擇)活動名稱
鼻涕蟲 (選擇)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
}'

Risposta del server

{
    "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' \

Risposta del server

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

Aggiorna campagna

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

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

Parametro (帕拉梅特羅酒店) Descrizione
名字 (必填)活動名稱
鼻涕蟲 (選擇)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
}'

Risposta del server

{
    "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' \

Risposta del server

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

卡納利

列出頻道

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

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

Parametro (帕拉梅特羅酒店) Descrizione
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/channels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Risposta del server

{
    "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 獲取選定管道中的專案,您可以使用此端點。您還可以篩選數據(有關更多資訊,請參閱表格)。

Parametro (帕拉梅特羅酒店) Descrizione
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/channel/:id?limit=1&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Risposta del server

{
    "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"
            }
        ]
    }
}

Crea un canale

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

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

Parametro (帕拉梅特羅酒店) Descrizione
名字 (必填)頻道名稱
描述 (選擇)頻道描述
顏色 (選擇)通道徽章顏色 (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
}'

Risposta del server

{
    "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 的請求,可以將商品分配給任何管道。

Parametro (帕拉梅特羅酒店) Descrizione
: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' \

Risposta del server

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

Aggiorna canale

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

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

Parametro (帕拉梅特羅酒店) Descrizione
名字 (選擇)頻道名稱
描述 (選擇)頻道描述
顏色 (選擇)通道徽章顏色 (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
}'

Risposta del server

{
    "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' \

Risposta del server

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

Codici 二維碼

列出二維碼

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

Per ottenere i tuoi codici QR tramite l'API, puoi utilizzare questo endpoint.Puoi anche filtrare i dati (vedi tabella per maggiori informazioni).

Parametro (帕拉梅特羅酒店) Descrizione
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/qr?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Risposta del server

{
    "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"
            }
        ]
    }
}

Ottieni un unico QR Code

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

Per ottenere i dettagli per un singolo codice QR tramite l'API, puoi utilizzare questo endpoint.

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

Risposta del server

{
    "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
        }
    }
}

Crea un codice QR

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

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

Parametro (帕拉梅特羅酒店) Descrizione
類型 (必填) 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"
}'

Risposta del server

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

更新二維碼

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

Per aggiornare un codice QR, devi inviare un dato valido in JSON tramite una richiesta PUT.I dati devono essere inviati come corpo grezzo della tua richiesta come mostrato di seguito.L'esempio seguente mostra tutti i parametri che puoi inviare 馬 non è necessario inviarli tutti (vedi tabella per maggiori informazioni).

Parametro (帕拉梅特羅酒店) Descrizione
數據 (必填)要嵌入二維碼中的數據。數據可以是字串或陣列,具體取決於類型
背景 (選擇)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"
}'

Risposta del server

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

Elimina un codice QR

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

Per eliminare un codice QR, è necessario inviare una richiesta DELETE.

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

Risposta del server

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

Domini di marca

列出品牌域

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

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

Parametro (帕拉梅特羅酒店) Descrizione
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/domains?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Risposta del server

{
    "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

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

Parametro (帕拉梅特羅酒店) Descrizione
域 (必填)品牌域,包括 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"
}'

Risposta del server

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

Aggiorna dominio

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

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

Parametro (帕拉梅特羅酒店) Descrizione
重定向根 (選擇)當有人訪問您的域時進行根重定向
重定向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"
}'

Risposta del server

{
    "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' \

Risposta del server

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

列出檔

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

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

Parametro (帕拉梅特羅酒店) Descrizione
名字 (選擇)按名稱搜索檔
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/files?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Risposta del server

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

上傳檔

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

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

Parametro (帕拉梅特羅酒店) Descrizione
名字 (選擇)檔名
習慣 (選擇)自定義別名而不是隨機別名。
域 (選擇)自訂域
密碼 (選擇)密碼保護
滿期 (選擇)下載示例的過期時間 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"'

Risposta del server

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

疊加 CTA

列出 CTA 疊加

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

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

Parametro (帕拉梅特羅酒店) Descrizione
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/overlay?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Risposta del server

{
    "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"
            }
        ]
    }
}

列出圖元

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

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

Parametro (帕拉梅特羅酒店) Descrizione
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/pixels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Risposta del server

{
    "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

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

Parametro (帕拉梅特羅酒店) Descrizione
類型 (必需) 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"
}'

Risposta del server

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

Aggiorna 圖元

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

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

Parametro (帕拉梅特羅酒店) Descrizione
名字 (選擇)圖元的自定義名稱
標記 (必填)像素的標籤
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"
}'

Risposta del server

{
    "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' \

Risposta del server

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

Splash personalizzato

列出自定義啟動畫面

獲取 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).

Parametro (帕拉梅特羅酒店) Descrizione
限制 (選擇)每頁數據結果
頁 (選擇)當前頁面請求
curl --location --request GET 'https://urlkai.com/api/splash?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Risposta del server

{
    "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"
            }
        ]
    }
}