# Developers
**Source:** https://zh-hans.urlkai.com/pt/developers
**Language:** Simplified Chinese

---

Começando 

Autenticação 

Taxa limite 

Tratamento de respostas 

###### 帐户

获取帐户 

更新帐户

###### 坎帕纳斯

列出营销活动 

Crie uma campanha 

将链接分配给营销活动 

Atualizar campanha 

删除活动

###### 迦奈

列出频道 

列出频道项 

Criar um canal 

将项目分配给渠道 

阿图阿利扎尔运河 

删除频道

###### Códigos 二维码

列出二维码 

获取单个 QR 码 

创建 QR 码 

更新二维码 

删除 QR 码

###### Domínios de marca

列出品牌域 

创建品牌域 

Atualizar domínio 

删除域

###### 文件

列出文件 

上传文件

###### 链接

列出链接 

获取单个链接 

缩短链接 

Atualizar link 

删除链接

###### 皮克塞斯

列出像素 

创建 Pixel 像素代码 

Atualizar 像素 

删除像素

###### Sobreposições de CTA

列出 CTA 叠加

###### Splash personalizado

列出自定义启动画面

#### Referência de API para desenvolvedores

###### Começando

Uma chave de API é necessária para que as solicitações sejam processadas pelo sistema.Depois que um usuário se registra， uma chave de API é gerada automaticamente para esse usuário.A chave de API deve ser enviada com cada solicitação （veja o exemplo completo abaixo）.Se a chave de API não for enviada ou tiver expirado， ocorrerá um erro.Certifique-se de manter sua chave de API em segredo para evitar abusos.

###### Autenticação

Para autenticar com o sistema de API， você precisa enviar sua chave de API como um token de autorização com cada solicitação.Você pode ver o código de exemplo abaixo.

cURL
PHP
Node.js
Python
C#

```
curl --location --request POST 'https://urlkai.com/api/account' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;
curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/account”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “POST”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
));

$response = curl_exec（$curl）;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '发布'，
    'url'： 'https://urlkai.com/api/account'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    body： ''
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/account”
有效载荷 = {}
标头 = {
  '授权'： 'Bearer YOURAPIKEY'，
  '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/account”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Taxa limite

Nossa API tem um limitador de taxa para proteger contra picos de solicitações para maximizar sua estabilidade.Nosso limitador de taxa está limitado a 30 solicitações por 1 minuto.请注意，费率可能会根据订阅的计划而变化。

Vários cabeçalhos serão enviados juntamente com a resposta e estes podem ser examinados para determinar várias informações sobre a solicitação.

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

###### Tratamento de respostas

Todas as respostas da API são retornadas formato JSON por padrão.Para converter isso em dados utilizáveis， a função apropriada precisará ser usada de acordo com o idioma.Em PHP， a função json\_decode（） pode ser usada para converter os dados em um objeto （padrão） ou um array （defina o segundo parâmetro como true）.É muito importante verificar a chave de erro， pois ela fornece informações sobre se houve ou não um erro.Você também pode verificar o código do cabeçalho.

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

---

#### 帐户 - Open in ChatGPT - Open in Claude

###### 获取帐户

获取  `https://urlkai.com/api/account`

要获取有关该账户的信息，您可以向此终端节点发送请求，它将返回该账户的数据。

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/account' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/account”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/account'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/account”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/account”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “数据”： {
        “id”： 1，
        “电子邮件”： ” [电子邮件保护] ",
        “用户名”： “sampleuser”，
        “头像”： “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
PHP
Node.js
Python
C#

```
curl --location --request PUT 'https://urlkai.com/api/account/update' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “电子邮件”： ” [电子邮件保护] ",
    “password”： “newpassword”
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/account/update”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “PUT”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “电子邮件”： ” [电子邮件保护] ",
	    “password”： “newpassword”
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '放'，
    'url'： 'https://urlkai.com/api/account/update'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “电子邮件”： ” [电子邮件保护] ",
    “password”： “newpassword”
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/account/update”
有效载荷 = {
    “电子邮件”： ” [电子邮件保护] ",
    “password”： “newpassword”
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
response = requests.request（“PUT”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Put， “https://urlkai.com/api/account/update”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “电子邮件”： ” [电子邮件保护] ",
    “password”： “newpassword”
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “帐户已成功更新。”
}
```

---

#### 坎帕纳斯 - Open in ChatGPT - Open in Claude

###### 列出营销活动

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

要通过 API 获取您的促销活动，您可以使用此终端节点。您还可以筛选数据（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/campaigns?limit=2&page=1' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/campaigns?limit=2&page=1”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/campaigns?limit=2&page=1'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/campaigns?limit=2&page=1”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/campaigns?limit=2&page=1”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “error”： “0”， /错误“： ”0“，
    “数据”： {
        “result”： 2，
        “perpage”： 2，
        “currentpage”： 1，
        “nextpage”： 1，
        “maxpage”： 1，
        “campaigns”： [
            {
                “id”： 1，
                “name”： “示例营销活动”，
                “public”： false，
                “rotator”： false，
                “list”： “https：\/\/domain.com\/u\/admin\/list-1”
            },
            {
                “id”：2、
                “domain”： “Facebook 活动”，
                “public”： true，
                “rotator”： “https：\/\/domain.com\/r\/test”， //旋转器“，
                “列表”： “https：\/\/domain.com\/u\/admin\/test-2”
            }
        ]
    }
}
```

###### Crie uma campanha

发布  `https://urlkai.com/api/campaign/add`

可以使用此终端节点添加活动。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 名字 | （可选）活动名称 |
| 鼻涕虫 | （可选）Rotator Slug |
| 公共 | （可选）访问 |

cURL
PHP
Node.js
Python
C#

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

```
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://urlkai.com/api/campaign/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "name": "New Campaign",
	    "slug": "new-campaign",
	    "public": true
	}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

```
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://urlkai.com/api/campaign/add',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
```

```
import requests
url = "https://urlkai.com/api/campaign/add"
payload = {
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}
headers = {
    'Authorization': 'Bearer YOURAPIKEY',
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.text)
```

```
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/campaign/add");
request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
var content = new StringContent("{
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}", System.Text.Encoding.UTF8, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    “错误”：0，
    “id”：3，
    “领域”：“新战役”，
    “公开”：正确，
    “旋转者”：“https：\/\/domain.com\/r\/new-campaign”，
    “列表”：“https：\/\/domain.com\/u\/admin\/new-campaign-3”
}
```

###### 将链接分配给营销活动

发布  `https://urlkai.com/api/campaign/:campaignid/assign/:linkid`

可以使用此终端节点将短链接分配给营销活动。终端节点需要活动 ID 和短链接 ID。

cURL
PHP
Node.js
Python
C#

```
curl --location --request POST 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/campaign/:campaignid/assign/:linkid”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “POST”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '发布'，
    'url'： 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/campaign/:campaignid/assign/:linkid”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“POST”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Post， “https://urlkai.com/api/campaign/:campaignid/assign/:linkid”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “已成功将链接添加到营销活动。”
}
```

###### Atualizar campanha

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

要更新活动，您需要通过 PUT 请求以 JSON 格式发送有效数据。数据必须作为请求的原始正文发送，如下所示。下面的示例显示了您可以发送的所有参数，但您不需要发送所有参数（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 名字 | （必填）活动名称 |
| 鼻涕虫 | （可选）Rotator Slug |
| 公共 | （可选）访问 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request PUT 'https://urlkai.com/api/campaign/:id/update' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “name”： “Twitter 活动”，
    “slug”： “推特活动”，
    “public”： true
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/campaign/:id/update”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “PUT”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “name”： “Twitter 活动”，
	    “slug”： “推特活动”，
	    “public”： true
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '放'，
    'url'： 'https://urlkai.com/api/campaign/:id/update'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “name”： “Twitter 活动”，
    “slug”： “推特活动”，
    “public”： true
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/campaign/:id/update”
有效载荷 = {
    “name”： “Twitter 活动”，
    “slug”： “推特活动”，
    “public”： true
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
response = requests.request（“PUT”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Put， “https://urlkai.com/api/campaign/:id/update”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “name”： “Twitter 活动”，
    “slug”： “推特活动”，
    “public”： true
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “id”： 3，
    “domain”： “Twitter 活动”，
    “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
PHP
Node.js
Python
C#

```
curl --location --request 删除 'https://urlkai.com/api/campaign/:id/delete' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/campaign/:id/delete”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “删除”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '删除'，
    'url'： 'https://urlkai.com/api/campaign/:id/delete'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/campaign/:id/delete”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“DELETE”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Delete， “https://urlkai.com/api/campaign/:id/delete”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “已成功删除促销活动。”
}
```

---

#### 迦奈 - Open in ChatGPT - Open in Claude

###### 列出频道

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

要通过 API 获取渠道，您可以使用此终端节点。您还可以筛选数据（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/channels?limit=2&page=1' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/channels?limit=2&page=1”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/channels?limit=2&page=1'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/channels?limit=2&page=1”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/channels?limit=2&page=1”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “error”： “0”， /错误“： ”0“，
    “数据”： {
        “result”： 2，
        “perpage”： 2，
        “currentpage”： 1，
        “nextpage”： 1，
        “maxpage”： 1，
        “频道”：[
            {
                “id”： 1，
                “name”： “通道 1”， /
                “description”： 频道 1 的描述“，
                “color”： “#000000”， /颜色
                “starred”： true
            },
            {
                “id”：2、
                “name”： “通道 2”， /
                “description”： 频道 2 的描述“，
                “color”： “#FF0000”，
                “starred”： false
            }
        ]
    }
}
```

###### 列出频道项

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

要通过 API 获取选定渠道中的项目，您可以使用此端点。您还可以筛选数据（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/channel/:id?limit=1&page=1' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/channel/:id?limit=1&page=1”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/channel/:id?limit=1&page=1'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/channel/:id?limit=1&page=1”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/channel/:id?limit=1&page=1”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “error”： “0”， /错误“： ”0“，
    “数据”： {
        “result”： 2，
        “perpage”： 2，
        “currentpage”： 1，
        “nextpage”： 1，
        “maxpage”： 1，
        “items”： [
            {
                “type”： “链接”，
                “id”： 1，
                “title”： “我的样本链接”，
                “preview”： “https：\/\/google.com”， //
                “link”： “https：\/\/urlkai.com\/google”， //google“，
                “date”： “2022-05-12”
            },
            {
                “type”： “生物”，
                “id”： 1，
                “title”： “我的样本简历”，
                “preview”： “https：\/\/urlkai.com\/mybio”， //mybio
                “link”： “https：\/\/urlkai.com\/mybio”， /链接
                “date”： “2022-06-01”
            }
        ]
    }
}
```

###### Criar um canal

发布  `https://urlkai.com/api/channel/add`

可以使用此终端节点添加通道。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 名字 | （必填）频道名称 |
| 描述 | （可选）频道描述 |
| 颜色 | （可选）通道徽章颜色 （HEX） |
| 主演 | （可选）是否为频道加星标（true 或 false） |

cURL
PHP
Node.js
Python
C#

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

```
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://urlkai.com/api/channel/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "name": "New Channel",
	    "description": "my new channel",
	    "color": "#000000",
	    "starred": true
	}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

```
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://urlkai.com/api/channel/add',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
```

```
import requests
url = "https://urlkai.com/api/channel/add"
payload = {
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}
headers = {
    'Authorization': 'Bearer YOURAPIKEY',
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.text)
```

```
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/channel/add");
request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
var content = new StringContent("{
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}", System.Text.Encoding.UTF8, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    “错误”：0，
    “id”：3，
    “名称”：“新频道”，
    “描述”：“我的新频道”，
    “颜色”：“#000000”，
    “星标”：确实如此
}
```

###### 将项目分配给渠道

发布  `https://urlkai.com/api/channel/:channelid/assign/:type/:itemid`

通过发送包含频道 ID、商品类型（链接、生物或 qr）和商品 ID 的请求，可以将商品分配给任何渠道。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| ：channelid | （必填）频道 ID |
| ：类型 | （必需）链接或个人简介或二维码 |
| ：itemid | （必填）商品 ID |

cURL
PHP
Node.js
Python
C#

```
curl --location --request POST 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/channel/:channelid/assign/:type/:itemid”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “POST”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '发布'，
    'url'： 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/channel/:channelid/assign/:type/:itemid”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“POST”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Post， “https://urlkai.com/api/channel/:channelid/assign/:type/:itemid”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “项目已成功添加到频道。”
}
```

###### 阿图阿利扎尔运河

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

要更新通道，您需要通过 PUT 请求以 JSON 格式发送有效数据。数据必须作为请求的原始正文发送，如下所示。下面的示例显示了您可以发送的所有参数，但您不需要发送所有参数（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 名字 | （可选）频道名称 |
| 描述 | （可选）频道描述 |
| 颜色 | （可选）通道徽章颜色 （HEX） |
| 主演 | （可选）是否为频道加星标（true 或 false） |

cURL
PHP
Node.js
Python
C#

```
curl --location --request PUT 'https://urlkai.com/api/channel/:id/update' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “name”： “Acme Corp”， //名称
    “description”： “Acme Corp 的商品频道”，
    “color”： “#FFFFFF”，
    “starred”： false
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/channel/:id/update”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “PUT”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “name”： “Acme Corp”， //名称
	    “description”： “Acme Corp 的商品频道”，
	    “color”： “#FFFFFF”，
	    “starred”： false
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '放'，
    'url'： 'https://urlkai.com/api/channel/:id/update'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “name”： “Acme Corp”， //名称
    “description”： “Acme Corp 的商品频道”，
    “color”： “#FFFFFF”，
    “starred”： false
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/channel/:id/update”
有效载荷 = {
    “name”： “Acme Corp”， //名称
    “description”： “Acme Corp 的商品频道”，
    “color”： “#FFFFFF”，
    “starred”： false
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
response = requests.request（“PUT”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Put， “https://urlkai.com/api/channel/:id/update”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “name”： “Acme Corp”， //名称
    “description”： “Acme Corp 的商品频道”，
    “color”： “#FFFFFF”，
    “starred”： false
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： 频道已成功更新。
}
```

###### 删除频道

删除  `https://urlkai.com/api/channel/:id/delete`

要删除频道，您需要发送 DELETE 请求。所有项目也将被取消分配。

cURL
PHP
Node.js
Python
C#

```
curl --location --request 删除 'https://urlkai.com/api/channel/:id/delete' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/channel/:id/delete”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “删除”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '删除'，
    'url'： 'https://urlkai.com/api/channel/:id/delete'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/channel/:id/delete”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“DELETE”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Delete， “https://urlkai.com/api/channel/:id/delete”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： 频道已成功删除。
}
```

---

#### Códigos 二维码 - Open in ChatGPT - Open in Claude

###### 列出二维码

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

要通过 API 获取 QR 码，您可以使用此终端节点。您还可以筛选数据（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/qr?limit=2&page=1' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/qr?limit=2&page=1”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/qr?limit=2&page=1'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/qr?limit=2&page=1”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/qr?limit=2&page=1”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “error”： “0”， /错误“： ”0“，
    “数据”： {
        “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 加拿大”，
                “date”： “2020-11-10 18：00：25”
            }
        ]
    }
}
```

###### 获取单个 QR 码

获取  `https://urlkai.com/api/qr/:id`

要通过 API 获取单个 QR 码的详细信息，您可以使用此终端节点。

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/qr/:id' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/qr/:id”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/qr/:id'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/qr/:id”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/qr/:id”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “详细信息”： {
        “id”： 1，
        “link”： “https：\/\/urlkai.com\/qr\/b9edfe”，
        “scans”：5、
        “name”： “Google 加拿大”，
        “date”： “2020-11-10 18：00：25”
    },
    “数据”： {
        “clicks”： 1，
        “uniqueClicks”： 1，
        “topCountries”： {
            “未知”： “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 格式发送有效数据。数据必须作为请求的原始正文发送，如下所示。下面的示例显示了您可以发送的所有参数，但您不需要发送所有参数（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 类型 | （必填） text |电子名片 |链接 |电子邮件 |电话 |短信 |无线网络 |
| 数据 | （必填）要嵌入二维码中的数据。数据可以是字符串或数组，具体取决于类型 |
| 背景 | （可选）RGB 颜色，例如 rgb（255,255,255） |
| 前景 | （可选）RGB 颜色，例如 rgb（0,0,0） |
| 商标 | （可选）徽标的路径 png 或 jpg |
| 名字 | （可选）二维码名称 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request POST 'https://urlkai.com/api/qr/add' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “type”： “链接”，
    “data”： “https：\/\/google.com”， ///
    “background”： “rgb（255,255,255）”， /
    “foreground”： “rgb（0,0,0）”， /
    “徽标”： “https：\/\/site.com\/logo.png”，
    “name”： “二维码 API”
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/qr/add”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “POST”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “type”： “链接”，
	    “data”： “https：\/\/google.com”， ///
	    “background”： “rgb（255,255,255）”， /
	    “foreground”： “rgb（0,0,0）”， /
	    “徽标”： “https：\/\/site.com\/logo.png”，
	    “name”： “二维码 API”
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '发布'，
    'url'： 'https://urlkai.com/api/qr/add'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “type”： “链接”，
    “data”： “https：\/\/google.com”， ///
    “background”： “rgb（255,255,255）”， /
    “foreground”： “rgb（0,0,0）”， /
    “徽标”： “https：\/\/site.com\/logo.png”，
    “name”： “二维码 API”
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/qr/add”
有效载荷 = {
    “type”： “链接”，
    “data”： “https://google.com”， /数据
    “background”： “rgb（255,255,255）”， /
    “foreground”： “rgb（0,0,0）”， /
    “logo”： “https://site.com/logo.png”，
    “name”： “二维码 API”
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“POST”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Post， “https://urlkai.com/api/qr/add”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “type”： “链接”，
    “data”： “https：\/\/google.com”， ///
    “background”： “rgb（255,255,255）”， /
    “foreground”： “rgb（0,0,0）”， /
    “徽标”： “https：\/\/site.com\/logo.png”，
    “name”： “二维码 API”
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “id”： 3，
    “link”： “https：\/\/urlkai.com\/qr\/a58f79”
}
```

###### 更新二维码

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

要更新 QR 码，您需要通过 PUT 请求以 JSON 格式发送有效数据。数据必须作为请求的原始正文发送，如下所示。下面的示例显示了您可以发送的所有参数，但您不需要发送所有参数（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 数据 | （必填）要嵌入二维码中的数据。数据可以是字符串或数组，具体取决于类型 |
| 背景 | （可选）RGB 颜色，例如 rgb（255,255,255） |
| 前景 | （可选）RGB 颜色，例如 rgb（0,0,0） |
| 商标 | （可选）徽标的路径 png 或 jpg |

cURL
PHP
Node.js
Python
C#

```
curl --location --request PUT 'https://urlkai.com/api/qr/:id/update' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “type”： “链接”，
    “data”： “https：\/\/google.com”， ///
    “background”： “rgb（255,255,255）”， /
    “foreground”： “rgb（0,0,0）”， /
    “徽标”： “https：\/\/site.com\/logo.png”
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/qr/:id/update”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “PUT”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “type”： “链接”，
	    “data”： “https：\/\/google.com”， ///
	    “background”： “rgb（255,255,255）”， /
	    “foreground”： “rgb（0,0,0）”， /
	    “徽标”： “https：\/\/site.com\/logo.png”
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '放'，
    'url'： 'https://urlkai.com/api/qr/:id/update'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “type”： “链接”，
    “data”： “https：\/\/google.com”， ///
    “background”： “rgb（255,255,255）”， /
    “foreground”： “rgb（0,0,0）”， /
    “徽标”： “https：\/\/site.com\/logo.png”
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/qr/:id/update”
有效载荷 = {
    “type”： “链接”，
    “data”： “https://google.com”， /数据
    “background”： “rgb（255,255,255）”， /
    “foreground”： “rgb（0,0,0）”， /
    “logo”： “https://site.com/logo.png”
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
response = requests.request（“PUT”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Put， “https://urlkai.com/api/qr/:id/update”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “type”： “链接”，
    “data”： “https：\/\/google.com”， ///
    “background”： “rgb（255,255,255）”， /
    “foreground”： “rgb（0,0,0）”， /
    “徽标”： “https：\/\/site.com\/logo.png”
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “二维码已成功更新。”
}
```

###### 删除 QR 码

删除  `https://urlkai.com/api/qr/:id/delete`

要删除 QR 码，您需要发送 DELETE 请求。

cURL
PHP
Node.js
Python
C#

```
curl --location --request DELETE 'https://urlkai.com/api/qr/:id/delete' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/qr/:id/delete”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “删除”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '删除'，
    'url'： 'https://urlkai.com/api/qr/:id/delete'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/qr/:id/delete”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“DELETE”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Delete， “https://urlkai.com/api/qr/:id/delete”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “已成功删除 QR 码。”
}
```

---

#### Domínios de marca - Open in ChatGPT - Open in Claude

###### 列出品牌域

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

要通过 API 获取您的品牌域，您可以使用此终端节点。您还可以筛选数据（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/domains?limit=2&page=1' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/domains?limit=2&page=1”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/domains?limit=2&page=1'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/domains?limit=2&page=1”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/domains?limit=2&page=1”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “error”： “0”， /错误“： ”0“，
    “数据”： {
        “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、
                “域”： “https：\/\/domain2.com”，
                “redirectroot”： “https：\/\/rootdomain2.com”， //
                “redirect404”： “https：\/\/rootdomain2.com\/404”
            }
        ]
    }
}
```

###### 创建品牌域

发布  `https://urlkai.com/api/domain/add`

可以使用此终端节点添加域。请确保域正确指向我们的服务器。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 域 | （必填）品牌域，包括 http 或 https |
| 重定向根 | （可选）当有人访问您的域时进行根重定向 |
| 重定向404 | （可选）自定义 404 重定向 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request POST 'https://urlkai.com/api/domain/add' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “domain”： “https：\/\/domain1.com”， /// 域
    “redirectroot”： “https：\/\/rootdomain.com”， /
    “redirect404”： “https：\/\/rootdomain.com\/404”
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/domain/add”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “POST”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “domain”： “https：\/\/domain1.com”， /// 域
	    “redirectroot”： “https：\/\/rootdomain.com”， /
	    “redirect404”： “https：\/\/rootdomain.com\/404”
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '发布'，
    'url'： 'https://urlkai.com/api/domain/add'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “domain”： “https：\/\/domain1.com”， /// 域
    “redirectroot”： “https：\/\/rootdomain.com”， /
    “redirect404”： “https：\/\/rootdomain.com\/404”
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/domain/add”
有效载荷 = {
    “domain”： “https://domain1.com”， //域“： ”“，
    “redirectroot”： “https://rootdomain.com”， //
    “redirect404”： “https://rootdomain.com/404”
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“POST”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Post， “https://urlkai.com/api/domain/add”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “domain”： “https：\/\/domain1.com”， /// 域
    “redirectroot”： “https：\/\/rootdomain.com”， /
    “redirect404”： “https：\/\/rootdomain.com\/404”
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “id”：1
}
```

###### Atualizar domínio

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

要更新品牌域，您需要通过 PUT 请求以 JSON 格式发送有效数据。数据必须作为请求的原始正文发送，如下所示。下面的示例显示了您可以发送的所有参数，但您不需要发送所有参数（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 重定向根 | （可选）当有人访问您的域时进行根重定向 |
| 重定向404 | （可选）自定义 404 重定向 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request PUT 'https://urlkai.com/api/domain/:id/update' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “redirectroot”： “https：\/\/rootdomain-new.com”， ///
    “redirect404”： “https：\/\/rootdomain-new.com\/404”
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/domain/:id/update”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “PUT”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “redirectroot”： “https：\/\/rootdomain-new.com”， ///
	    “redirect404”： “https：\/\/rootdomain-new.com\/404”
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '放'，
    'url'： 'https://urlkai.com/api/domain/:id/update'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “redirectroot”： “https：\/\/rootdomain-new.com”， ///
    “redirect404”： “https：\/\/rootdomain-new.com\/404”
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/domain/:id/update”
有效载荷 = {
    “redirectroot”： “https://rootdomain-new.com”， //
    “redirect404”： “https://rootdomain-new.com/404”
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
response = requests.request（“PUT”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Put， “https://urlkai.com/api/domain/:id/update”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “redirectroot”： “https：\/\/rootdomain-new.com”， ///
    “redirect404”： “https：\/\/rootdomain-new.com\/404”
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “域已成功更新。”
}
```

###### 删除域

删除  `https://urlkai.com/api/domain/:id/delete`

要删除域，您需要发送 DELETE 请求。

cURL
PHP
Node.js
Python
C#

```
curl --location --request 删除 'https://urlkai.com/api/domain/:id/delete' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/domain/:id/delete”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “删除”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '删除'，
    'url'： 'https://urlkai.com/api/domain/:id/delete'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/domain/:id/delete”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“DELETE”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Delete， “https://urlkai.com/api/domain/:id/delete”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “已成功删除域。”
}
```

---

#### 文件 - Open in ChatGPT - Open in Claude

###### 列出文件

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

获取您的所有文件。您还可以按名称搜索。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 名字 | （可选）按名称搜索文件 |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/files?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://urlkai.com/api/files?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

```
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://urlkai.com/api/files?limit=2&page=1',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
```

```
import requests
url = "https://urlkai.com/api/files?limit=2&page=1"
payload = {}
headers = {
    'Authorization': 'Bearer YOURAPIKEY',
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(response.text)
```

```
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/files?limit=2&page=1");
request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

###### Resposta do servidor

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

###### 上传文件

发布  `https://urlkai.com/api/files/upload/:filename?name=My+File`

通过将二进制数据作为 post 正文发送来上传文件。您需要发送包含 extensions 而不是 url 中的 ：filename 的文件名（例如 brandkit.zip）。您可以通过发送以下参数来设置选项。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 名字 | （可选）文件名 |
| 习惯 | （可选）自定义别名而不是随机别名。 |
| 域 | （可选）自定义域 |
| 密码 | （可选）密码保护 |
| 满期 | （可选）下载示例的过期时间 2021-09-28 |
| 最大下载 | （可选）最大下载次数 |

cURL
PHP
Node.js
Python
C#

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

```
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://urlkai.com/api/files/upload/:filename?name=My+File",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '"BINARY DATA"',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

```
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://urlkai.com/api/files/upload/:filename?name=My+File',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify("BINARY DATA"),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
```

```
import requests
url = "https://urlkai.com/api/files/upload/:filename?name=My+File"
payload = "BINARY DATA"
headers = {
    'Authorization': 'Bearer YOURAPIKEY',
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.text)
```

```
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/files/upload/:filename?name=My+File");
request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
var content = new StringContent(""BINARY DATA"", System.Text.Encoding.UTF8, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

###### Resposta do servidor

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

---

#### 链接 - Open in ChatGPT - Open in Claude

###### 列出链接

获取  `https://urlkai.com/api/urls?limit=2&page=1o=date`

要通过 API 获取链接，您可以使用此终端节点。您还可以筛选数据（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |
| 次序 | （可选）在日期之间对数据进行排序，或单击 |
| 短 | （可选）使用短 URL 进行搜索。请注意，当您使用 short 参数时，所有其他参数都将被忽略，如果存在匹配项，将返回 Single Link 响应。 |
| q | （可选）使用关键字搜索链接 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/urls?limit=2&page=1o=date' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/urls?limit=2&page=1o=date”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/urls?limit=2&page=1o=date'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/urls?limit=2&page=1o=date”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/urls?limit=2&page=1o=date”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “error”： “0”， /错误“： ”0“，
    “数据”： {
        “result”： 2，
        “perpage”： 2，
        “currentpage”： 1，
        “nextpage”： 1，
        “maxpage”： 1，
        “urls”： [
            {
                “id”：2、
                “别名”： “google”，
                “shorturl”： “https：\/\/urlkai.com\/google”， //google“， /google”，
                “longurl”： “https：\/\/google.com”， //
                “clicks”： 0， 点击
                “title”： “Google”， //标题
                “description”： “”， //
                “date”： “2020-11-10 18：01：43”
            },
            {
                “id”： 1，
                “别名”： “googlecanada”， //别名
                “shorturl”： “https：\/\/urlkai.com\/googlecanada”， //googlecanada
                “longurl”： “https：\/\/google.ca”， //
                “clicks”： 0， 点击
                “title”： “Google 加拿大”，
                “description”： “”， //
                “date”： “2020-11-10 18：00：25”
            }
        ]
    }
}
```

###### 获取单个链接

获取  `https://urlkai.com/api/url/:id`

要通过 API 获取单个链接的详细信息，您可以使用此终端节点。

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/url/:id' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/url/:id”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/url/:id'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/url/:id”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/url/:id”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “id”： 1，
    “详细信息”： {
        “id”： 1，
        “shorturl”： “https：\/\/urlkai.com\/googlecanada”， //googlecanada
        “longurl”： “https：\/\/google.com”， //
        “title”： “Google”， //标题
        “description”： “”， //
        “位置”： {
            “canada”： “https：\/\/google.ca”， //加拿大
            “美国”： “https：\/\/google.us”
        },
        “设备”： {
            “iPhone”： “https：\/\/google.com”，
            “android”： “https：\/\/google.com”
        },
        “expiry”： null，
        “date”： “2020-11-10 18：01：43”
    },
    “数据”： {
        “clicks”： 0， 点击
        “uniqueClicks”： 0， uniqueClicks“： 0，
        “topCountries”： 0，
        “topReferrers”：0、
        “topBrowsers”：0、
        “topOs”： 0， 返回
        “socialCount”： {
            “facebook”：0、
            “twitter”：0、
            “google”：0
        }
    }
}
```

###### 缩短链接

发布  `https://urlkai.com/api/url/add`

要缩短链接，您需要通过 POST 请求以 JSON 格式发送有效数据。数据必须作为请求的原始正文发送，如下所示。下面的示例显示了您可以发送的所有参数，但您不需要发送所有参数（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 网址 | （必填）要缩短的长 URL。 |
| 习惯 | （可选）自定义别名而不是随机别名。 |
| 类型 | （可选）重定向类型 [direct， frame， splash]，仅限 *身份证* 对于自定义初始页或 *叠加层 ID* 对于 CTA 页面 |
| 密码 | （可选）密码保护 |
| 域 | （可选）自定义域 |
| 满期 | （可选）链接示例的过期时间 2021-09-28 23：11：16 |
| 地理定位 | （可选）地理位置定位数据 |
| device目标 | （可选）设备定位数据 |
| language目标 | （可选）语言定位数据 |
| 元标题 | （可选）元标题 |
| 元描述 | （可选）元描述 |
| 元图像 | （可选）链接到 jpg 或 png 图像 |
| 描述 | （可选）注释或描述 |
| 像素 | （可选）像素 ID 数组 |
| 渠道 | （可选）频道 ID |
| 运动 | （可选）推广活动 ID |
| 深度链接 | （可选）包含应用商店链接的对象。使用时，设置设备目标定位也很重要。（新）你现在可以将参数“auto”设置为true，自动生成从提供的长链接中生成深度链接。 |
| 地位 | （可选） *公共* 或 *private （默认）* |

cURL
PHP
Node.js
Python
C#

```
curl --location --request POST 'https://urlkai.com/api/url/add' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “url”： “https：\/\/google.com”， ///
    “status”： “私有”，
    “custom”： “google”， /
    “password”： “mypass”， /密码
    “expiry”： “2020-11-11 12：00：00”， /
    “type”： “splash”， /
    “metatitle”： “不是 Google”，
    “metadescription”： “非 Google 描述”，
    “metaimage”： “https：\/\/www.mozilla.org\/media\/protocol\/img\/logos\/firefox\/browser\/og.4ad05d4125a5.png”， //
    “description”： “对于 facebook”，
    “像素”： [
        1,
        2,
        3,
        4
    ],
    “channel”： 1，
    “campaign”：1、
    “深度链接”： {
        “auto”： true 和
        “apple”： “https：\/\/apps.apple.com\/us\/app\/google\/id284815942”， //id284815942
        “google”： “https：\/\/play.google.com\/store\/apps\/details？id=com.google.android.googlequicksearchbox&hl=en_CA≷=US”
    },
    “地理目标”：[
        {
            “location”： “加拿大”，
            “link”： “https：\/\/google.ca”
        },
        {
            “location”： “美国”，
            “link”： “https：\/\/google.us”
        }
    ],
    “设备目标”： [
        {
            “device”： “iPhone”， //设备
            “link”： “https：\/\/google.com”
        },
        {
            “device”： “Android”， //设备
            “link”： “https：\/\/google.com”
        }
    ],
    “语言目标”： [
        {
            “language”： “en”， /中文
            “link”： “https：\/\/google.com”
        },
        {
            “language”： “fr”， //语言
            “link”： “https：\/\/google.ca”
        }
    ],
    “参数”： [
        {
            “名称”： “aff”，
            “value”： “3”
        },
        {
            “device”： “gtm_source”，
            “link”： “api”
        }
    ]
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/url/add”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “POST”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “url”： “https：\/\/google.com”， ///
	    “status”： “私有”，
	    “custom”： “google”， /
	    “password”： “mypass”， /密码
	    “expiry”： “2020-11-11 12：00：00”， /
	    “type”： “splash”， /
	    “metatitle”： “不是 Google”，
	    “metadescription”： “非 Google 描述”，
	    “metaimage”： “https：\/\/www.mozilla.org\/media\/protocol\/img\/logos\/firefox\/browser\/og.4ad05d4125a5.png”， //
	    “description”： “对于 facebook”，
	    “像素”： [
	        1,
	        2,
	        3,
	        4
	    ],
	    “channel”： 1，
	    “campaign”：1、
	    “深度链接”： {
	        “auto”： true 和
	        “apple”： “https：\/\/apps.apple.com\/us\/app\/google\/id284815942”， //id284815942
	        “google”： “https：\/\/play.google.com\/store\/apps\/details？id=com.google.android.googlequicksearchbox&hl=en_CA≷=US”
	    },
	    “地理目标”：[
	        {
	            “location”： “加拿大”，
	            “link”： “https：\/\/google.ca”
	        },
	        {
	            “location”： “美国”，
	            “link”： “https：\/\/google.us”
	        }
	    ],
	    “设备目标”： [
	        {
	            “device”： “iPhone”， //设备
	            “link”： “https：\/\/google.com”
	        },
	        {
	            “device”： “Android”， //设备
	            “link”： “https：\/\/google.com”
	        }
	    ],
	    “语言目标”： [
	        {
	            “language”： “en”， /中文
	            “link”： “https：\/\/google.com”
	        },
	        {
	            “language”： “fr”， //语言
	            “link”： “https：\/\/google.ca”
	        }
	    ],
	    “参数”： [
	        {
	            “名称”： “aff”，
	            “value”： “3”
	        },
	        {
	            “device”： “gtm_source”，
	            “link”： “api”
	        }
	    ]
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '发布'，
    'url'： 'https://urlkai.com/api/url/add'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “url”： “https：\/\/google.com”， ///
    “status”： “私有”，
    “custom”： “google”， /
    “password”： “mypass”， /密码
    “expiry”： “2020-11-11 12：00：00”， /
    “type”： “splash”， /
    “metatitle”： “不是 Google”，
    “metadescription”： “非 Google 描述”，
    “metaimage”： “https：\/\/www.mozilla.org\/media\/protocol\/img\/logos\/firefox\/browser\/og.4ad05d4125a5.png”， //
    “description”： “对于 facebook”，
    “像素”： [
        1,
        2,
        3,
        4
    ],
    “channel”： 1，
    “campaign”：1、
    “深度链接”： {
        “auto”： true 和
        “apple”： “https：\/\/apps.apple.com\/us\/app\/google\/id284815942”， //id284815942
        “google”： “https：\/\/play.google.com\/store\/apps\/details？id=com.google.android.googlequicksearchbox&hl=en_CA≷=US”
    },
    “地理目标”：[
        {
            “location”： “加拿大”，
            “link”： “https：\/\/google.ca”
        },
        {
            “location”： “美国”，
            “link”： “https：\/\/google.us”
        }
    ],
    “设备目标”： [
        {
            “device”： “iPhone”， //设备
            “link”： “https：\/\/google.com”
        },
        {
            “device”： “Android”， //设备
            “link”： “https：\/\/google.com”
        }
    ],
    “语言目标”： [
        {
            “language”： “en”， /中文
            “link”： “https：\/\/google.com”
        },
        {
            “language”： “fr”， //语言
            “link”： “https：\/\/google.ca”
        }
    ],
    “参数”： [
        {
            “名称”： “aff”，
            “value”： “3”
        },
        {
            “device”： “gtm_source”，
            “link”： “api”
        }
    ]
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/url/add”
有效载荷 = {
    “url”： “https://google.com”，
    “status”： “私有”，
    “custom”： “google”， /
    “password”： “mypass”， /密码
    “expiry”： “2020-11-11 12：00：00”， /
    “type”： “splash”， /
    “metatitle”： “不是 Google”，
    “metadescription”： “非 Google 描述”，
    “metaimage”： “https://www.mozilla.org/media/protocol/img/logos/firefox/browser/og.4ad05d4125a5.png”， //元图像
    “description”： “对于 facebook”，
    “像素”： [
        1,
        2,
        3,
        4
    ],
    “channel”： 1，
    “campaign”：1、
    “深度链接”： {
        “auto”： true 和
        “apple”： “https://apps.apple.com/us/app/google/id284815942”，
        “google”： “https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=美国”
    },
    “地理目标”：[
        {
            “location”： “加拿大”，
            “link”： “https://google.ca”
        },
        {
            “location”： “美国”，
            “link”： “https://google.us”
        }
    ],
    “设备目标”： [
        {
            “device”： “iPhone”， //设备
            “link”： “https://google.com”
        },
        {
            “device”： “Android”， //设备
            “link”： “https://google.com”
        }
    ],
    “语言目标”： [
        {
            “language”： “en”， /中文
            “link”： “https://google.com”
        },
        {
            “language”： “fr”， //语言
            “link”： “https://google.ca”
        }
    ],
    “参数”： [
        {
            “名称”： “aff”，
            “value”： “3”
        },
        {
            “device”： “gtm_source”，
            “link”： “api”
        }
    ]
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“POST”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Post， “https://urlkai.com/api/url/add”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “url”： “https：\/\/google.com”， ///
    “status”： “私有”，
    “custom”： “google”， /
    “password”： “mypass”， /密码
    “expiry”： “2020-11-11 12：00：00”， /
    “type”： “splash”， /
    “metatitle”： “不是 Google”，
    “metadescription”： “非 Google 描述”，
    “metaimage”： “https：\/\/www.mozilla.org\/media\/protocol\/img\/logos\/firefox\/browser\/og.4ad05d4125a5.png”， //
    “description”： “对于 facebook”，
    “像素”： [
        1,
        2,
        3,
        4
    ],
    “channel”： 1，
    “campaign”：1、
    “深度链接”： {
        “auto”： true 和
        “apple”： “https：\/\/apps.apple.com\/us\/app\/google\/id284815942”， //id284815942
        “google”： “https：\/\/play.google.com\/store\/apps\/details？id=com.google.android.googlequicksearchbox&hl=en_CA≷=US”
    },
    “地理目标”：[
        {
            “location”： “加拿大”，
            “link”： “https：\/\/google.ca”
        },
        {
            “location”： “美国”，
            “link”： “https：\/\/google.us”
        }
    ],
    “设备目标”： [
        {
            “device”： “iPhone”， //设备
            “link”： “https：\/\/google.com”
        },
        {
            “device”： “Android”， //设备
            “link”： “https：\/\/google.com”
        }
    ],
    “语言目标”： [
        {
            “language”： “en”， /中文
            “link”： “https：\/\/google.com”
        },
        {
            “language”： “fr”， //语言
            “link”： “https：\/\/google.ca”
        }
    ],
    “参数”： [
        {
            “名称”： “aff”，
            “value”： “3”
        },
        {
            “device”： “gtm_source”，
            “link”： “api”
        }
    ]
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “id”： 3，
    “shorturl”： “https：\/\/urlkai.com\/google”
}
```

###### Atualizar link

放  `https://urlkai.com/api/url/:id/update`

要更新链接，您需要通过 PUT 请求以 JSON 格式发送有效数据。数据必须作为请求的原始正文发送，如下所示。下面的示例显示了您可以发送的所有参数，但您不需要发送所有参数（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 网址 | （必填）要缩短的长 URL。 |
| 习惯 | （可选）自定义别名而不是随机别名。 |
| 类型 | （可选）重定向类型 [direct， frame， splash] |
| 密码 | （可选）密码保护 |
| 域 | （可选）自定义域 |
| 满期 | （可选）链接示例的过期时间 2021-09-28 23：11：16 |
| 地理定位 | （可选）地理位置定位数据 |
| device目标 | （可选）设备定位数据 |
| language目标 | （可选）语言定位数据 |
| 元标题 | （可选）元标题 |
| 元描述 | （可选）元描述 |
| 元图像 | （可选）链接到 jpg 或 png 图像 |
| 像素 | （可选）像素 ID 数组 |
| 渠道 | （可选）频道 ID |
| 运动 | （可选）推广活动 ID |
| 深度链接 | （可选）包含应用商店链接的对象。使用此功能时，设置设备定位也很重要。 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request PUT 'https://urlkai.com/api/url/:id/update' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “url”： “https：\/\/google.com”， ///
    “custom”： “google”， /
    “password”： “mypass”， /密码
    “expiry”： “2020-11-11 12：00：00”， /
    “type”： “splash”， /
    “像素”： [
        1,
        2,
        3,
        4
    ],
    “channel”： 1，
    “深度链接”： {
        “apple”： “https：\/\/apps.apple.com\/us\/app\/google\/id284815942”， //id284815942
        “google”： “https：\/\/play.google.com\/store\/apps\/details？id=com.google.android.googlequicksearchbox&hl=en_CA≷=US”
    },
    “地理目标”：[
        {
            “location”： “加拿大”，
            “link”： “https：\/\/google.ca”
        },
        {
            “location”： “美国”，
            “link”： “https：\/\/google.us”
        }
    ],
    “设备目标”： [
        {
            “device”： “iPhone”， //设备
            “link”： “https：\/\/google.com”
        },
        {
            “device”： “Android”， //设备
            “link”： “https：\/\/google.com”
        }
    ],
    “参数”： [
        {
            “名称”： “aff”，
            “value”： “3”
        },
        {
            “device”： “gtm_source”，
            “link”： “api”
        }
    ]
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/url/:id/update”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “PUT”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “url”： “https：\/\/google.com”， ///
	    “custom”： “google”， /
	    “password”： “mypass”， /密码
	    “expiry”： “2020-11-11 12：00：00”， /
	    “type”： “splash”， /
	    “像素”： [
	        1,
	        2,
	        3,
	        4
	    ],
	    “channel”： 1，
	    “深度链接”： {
	        “apple”： “https：\/\/apps.apple.com\/us\/app\/google\/id284815942”， //id284815942
	        “google”： “https：\/\/play.google.com\/store\/apps\/details？id=com.google.android.googlequicksearchbox&hl=en_CA≷=US”
	    },
	    “地理目标”：[
	        {
	            “location”： “加拿大”，
	            “link”： “https：\/\/google.ca”
	        },
	        {
	            “location”： “美国”，
	            “link”： “https：\/\/google.us”
	        }
	    ],
	    “设备目标”： [
	        {
	            “device”： “iPhone”， //设备
	            “link”： “https：\/\/google.com”
	        },
	        {
	            “device”： “Android”， //设备
	            “link”： “https：\/\/google.com”
	        }
	    ],
	    “参数”： [
	        {
	            “名称”： “aff”，
	            “value”： “3”
	        },
	        {
	            “device”： “gtm_source”，
	            “link”： “api”
	        }
	    ]
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '放'，
    'url'： 'https://urlkai.com/api/url/:id/update'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “url”： “https：\/\/google.com”， ///
    “custom”： “google”， /
    “password”： “mypass”， /密码
    “expiry”： “2020-11-11 12：00：00”， /
    “type”： “splash”， /
    “像素”： [
        1,
        2,
        3,
        4
    ],
    “channel”： 1，
    “深度链接”： {
        “apple”： “https：\/\/apps.apple.com\/us\/app\/google\/id284815942”， //id284815942
        “google”： “https：\/\/play.google.com\/store\/apps\/details？id=com.google.android.googlequicksearchbox&hl=en_CA≷=US”
    },
    “地理目标”：[
        {
            “location”： “加拿大”，
            “link”： “https：\/\/google.ca”
        },
        {
            “location”： “美国”，
            “link”： “https：\/\/google.us”
        }
    ],
    “设备目标”： [
        {
            “device”： “iPhone”， //设备
            “link”： “https：\/\/google.com”
        },
        {
            “device”： “Android”， //设备
            “link”： “https：\/\/google.com”
        }
    ],
    “参数”： [
        {
            “名称”： “aff”，
            “value”： “3”
        },
        {
            “device”： “gtm_source”，
            “link”： “api”
        }
    ]
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/url/:id/update”
有效载荷 = {
    “url”： “https://google.com”，
    “custom”： “google”， /
    “password”： “mypass”， /密码
    “expiry”： “2020-11-11 12：00：00”， /
    “type”： “splash”， /
    “像素”： [
        1,
        2,
        3,
        4
    ],
    “channel”： 1，
    “深度链接”： {
        “apple”： “https://apps.apple.com/us/app/google/id284815942”，
        “google”： “https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=美国”
    },
    “地理目标”：[
        {
            “location”： “加拿大”，
            “link”： “https://google.ca”
        },
        {
            “location”： “美国”，
            “link”： “https://google.us”
        }
    ],
    “设备目标”： [
        {
            “device”： “iPhone”， //设备
            “link”： “https://google.com”
        },
        {
            “device”： “Android”， //设备
            “link”： “https://google.com”
        }
    ],
    “参数”： [
        {
            “名称”： “aff”，
            “value”： “3”
        },
        {
            “device”： “gtm_source”，
            “link”： “api”
        }
    ]
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
response = requests.request（“PUT”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var 请求 = new HttpRequestMessage（HttpMethod.Put， “https://urlkai.com/api/url/:id/update”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “url”： “https：\/\/google.com”， ///
    “custom”： “google”， /
    “password”： “mypass”， /密码
    “expiry”： “2020-11-11 12：00：00”， /
    “type”： “splash”， /
    “像素”： [
        1,
        2,
        3,
        4
    ],
    “channel”： 1，
    “深度链接”： {
        “apple”： “https：\/\/apps.apple.com\/us\/app\/google\/id284815942”， //id284815942
        “google”： “https：\/\/play.google.com\/store\/apps\/details？id=com.google.android.googlequicksearchbox&hl=en_CA≷=US”
    },
    “地理目标”：[
        {
            “location”： “加拿大”，
            “link”： “https：\/\/google.ca”
        },
        {
            “location”： “美国”，
            “link”： “https：\/\/google.us”
        }
    ],
    “设备目标”： [
        {
            “device”： “iPhone”， //设备
            “link”： “https：\/\/google.com”
        },
        {
            “device”： “Android”， //设备
            “link”： “https：\/\/google.com”
        }
    ],
    “参数”： [
        {
            “名称”： “aff”，
            “value”： “3”
        },
        {
            “device”： “gtm_source”，
            “link”： “api”
        }
    ]
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “id”： 3，
    “short”： “https：\/\/urlkai.com\/google”
}
```

###### 删除链接

删除  `https://urlkai.com/api/url/:id/delete`

要删除链接，您需要发送 DELETE 请求。

cURL
PHP
Node.js
Python
C#

```
curl --location --request 删除 'https://urlkai.com/api/url/:id/delete' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/url/:id/delete”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “删除”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '删除'，
    'url'： 'https://urlkai.com/api/url/:id/delete'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/url/:id/delete”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“DELETE”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Delete， “https://urlkai.com/api/url/:id/delete”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “已成功删除链接”
}
```

---

#### 皮克塞斯 - Open in ChatGPT - Open in Claude

###### 列出像素

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

要通过 API 获取像素代码，您可以使用此端点。您还可以筛选数据（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/pixels?limit=2&page=1' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/pixels?limit=2&page=1”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/pixels?limit=2&page=1'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/pixels?limit=2&page=1”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/pixels?limit=2&page=1”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “error”： “0”， /错误“： ”0“，
    “数据”： {
        “result”： 2，
        “perpage”： 2，
        “currentpage”： 1，
        “nextpage”： 1，
        “maxpage”： 1，
        “像素”： [
            {
                “id”： 1，
                “type”： “gtmpixel”， /
                “name”： “GTM 像素”，
                “标签”： “GA-123456789”， /标签“： ”GA-123456789“，
                “date”： “2020-11-10 18：00：00”
            },
            {
                “id”：2、
                “type”： “twitterpixel”， /
                “name”： “Twitter 像素”，
                “tag”： “1234567”， //标签
                “date”： “2020-11-10 18：10：00”
            }
        ]
    }
}
```

###### 创建 Pixel 像素代码

发布  `https://urlkai.com/api/pixel/add`

可以使用此端点创建像素。您需要发送像素类型和标签。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 类型 | （必需） GTMepL |Gapixel 像素 |FB像素 |AdWords 像素 |领英像素 |推特像素 |广告像素 |QuoraPixel 像素代码 |Pinterest 公司 |必应 |Snapchat 的 |Reddit |抖音 |
| 名字 | （必填）像素的自定义名称 |
| 标记 | （必填）像素的标签 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request POST 'https://urlkai.com/api/pixel/add' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “type”： “gtmpixel”， /
    “name”： “我的 GTM”，
    “tag”： “GTM-ABCDE”
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/pixel/add”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “POST”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “type”： “gtmpixel”， /
	    “name”： “我的 GTM”，
	    “tag”： “GTM-ABCDE”
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '发布'，
    'url'： 'https://urlkai.com/api/pixel/add' ，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “type”： “gtmpixel”， /
    “name”： “我的 GTM”，
    “tag”： “GTM-ABCDE”
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/pixel/add”
有效载荷 = {
    “type”： “gtmpixel”， /
    “name”： “我的 GTM”，
    “tag”： “GTM-ABCDE”
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“POST”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Post， “https://urlkai.com/api/pixel/add”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “type”： “gtmpixel”， /
    “name”： “我的 GTM”，
    “tag”： “GTM-ABCDE”
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “id”：1
}
```

###### Atualizar 像素

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

要更新 Pixel 像素代码，您需要通过 PUT 请求以 JSON 格式发送有效数据。数据必须作为请求的原始正文发送，如下所示。下面的示例显示了您可以发送的所有参数，但您不需要发送所有参数（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 名字 | （可选）像素的自定义名称 |
| 标记 | （必填）像素的标签 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request PUT 'https://urlkai.com/api/pixel/:id/update' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
--data-raw '{
    “name”： “我的 GTM”，
    “tag”： “GTM-ABCDE”
}'
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/pixel/:id/update”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “PUT”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    CURLOPT_POSTFIELDS =>
        '{
	    “name”： “我的 GTM”，
	    “tag”： “GTM-ABCDE”
	}',
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '放'，
    'url'： 'https://urlkai.com/api/pixel/:id/update'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    正文：JSON.stringify（{
    “name”： “我的 GTM”，
    “tag”： “GTM-ABCDE”
}),
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/pixel/:id/update”
有效载荷 = {
    “name”： “我的 GTM”，
    “tag”： “GTM-ABCDE”
}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
response = requests.request（“PUT”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Put， “https://urlkai.com/api/pixel/:id/update”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{
    “name”： “我的 GTM”，
    “tag”： “GTM-ABCDE”
}“， System.Text.Encoding.UTF8， ”应用程序/json“）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “Pixel 已成功更新。”
}
```

###### 删除像素

删除  `https://urlkai.com/api/pixel/:id/delete`

要删除像素，您需要发送 DELETE 请求。

cURL
PHP
Node.js
Python
C#

```
curl --location --request 删除 'https://urlkai.com/api/pixel/:id/delete' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/pixel/:id/delete”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “删除”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： '删除'，
    'url'： 'https://urlkai.com/api/pixel/:id/delete'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/pixel/:id/delete”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“DELETE”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Delete， “https://urlkai.com/api/pixel/:id/delete”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “错误”： 0，
    “message”： “已成功删除 Pixel。”
}
```

---

#### Sobreposições de CTA - Open in ChatGPT - Open in Claude

###### 列出 CTA 叠加

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

要通过 API 获取 CTA 叠加，您可以使用此端点。您还可以筛选数据（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/overlay?limit=2&page=1' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/overlay?limit=2&page=1”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/overlay?limit=2&page=1' ，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/overlay?limit=2&page=1”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/overlay?limit=2&page=1”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “error”： “0”， /错误“： ”0“，
    “数据”： {
        “result”： 2，
        “perpage”： 2，
        “currentpage”： 1，
        “nextpage”： 1，
        “maxpage”： 1，
        “CTA”：[
            {
                “id”： 1，
                “type”： “消息”，
                “name”： “产品 1 促销”，
                “date”： “2020-11-10 18：00：00”
            },
            {
                “id”：2、
                “type”： “联系人”，
                “name”： “联系页面”，
                “date”： “2020-11-10 18：10：00”
            }
        ]
    }
}
```

---

#### Splash personalizado - Open in ChatGPT - Open in Claude

###### 列出自定义启动画面

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

要通过 API 获取自定义启动页面，您可以使用此端点。您还可以筛选数据（有关更多信息，请参阅表格）。

| **帕拉梅特** | **Descrição** |
| --- | --- |
| 限制 | （可选）每页数据结果 |
| 页 | （可选）当前页面请求 |

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/splash?limit=2&page=1' \
--header '授权：持有者 YOURAPIKEY' \
--header '内容类型： application/json' \
```

```
$curl = curl_init（）;

curl_setopt_array（$curl， 数组（
    CURLOPT_URL => “https://urlkai.com/api/splash?limit=2&page=1”，
    CURLOPT_RETURNTRANSFER => true，
    CURLOPT_MAXREDIRS => 2，
    CURLOPT_TIMEOUT => 10，
    CURLOPT_FOLLOWLOCATION => true，
    CURLOPT_CUSTOMREQUEST => “GET”，
    CURLOPT_HTTPHEADER => [
        “授权：Bearer YOURAPIKEY”，
        “内容类型：application/json”，
    ],
    
));

$response = curl_exec（$curl）;

curl_close（$curl）;
回声$response;
```

```
var 请求 = require（'request'）;
var 选项 = {
    'method'： 'GET'， //方法
    'url'： 'https://urlkai.com/api/splash?limit=2&page=1'，
    '标头'： {
        '授权'： 'Bearer YOURAPIKEY'，
        '内容类型'： 'application/json'
    },
    
};
request（options， function （error， response） {
    if （error） throw new Error（error）;
    console.log（response.body）;
});
```

```
导入请求
url = “https://urlkai.com/api/splash?limit=2&page=1”
有效载荷 = {}
标头 = {
    '授权'： 'Bearer YOURAPIKEY'，
    '内容类型'： 'application/json'
}
响应 = requests.request（“GET”， url， headers=headers， json=payload）
print（response.text） 的
```

```
var client = new HttpClient（）;
var request = new HttpRequestMessage（HttpMethod.Get， “https://urlkai.com/api/splash?limit=2&page=1”）;
请求。Headers.Add（“授权”， “持有者 YOURAPIKEY”）;
var content = new StringContent（“{}”， System.Text.Encoding.UTF8， “application/json”）;
请求。内容 = 内容;
var 响应 = await 客户端。SendAsync（请求）;
响应。EnsureSuccessStatusCode（）;
Console.WriteLine（await 响应。Content.ReadAsStringAsync（））;
```

###### Resposta do servidor

```
{
    “error”： “0”， /错误“： ”0“，
    “数据”： {
        “result”： 2，
        “perpage”： 2，
        “currentpage”： 1，
        “nextpage”： 1，
        “maxpage”： 1，
        “splash”： [
            {
                “id”： 1，
                “name”： “产品 1 促销”，
                “date”： “2020-11-10 18：00：00”
            },
            {
                “id”：2、
                “name”： “产品 2 促销”，
                “date”： “2020-11-10 18：10：00”
            }
        ]
    }
}
```