# Developers
**Source:** https://vi.urlkai.com/pt/developers
**Language:** Vietnamese

---

Começando 

Autenticação 

Giới hạn đơn vị phân loại 

Tratamento de respostas 

###### Tài khoản

Nhận tài khoản 

Cập nhật tài khoản

###### Campanhas

Liệt kê chiến dịch 

Crie uma campanha 

Chỉ định liên kết đến chiến dịch 

Atualizar campanha 

Xóa chiến dịch

###### Canais

Liệt kê kênh 

Liệt kê các mục kênh 

Kênh Criar um 

Gán một mục cho một kênh 

Kênh Atualizar 

Xóa kênh

###### Códigos QR

Liệt kê mã QR 

Nhận một mã QR duy nhất 

Tạo mã QR 

Cập nhật mã QR 

Xóa mã QR

###### Domínios de marca

Liệt kê tên miền có thương hiệu 

Tạo tên miền có thương hiệu 

Atualizar domínio 

Xóa tên miền

###### Tập tin

Danh sách tệp 

Tải tệp lên

###### Liên kết

Liên kết danh sách 

Nhận một liên kết duy nhất 

Rút ngắn liên kết 

Liên kết Atualizar 

Xóa liên kết

###### Píxeis

Danh sách pixel 

Tạo Pixel 

Atualizar pixel 

Xóa Pixel

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

Liệt kê lớp phủ CTA

###### Cá nhân hóa giật gân

Danh sách Splash tùy chỉnh

#### 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 --vị trí --yêu cầu POST 'https://urlkai.com/api/account' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();
curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/account",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐĂNG",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
));

$response = curl_exec ($curl);
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'ĐĂNG',
    'url': 'https://urlkai.com/api/account',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    cơ thể: ''
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/account"
tải trọng = {}
tiêu đề = {
  'Ủy quyền': 'Người mang YOURAPIKEY',
  'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/account");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Giới hạn đơn vị phân loại

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. Xin lưu ý rằng tỷ giá có thể thay đổi tùy theo gói đã đăng ký.

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

---

#### Tài khoản - Open in ChatGPT - Open in Claude

###### Nhận tài khoản

ĐƯỢC  `https://urlkai.com/api/account`

Để lấy thông tin về tài khoản, bạn có thể gửi yêu cầu đến điểm cuối này và nó sẽ trả về dữ liệu trên tài khoản.

cURL
PHP
Node.js
Python
C#

```
curl --location --request GET 'https://urlkai.com/api/account' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/account",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/account',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/account"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/account");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "dữ liệu": {
        "id": 1,
        "email": " [email được bảo vệ] ",
        "tên người dùng": "người dùng mẫu",
        "hình đại diện": "https:\/\/domain.com\/content\/avatar.png",
        "status": "chuyên nghiệp",
        "hết hạn": "2022-11-15 15:00:00",
        "đã đăng ký": "2020-11-10 18:01:43"
    }
}
```

###### Cập nhật tài khoản

ĐỂ  `https://urlkai.com/api/account/update`

Để cập nhật thông tin về tài khoản, bạn có thể gửi yêu cầu đến điểm cuối này và nó sẽ cập nhật dữ liệu trên tài khoản.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu PUT 'https://urlkai.com/api/account/update' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "email": " [email được bảo vệ] ",
    "password": "mật khẩu mới"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL = > "https://urlkai.com/api/account/update",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐẶT",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "email": " [email được bảo vệ] ",
	    "password": "mật khẩu mới"
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'PUT',
    'url': 'https://urlkai.com/api/account/update',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "email": " [email được bảo vệ] ",
    "password": "mật khẩu mới"
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/account/update"
tải trọng = {
    "email": " [email được bảo vệ] ",
    "password": "mật khẩu mới"
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/account/update");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "email": " [email được bảo vệ] ",
    "password": "mật khẩu mới"
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Tài khoản đã được cập nhật thành công."
}
```

---

#### Campanhas - Open in ChatGPT - Open in Claude

###### Liệt kê chiến dịch

ĐƯỢC  `https://urlkai.com/api/campaigns?limit=2&page=1`

Để tải chiến dịch của bạn qua API, bạn có thể sử dụng điểm cuối này. Bạn cũng có thể lọc dữ liệu (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/campaigns?limit=2&page=1' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/campaigns?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/campaigns?limit=2&page=1',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/campaigns?limit=2&page=1"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/campaigns?limit=2&page=1");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": "0",
    "dữ liệu": {
        "kết quả": 2,
        "perpage": 2,
        "trang hiện tại": 1,
        "trang tiếp theo": 1,
        "maxpage": 1,
        "chiến dịch": [
            {
                "id": 1,
                "name": "Chiến dịch mẫu",
                "public": sai,
                "rotator": sai,
                "danh sách": "https:\/\/domain.com\/u\/admin\/list-1"
            },
            {
                "id": 2,
                "domain": "Chiến dịch Facebook",
                "public": đúng,
                "rotator": "https:\/\/domain.com\/r\/test",
                "danh sách": "https:\/\/domain.com\/u\/admin\/test-2"
            }
        ]
    }
}
```

###### Crie uma campanha

TRỤ  `https://urlkai.com/api/campaign/add`

Bạn có thể thêm chiến dịch bằng điểm cuối này.

| **Parâmetro** | **Descrição** |
| --- | --- |
| Tên | (tùy chọn) Tên chiến dịch |
| sên | (tùy chọn) Sên xoay |
| công cộng | (tùy chọn) Truy cập |

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

```
{
    "lỗi": 0,
    "id": 3,
    "domain": "Chiến dịch mới",
    "công khai": đúng,
    "rotator": "https:\/\/domain.com\/r\/new-campaign",
    "danh sách": "https:\/\/domain.com\/u\/admin\/new-campaign-3"
}
```

###### Chỉ định liên kết đến chiến dịch

TRỤ  `https://urlkai.com/api/campaign/:campaignid/assign/:linkid`

Một liên kết ngắn có thể được gán cho một chiến dịch bằng cách sử dụng điểm cuối này. Điểm cuối yêu cầu ID chiến dịch và ID liên kết ngắn.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu POST 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/campaign/:campaignid/assign/:linkid",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐĂNG",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'ĐĂNG',
    'url': 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/campaign/:campaignid/assign/:linkid"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/campaign/:campaignid/assign/:linkid");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Liên kết đã được thêm thành công vào chiến dịch."
}
```

###### Atualizar campanha

ĐỂ  `https://urlkai.com/api/campaign/:id/update`

Để cập nhật chiến dịch, bạn cần gửi dữ liệu hợp lệ ở dạng JSON thông qua yêu cầu PUT. Dữ liệu phải được gửi dưới dạng nội dung thô của yêu cầu của bạn như hình dưới đây. Ví dụ dưới đây cho thấy tất cả các thông số bạn có thể gửi nhưng bạn không bắt buộc phải gửi tất cả (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| Tên | (bắt buộc) Tên chiến dịch |
| sên | (tùy chọn) Sên xoay |
| công cộng | (tùy chọn) Truy cập |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu PUT 'https://urlkai.com/api/campaign/:id/update' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "name": "Chiến dịch Twitter",
    "slug": "chiến dịch twitter",
    "public": đúng
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/campaign/:id/update",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐẶT",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "name": "Chiến dịch Twitter",
	    "slug": "chiến dịch twitter",
	    "public": đúng
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'PUT',
    'url': 'https://urlkai.com/api/campaign/:id/update',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "name": "Chiến dịch Twitter",
    "slug": "chiến dịch twitter",
    "public": đúng
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/campaign/:id/update"
tải trọng = {
    "name": "Chiến dịch Twitter",
    "slug": "chiến dịch twitter",
    "public": đúng
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/campaign/:id/update");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "name": "Chiến dịch Twitter",
    "slug": "chiến dịch twitter",
    "public": đúng
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "id": 3,
    "domain": "Chiến dịch Twitter",
    "public": đúng,
    "rotator": "https:\/\/domain.com\/r\/twitter-campaign",
    "danh sách": "https:\/\/domain.com\/u\/admin\/twitter-campaign-3"
}
```

###### Xóa chiến dịch

XÓA  `https://urlkai.com/api/campaign/:id/delete`

Để xóa chiến dịch, bạn cần gửi yêu cầu XÓA.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu XÓA 'https://urlkai.com/api/campaign/:id/delete' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/campaign/:id/delete",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "XÓA",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'XÓA',
    'url': 'https://urlkai.com/api/campaign/:id/delete',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/campaign/:id/delete"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/campaign/:id/delete");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Chiến dịch đã bị xóa thành công."
}
```

---

#### Canais - Open in ChatGPT - Open in Claude

###### Liệt kê kênh

ĐƯỢC  `https://urlkai.com/api/channels?limit=2&page=1`

Để tải kênh của bạn qua API, bạn có thể sử dụng điểm cuối này. Bạn cũng có thể lọc dữ liệu (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/channels?limit=2&page=1' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL = > "https://urlkai.com/api/channels?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/channels?limit=2&page=1',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/channels?limit=2&page=1"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var request = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/channels?limit=2&page=1");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": "0",
    "dữ liệu": {
        "kết quả": 2,
        "perpage": 2,
        "trang hiện tại": 1,
        "trang tiếp theo": 1,
        "maxpage": 1,
        "kênh": [
            {
                "id": 1,
                "tên": "Kênh 1",
                "description": "Mô tả kênh 1",
                "màu": "#000000",
                "Gắn sao": đúng
            },
            {
                "id": 2,
                "tên": "Kênh 2",
                "description": "Mô tả kênh 2",
                "màu": "#FF0000",
                "gắn sao": sai
            }
        ]
    }
}
```

###### Liệt kê các mục kênh

ĐƯỢC  `https://urlkai.com/api/channel/:id?limit=1&page=1`

Để lấy các mục trong một kênh được chọn thông qua API, bạn có thể sử dụng điểm cuối này. Bạn cũng có thể lọc dữ liệu (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/channel/:id?limit=1&page=1' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/channel/:id?limit=1&page=1",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/channel/:id?limit=1&page=1',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/channel/:id?limit=1&page=1"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/channel/:id?limit=1&page=1");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": "0",
    "dữ liệu": {
        "kết quả": 2,
        "perpage": 2,
        "trang hiện tại": 1,
        "trang tiếp theo": 1,
        "maxpage": 1,
        "mục": [
            {
                "type": "liên kết",
                "id": 1,
                "title": "Liên kết mẫu của tôi",
                "preview": "https:\/\/google.com",
                "liên kết": "https:\/\/urlkai.com\/google",
                "ngày": "2022-05-12"
            },
            {
                "type": "tiểu sử",
                "id": 1,
                "title": "Tiểu sử mẫu của tôi",
                "preview": "https:\/\/urlkai.com\/mybio",
                "liên kết": "https:\/\/urlkai.com\/mybio",
                "ngày": "2022-06-01"
            }
        ]
    }
}
```

###### Kênh Criar um

TRỤ  `https://urlkai.com/api/channel/add`

Một kênh có thể được thêm vào bằng cách sử dụng điểm cuối này.

| **Parâmetro** | **Descrição** |
| --- | --- |
| Tên | (bắt buộc) Tên kênh |
| sự miêu tả | (tùy chọn) Mô tả kênh |
| màu | (tùy chọn) Màu huy hiệu kênh (HEX) |
| Đóng | (tùy chọn) Gắn dấu sao cho kênh hay không (đúng hoặc sai) |

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

```
{
    "lỗi": 0,
    "id": 3,
    "name": "Kênh mới",
    "description": "Kênh mới của tôi",
    "màu": "#000000",
    "Gắn sao": Đúng
}
```

###### Gán một mục cho một kênh

TRỤ  `https://urlkai.com/api/channel/:channelid/assign/:type/:itemid`

Một mục có thể được gán cho bất kỳ kênh nào bằng cách gửi yêu cầu với id kênh, loại mục (liên kết, tiểu sử hoặc qr) và id mục.

| **Parâmetro** | **Descrição** |
| --- | --- |
| :kênhid | (bắt buộc) ID kênh |
| :kiểu | (bắt buộc) liên kết hoặc tiểu sử hoặc QR |
| :itemid | (bắt buộc) ID mặt hàng |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu POST 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL = > "https://urlkai.com/api/channel/:channelid/assign/:type/:itemid",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐĂNG",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'ĐĂNG',
    'url': 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/channel/:channelid/assign/:type/:itemid"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/channel/:channelid/assign/:type/:itemid");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Mục đã được thêm thành công vào kênh."
}
```

###### Kênh Atualizar

ĐỂ  `https://urlkai.com/api/channel/:id/update`

Để cập nhật kênh, bạn cần gửi dữ liệu hợp lệ ở dạng JSON thông qua yêu cầu PUT. Dữ liệu phải được gửi dưới dạng nội dung thô của yêu cầu của bạn như hình dưới đây. Ví dụ dưới đây cho thấy tất cả các thông số bạn có thể gửi nhưng bạn không bắt buộc phải gửi tất cả (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| Tên | (tùy chọn) Tên kênh |
| sự miêu tả | (tùy chọn) Mô tả kênh |
| màu | (tùy chọn) Màu huy hiệu kênh (HEX) |
| Đóng | (tùy chọn) Gắn dấu sao cho kênh hay không (đúng hoặc sai) |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu PUT 'https://urlkai.com/api/channel/:id/update' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "name": "Tập đoàn Acme",
    "description": "kênh cho các mặt hàng cho Acme Corp",
    "màu": "#FFFFFF",
    "gắn sao": sai
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL = > "https://urlkai.com/api/channel/:id/update",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐẶT",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "name": "Tập đoàn Acme",
	    "description": "kênh cho các mặt hàng cho Acme Corp",
	    "màu": "#FFFFFF",
	    "gắn sao": sai
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'PUT',
    'url': 'https://urlkai.com/api/channel/:id/update',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "name": "Tập đoàn Acme",
    "description": "kênh cho các mặt hàng cho Acme Corp",
    "màu": "#FFFFFF",
    "gắn sao": sai
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/channel/:id/update"
tải trọng = {
    "name": "Tập đoàn Acme",
    "description": "kênh cho các mặt hàng cho Acme Corp",
    "màu": "#FFFFFF",
    "gắn sao": sai
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/channel/:id/update");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "name": "Tập đoàn Acme",
    "description": "kênh cho các mặt hàng cho Acme Corp",
    "màu": "#FFFFFF",
    "gắn sao": sai
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Kênh đã được cập nhật thành công."
}
```

###### Xóa kênh

XÓA  `https://urlkai.com/api/channel/:id/delete`

Để xóa kênh, bạn cần gửi yêu cầu XÓA. Tất cả các vật phẩm cũng sẽ không được chỉ định.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu XÓA 'https://urlkai.com/api/channel/:id/delete' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/channel/:id/delete",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "XÓA",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'XÓA',
    'url': 'https://urlkai.com/api/channel/:id/delete',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/channel/:id/delete"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/channel/:id/delete");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Kênh đã bị xóa thành công."
}
```

---

#### Códigos QR - Open in ChatGPT - Open in Claude

###### Liệt kê mã QR

ĐƯỢC  `https://urlkai.com/api/qr?limit=2&page=1`

Để nhận mã QR của bạn qua API, bạn có thể sử dụng điểm cuối này. Bạn cũng có thể lọc dữ liệu (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/qr?limit=2&page=1' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/qr?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/qr?limit=2&page=1',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/qr?limit=2&page=1"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/qr?limit=2&page=1");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": "0",
    "dữ liệu": {
        "kết quả": 2,
        "perpage": 2,
        "trang hiện tại": 1,
        "trang tiếp theo": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "liên kết": "https:\/\/urlkai.com\/QR\/A2D5E",
                "quét": 0,
                "name": "Google",
                "Date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "liên kết": "https:\/\/urlkai.com\/qr\/b9edfe",
                "quét": 5,
                "name": "Google Canada",
                "Date": "2020-11-10 18:00:25"
            }
        ]
    }
}
```

###### Nhận một mã QR duy nhất

ĐƯỢC  `https://urlkai.com/api/qr/:id`

Để nhận thông tin chi tiết cho một mã QR thông qua API, bạn có thể sử dụng điểm cuối này.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/qr/:id' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/qr/:id",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/qr/:id',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/qr/:id"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var request = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/qr/:id");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "chi tiết": {
        "id": 1,
        "liên kết": "https:\/\/urlkai.com\/qr\/b9edfe",
        "quét": 5,
        "name": "Google Canada",
        "Date": "2020-11-10 18:00:25"
    },
    "dữ liệu": {
        "nhấp chuột": 1,
        "uniqueClicks": 1,
        "topCountries": {
            "Không xác định": "1"
        },
        "topReferrers": {
            "Trực tiếp, email và khác": "1"
        },
        "trình duyệt hàng đầu": {
            "Chrome": "1"
        },
        "topOs": {
            "Windows 10": "1"
        },
        "đếm xã hội": {
            "facebook": 0,
            "twitter": 0,
            "Instagram": 0
        }
    }
}
```

###### Tạo mã QR

TRỤ  `https://urlkai.com/api/qr/add`

Để tạo Mã QR, bạn cần gửi dữ liệu hợp lệ ở dạng JSON thông qua yêu cầu POST. Dữ liệu phải được gửi dưới dạng nội dung thô của yêu cầu của bạn như hình dưới đây. Ví dụ dưới đây cho thấy tất cả các thông số bạn có thể gửi nhưng bạn không bắt buộc phải gửi tất cả (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| kiểu | (bắt buộc) văn bản | Thẻ vCard | liên kết | Thư điện tử | Điện thoại | SMS | Wifi |
| dữ liệu | (bắt buộc) Dữ liệu được nhúng bên trong mã QR. Dữ liệu có thể là chuỗi hoặc mảng tùy thuộc vào loại |
| nền | (tùy chọn) Màu RGB, ví dụ: rgb(255,255,255) |
| Foreground | (tùy chọn) Màu RGB, ví dụ: rgb(0,0,0) |
| logo | (tùy chọn) Đường dẫn đến logo png hoặc jpg |
| Tên | (tùy chọn) Tên mã QR |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu POST 'https://urlkai.com/api/qr/add' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "type": "liên kết",
    "dữ liệu": "https:\/\/google.com",
    "nền": "rgb(255,255,255)",
    "tiền cảnh": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png",
    "name": "API mã QR"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/qr/add",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐĂNG",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "type": "liên kết",
	    "dữ liệu": "https:\/\/google.com",
	    "nền": "rgb(255,255,255)",
	    "tiền cảnh": "rgb(0,0,0)",
	    "logo": "https:\/\/site.com\/logo.png",
	    "name": "API mã QR"
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'ĐĂNG',
    'url': 'https://urlkai.com/api/qr/add',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "type": "liên kết",
    "dữ liệu": "https:\/\/google.com",
    "nền": "rgb(255,255,255)",
    "tiền cảnh": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png",
    "name": "API mã QR"
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/qr/add"
tải trọng = {
    "type": "liên kết",
    "data": "https://google.com",
    "nền": "rgb(255,255,255)",
    "tiền cảnh": "rgb(0,0,0)",
    "logo": "https://site.com/logo.png",
    "name": "API mã QR"
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/qr/add");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "type": "liên kết",
    "dữ liệu": "https:\/\/google.com",
    "nền": "rgb(255,255,255)",
    "tiền cảnh": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png",
    "name": "API mã QR"
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "id": 3,
    "liên kết": "https:\/\/urlkai.com\/QR\/A58F79"
}
```

###### Cập nhật mã QR

ĐỂ  `https://urlkai.com/api/qr/:id/update`

Để cập nhật Mã QR, bạn cần gửi dữ liệu hợp lệ ở dạng JSON thông qua yêu cầu PUT. Dữ liệu phải được gửi dưới dạng nội dung thô của yêu cầu của bạn như hình dưới đây. Ví dụ dưới đây cho thấy tất cả các thông số bạn có thể gửi nhưng bạn không bắt buộc phải gửi tất cả (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| dữ liệu | (bắt buộc) Dữ liệu được nhúng bên trong mã QR. Dữ liệu có thể là chuỗi hoặc mảng tùy thuộc vào loại |
| nền | (tùy chọn) Màu RGB, ví dụ: rgb(255,255,255) |
| Foreground | (tùy chọn) Màu RGB, ví dụ: rgb(0,0,0) |
| logo | (tùy chọn) Đường dẫn đến logo png hoặc jpg |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu PUT 'https://urlkai.com/api/qr/:id/update' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "type": "liên kết",
    "dữ liệu": "https:\/\/google.com",
    "nền": "rgb(255,255,255)",
    "tiền cảnh": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/qr/:id/update",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐẶT",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "type": "liên kết",
	    "dữ liệu": "https:\/\/google.com",
	    "nền": "rgb(255,255,255)",
	    "tiền cảnh": "rgb(0,0,0)",
	    "logo": "https:\/\/site.com\/logo.png"
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'PUT',
    'url': 'https://urlkai.com/api/qr/:id/update',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "type": "liên kết",
    "dữ liệu": "https:\/\/google.com",
    "nền": "rgb(255,255,255)",
    "tiền cảnh": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/qr/:id/update"
tải trọng = {
    "type": "liên kết",
    "data": "https://google.com",
    "nền": "rgb(255,255,255)",
    "tiền cảnh": "rgb(0,0,0)",
    "logo": "https://site.com/logo.png"
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/qr/:id/update");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "type": "liên kết",
    "dữ liệu": "https:\/\/google.com",
    "nền": "rgb(255,255,255)",
    "tiền cảnh": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "QR đã được cập nhật thành công."
}
```

###### Xóa mã QR

XÓA  `https://urlkai.com/api/qr/:id/delete`

Để xóa mã QR, bạn cần gửi yêu cầu XÓA.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu XÓA 'https://urlkai.com/api/qr/:id/delete' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/qr/:id/delete",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "XÓA",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'XÓA',
    'url': 'https://urlkai.com/api/qr/:id/delete',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/qr/:id/delete"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/qr/:id/delete");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Mã QR đã được xóa thành công."
}
```

---

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

###### Liệt kê tên miền có thương hiệu

ĐƯỢC  `https://urlkai.com/api/domains?limit=2&page=1`

Để nhận miền có thương hiệu của bạn thông qua API, bạn có thể sử dụng điểm cuối này. Bạn cũng có thể lọc dữ liệu (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/domains?limit=2&page=1' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/domains?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/domains?limit=2&page=1',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/domains?limit=2&page=1"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/domains?limit=2&page=1");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": "0",
    "dữ liệu": {
        "kết quả": 2,
        "perpage": 2,
        "trang hiện tại": 1,
        "trang tiếp theo": 1,
        "maxpage": 1,
        "miền": [
            {
                "id": 1,
                "miền": "https:\/\/domain1.com",
                "redirectroot": "https:\/\/rootdomain.com",
                "redirect404": "https:\/\/rootdomain.com\/404"
            },
            {
                "id": 2,
                "miền": "https:\/\/domain2.com",
                "redirectroot": "https:\/\/rootdomain2.com",
                "redirect404": "https:\/\/rootdomain2.com\/404"
            }
        ]
    }
}
```

###### Tạo tên miền có thương hiệu

TRỤ  `https://urlkai.com/api/domain/add`

Một miền có thể được thêm vào bằng cách sử dụng điểm cuối này. Vui lòng đảm bảo tên miền được trỏ chính xác đến máy chủ của chúng tôi.

| **Parâmetro** | **Descrição** |
| --- | --- |
| miền | (bắt buộc) Tên miền có thương hiệu bao gồm http hoặc https |
| chuyển hướngroot | (tùy chọn) Chuyển hướng gốc khi ai đó truy cập miền của bạn |
| chuyển hướng404 | (tùy chọn) Chuyển hướng 404 tùy chỉnh |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu POST 'https://urlkai.com/api/domain/add' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "miền": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/domain/add",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐĂNG",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "miền": "https:\/\/domain1.com",
	    "redirectroot": "https:\/\/rootdomain.com",
	    "redirect404": "https:\/\/rootdomain.com\/404"
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'ĐĂNG',
    'url': 'https://urlkai.com/api/domain/add',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "miền": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/domain/add"
tải trọng = {
    "miền": "https://domain1.com",
    "redirectroot": "https://rootdomain.com",
    "redirect404": "https://rootdomain.com/404"
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/domain/add");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "miền": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "id": 1
}
```

###### Atualizar domínio

ĐỂ  `https://urlkai.com/api/domain/:id/update`

Để cập nhật tên miền có thương hiệu, bạn cần gửi dữ liệu hợp lệ ở dạng JSON thông qua yêu cầu PUT. Dữ liệu phải được gửi dưới dạng nội dung thô của yêu cầu của bạn như hình dưới đây. Ví dụ dưới đây cho thấy tất cả các thông số bạn có thể gửi nhưng bạn không bắt buộc phải gửi tất cả (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| chuyển hướngroot | (tùy chọn) Chuyển hướng gốc khi ai đó truy cập miền của bạn |
| chuyển hướng404 | (tùy chọn) Chuyển hướng 404 tùy chỉnh |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu PUT 'https://urlkai.com/api/domain/:id/update' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/domain/:id/update",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐẶT",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "redirectroot": "https:\/\/rootdomain-new.com",
	    "redirect404": "https:\/\/rootdomain-new.com\/404"
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'PUT',
    'url': 'https://urlkai.com/api/domain/:id/update',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/domain/:id/update"
tải trọng = {
    "redirectroot": "https://rootdomain-new.com",
    "redirect404": "https://rootdomain-new.com/404"
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/domain/:id/update");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Tên miền đã được cập nhật thành công."
}
```

###### Xóa tên miền

XÓA  `https://urlkai.com/api/domain/:id/delete`

Để xóa miền, bạn cần gửi yêu cầu DELETE.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu XÓA 'https://urlkai.com/api/domain/:id/delete' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/domain/:id/delete",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "XÓA",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'XÓA',
    'url': 'https://urlkai.com/api/domain/:id/delete',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/domain/:id/delete"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/domain/:id/delete");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Tên miền đã được xóa thành công."
}
```

---

#### Tập tin - Open in ChatGPT - Open in Claude

###### Danh sách tệp

ĐƯỢC  `https://urlkai.com/api/files?limit=2&page=1`

Nhận tất cả các tệp của bạn. Bạn cũng có thể tìm kiếm theo tên.

| **Parâmetro** | **Descrição** |
| --- | --- |
| Tên | (tùy chọn) Tìm kiếm tệp theo tên |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |

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\/AYABX",
            "date": "2022-08-09 17:00:00"
        },
        {
            "id": 2,
            "name": "My Documents",
            "downloads": 15,
            "shorturl": "https:\/\/urlkai.com\/xtcxS",
            "date": "2022-08-10 17:01:00"
        },
        {
            "id": 3,
            "name": "My Files",
            "downloads": 5,
            "shorturl": "https:\/\/urlkai.com\/OdSCT",
            "date": "2022-08-11 19:01:00"
        }
    ]
}
```

###### Tải tệp lên

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

Tải lên tệp bằng cách gửi dữ liệu nhị phân dưới dạng nội dung bài đăng. Bạn cần gửi tên tệp bao gồm phần mở rộng thay vì :filename trong url (ví dụ: brandkit.zip). Bạn có thể đặt các tùy chọn bằng cách gửi các thông số sau.

| **Parâmetro** | **Descrição** |
| --- | --- |
| Tên | (tùy chọn) Tên tập tin |
| phong tục | (tùy chọn) Bí danh tùy chỉnh thay vì bí danh ngẫu nhiên. |
| miền | (tùy chọn) Tên miền tùy chỉnh |
| mật khẩu | (tùy chọn) Bảo vệ bằng mật khẩu |
| Hết hạn | (tùy chọn) Hết hạn cho ví dụ tải xuống 2021-09-28 |
| Tải xuống tối đa | (tùy chọn) Số lần tải xuống tối đa |

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\/ogWsc"
}
```

---

#### Liên kết - Open in ChatGPT - Open in Claude

###### Liên kết danh sách

ĐƯỢC  `https://urlkai.com/api/urls?limit=2&page=1o=date`

Để lấy liên kết của bạn thông qua API, bạn có thể sử dụng điểm cuối này. Bạn cũng có thể lọc dữ liệu (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |
| trật tự | (tùy chọn) Sắp xếp dữ liệu giữa ngày hoặc nhấp chuột |
| thấp | (tùy chọn) Tìm kiếm bằng url ngắn. Lưu ý rằng khi bạn sử dụng tham số short, tất cả các tham số khác sẽ bị bỏ qua và nếu có kết quả khớp, phản hồi Single Link sẽ được trả về. |
| q | (tùy chọn) Tìm kiếm liên kết bằng từ khóa |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/urls?limit=2&page=1o=date' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/urls?limit=2&page=1o=date",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/urls?limit=2&page=1o=date',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/urls?limit=2&page=1o=date"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/urls?limit=2&page=1o=date");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": "0",
    "dữ liệu": {
        "kết quả": 2,
        "perpage": 2,
        "trang hiện tại": 1,
        "trang tiếp theo": 1,
        "maxpage": 1,
        "urls": [
            {
                "id": 2,
                "bí danh": "google",
                "shorturl": "https:\/\/urlkai.com\/google",
                "longurl": "https:\/\/google.com",
                "nhấp chuột": 0,
                "title": "Google",
                "mô tả": "",
                "Date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "bí danh": "googlecanada",
                "shorturl": "https:\/\/urlkai.com\/googlecanada",
                "longurl": "https:\/\/google.ca",
                "nhấp chuột": 0,
                "title": "Google Canada",
                "mô tả": "",
                "Date": "2020-11-10 18:00:25"
            }
        ]
    }
}
```

###### Nhận một liên kết duy nhất

ĐƯỢC  `https://urlkai.com/api/url/:id`

Để nhận thông tin chi tiết cho một liên kết thông qua API, bạn có thể sử dụng điểm cuối này.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/url/:id' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/url/:id",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/url/:id',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/url/:id"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var request = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/url/:id");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "id": 1,
    "chi tiết": {
        "id": 1,
        "shorturl": "https:\/\/urlkai.com\/googlecanada",
        "longurl": "https:\/\/google.com",
        "title": "Google",
        "mô tả": "",
        "vị trí": {
            "Canada": "https:\/\/google.ca",
            "Hoa Kỳ": "https:\/\/google.us"
        },
        "thiết bị": {
            "iphone": "https:\/\/google.com",
            "android": "https:\/\/google.com"
        },
        "hết hạn": null,
        "Date": "2020-11-10 18:01:43"
    },
    "dữ liệu": {
        "nhấp chuột": 0,
        "uniqueClicks": 0,
        "topCountries": 0,
        "topGiới thiệu": 0,
        "trình duyệt hàng đầu": 0,
        "topOs": 0,
        "đếm xã hội": {
            "facebook": 0,
            "twitter": 0,
            "google": 0
        }
    }
}
```

###### Rút ngắn liên kết

TRỤ  `https://urlkai.com/api/url/add`

Để rút ngắn liên kết, bạn cần gửi dữ liệu hợp lệ ở dạng JSON thông qua yêu cầu POST. Dữ liệu phải được gửi dưới dạng nội dung thô của yêu cầu của bạn như hình dưới đây. Ví dụ dưới đây cho thấy tất cả các thông số bạn có thể gửi nhưng bạn không bắt buộc phải gửi tất cả (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| Url | (bắt buộc) URL dài để rút ngắn. |
| phong tục | (tùy chọn) Bí danh tùy chỉnh thay vì bí danh ngẫu nhiên. |
| kiểu | (tùy chọn) Loại chuyển hướng [trực tiếp, khung, giật gân], chỉ *Id* cho trang giật gân tùy chỉnh hoặc *lớp phủ id* Đối với các trang CTA |
| mật khẩu | (tùy chọn) Bảo vệ bằng mật khẩu |
| miền | (tùy chọn) Tên miền tùy chỉnh |
| Hết hạn | (tùy chọn) Hết hạn cho ví dụ liên kết 2021-09-28 23:11:16 |
| mục tiêu địa lý | (tùy chọn) Dữ liệu nhắm mục tiêu theo địa lý |
| mục tiêu thiết bị | (tùy chọn) Dữ liệu nhắm mục tiêu thiết bị |
| Mục tiêu ngôn ngữ | (tùy chọn) Dữ liệu nhắm mục tiêu ngôn ngữ |
| siêu tiêu đề | (tùy chọn) Tiêu đề meta |
| Mô tả siêu | (tùy chọn) Mô tả meta |
| siêu hình ảnh | (tùy chọn) Liên kết đến hình ảnh jpg hoặc png |
| sự miêu tả | (tùy chọn) Ghi chú hoặc mô tả |
| Pixel | (tùy chọn) Mảng id pixel |
| kênh | (tùy chọn) ID kênh |
| chiến dịch | (tùy chọn) ID chiến dịch |
| liên kết sâu | (tùy chọn) Đối tượng chứa liên kết cửa hàng ứng dụng. Khi sử dụng tính năng này, điều quan trọng là phải đặt nhắm mục tiêu theo thiết bị. (Mới) Giờ đây, bạn có thể đặt tham số "auto" thành true để tự động tạo liên kết sâu từ liên kết dài được cung cấp. |
| tình trạng | (tùy chọn) *công cộng* hoặc *riêng tư (mặc định)* |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu POST 'https://urlkai.com/api/url/add' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "url": "https:\/\/google.com",
    "status": "riêng tư",
    "custom": "google",
    "password": "mypass",
    "hết hạn": "2020-11-11 12:00:00",
    "type": "giật gân",
    "metatitle": "Không phải Google",
    "metadescription": "Không phải mô tả của Google",
    "metaimage": "https:\/\/www.mozilla.org\/media\/protocol\/img\/logos\/firefox\/browser\/og.4ad05d4125a5.png",
    "description": "Đối với facebook",
    "pixel": [
        1,
        2,
        3,
        4
    ],
    "kênh": 1,
    "chiến dịch": 1,
    "liên kết sâu": {
        "auto": đúng,
        "táo": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "mục tiêu địa lý": [
        {
            "location": "Canada",
            "liên kết": "https:\/\/google.ca"
        },
        {
            "location": "Hoa Kỳ",
            "liên kết": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "thiết bị": "iPhone",
            "liên kết": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "liên kết": "https:\/\/google.com"
        }
    ],
    "languagetarget": [
        {
            "ngôn ngữ": "en",
            "liên kết": "https:\/\/google.com"
        },
        {
            "ngôn ngữ": "fr",
            "liên kết": "https:\/\/google.ca"
        }
    ],
    "tham số": [
        {
            "tên": "aff",
            "giá trị": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL = > "https://urlkai.com/api/url/add",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐĂNG",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "url": "https:\/\/google.com",
	    "status": "riêng tư",
	    "custom": "google",
	    "password": "mypass",
	    "hết hạn": "2020-11-11 12:00:00",
	    "type": "giật gân",
	    "metatitle": "Không phải Google",
	    "metadescription": "Không phải mô tả của Google",
	    "metaimage": "https:\/\/www.mozilla.org\/media\/protocol\/img\/logos\/firefox\/browser\/og.4ad05d4125a5.png",
	    "description": "Đối với facebook",
	    "pixel": [
	        1,
	        2,
	        3,
	        4
	    ],
	    "kênh": 1,
	    "chiến dịch": 1,
	    "liên kết sâu": {
	        "auto": đúng,
	        "táo": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
	        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
	    },
	    "mục tiêu địa lý": [
	        {
	            "location": "Canada",
	            "liên kết": "https:\/\/google.ca"
	        },
	        {
	            "location": "Hoa Kỳ",
	            "liên kết": "https:\/\/google.us"
	        }
	    ],
	    "devicetarget": [
	        {
	            "thiết bị": "iPhone",
	            "liên kết": "https:\/\/google.com"
	        },
	        {
	            "device": "Android",
	            "liên kết": "https:\/\/google.com"
	        }
	    ],
	    "languagetarget": [
	        {
	            "ngôn ngữ": "en",
	            "liên kết": "https:\/\/google.com"
	        },
	        {
	            "ngôn ngữ": "fr",
	            "liên kết": "https:\/\/google.ca"
	        }
	    ],
	    "tham số": [
	        {
	            "tên": "aff",
	            "giá trị": "3"
	        },
	        {
	            "device": "gtm_source",
	            "link": "api"
	        }
	    ]
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'ĐĂNG',
    'url': 'https://urlkai.com/api/url/add',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "url": "https:\/\/google.com",
    "status": "riêng tư",
    "custom": "google",
    "password": "mypass",
    "hết hạn": "2020-11-11 12:00:00",
    "type": "giật gân",
    "metatitle": "Không phải Google",
    "metadescription": "Không phải mô tả của Google",
    "metaimage": "https:\/\/www.mozilla.org\/media\/protocol\/img\/logos\/firefox\/browser\/og.4ad05d4125a5.png",
    "description": "Đối với facebook",
    "pixel": [
        1,
        2,
        3,
        4
    ],
    "kênh": 1,
    "chiến dịch": 1,
    "liên kết sâu": {
        "auto": đúng,
        "táo": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "mục tiêu địa lý": [
        {
            "location": "Canada",
            "liên kết": "https:\/\/google.ca"
        },
        {
            "location": "Hoa Kỳ",
            "liên kết": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "thiết bị": "iPhone",
            "liên kết": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "liên kết": "https:\/\/google.com"
        }
    ],
    "languagetarget": [
        {
            "ngôn ngữ": "en",
            "liên kết": "https:\/\/google.com"
        },
        {
            "ngôn ngữ": "fr",
            "liên kết": "https:\/\/google.ca"
        }
    ],
    "tham số": [
        {
            "tên": "aff",
            "giá trị": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/url/add"
tải trọng = {
    "url": "https://google.com",
    "status": "riêng tư",
    "custom": "google",
    "password": "mypass",
    "hết hạn": "2020-11-11 12:00:00",
    "type": "giật gân",
    "metatitle": "Không phải Google",
    "metadescription": "Không phải mô tả của Google",
    "metaimage": "https://www.mozilla.org/media/protocol/img/logos/firefox/browser/og.4ad05d4125a5.png",
    "description": "Đối với facebook",
    "pixel": [
        1,
        2,
        3,
        4
    ],
    "kênh": 1,
    "chiến dịch": 1,
    "liên kết sâu": {
        "auto": đúng,
        "táo": "https://apps.apple.com/us/app/google/id284815942",
        "google": "https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=Hoa Kỳ"
    },
    "mục tiêu địa lý": [
        {
            "location": "Canada",
            "link": "https://google.ca"
        },
        {
            "location": "Hoa Kỳ",
            "link": "https://google.us"
        }
    ],
    "devicetarget": [
        {
            "thiết bị": "iPhone",
            "link": "https://google.com"
        },
        {
            "device": "Android",
            "link": "https://google.com"
        }
    ],
    "languagetarget": [
        {
            "ngôn ngữ": "en",
            "link": "https://google.com"
        },
        {
            "ngôn ngữ": "fr",
            "link": "https://google.ca"
        }
    ],
    "tham số": [
        {
            "tên": "aff",
            "giá trị": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/url/add");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "url": "https:\/\/google.com",
    "status": "riêng tư",
    "custom": "google",
    "password": "mypass",
    "hết hạn": "2020-11-11 12:00:00",
    "type": "giật gân",
    "metatitle": "Không phải Google",
    "metadescription": "Không phải mô tả của Google",
    "metaimage": "https:\/\/www.mozilla.org\/media\/protocol\/img\/logos\/firefox\/browser\/og.4ad05d4125a5.png",
    "description": "Đối với facebook",
    "pixel": [
        1,
        2,
        3,
        4
    ],
    "kênh": 1,
    "chiến dịch": 1,
    "liên kết sâu": {
        "auto": đúng,
        "táo": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "mục tiêu địa lý": [
        {
            "location": "Canada",
            "liên kết": "https:\/\/google.ca"
        },
        {
            "location": "Hoa Kỳ",
            "liên kết": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "thiết bị": "iPhone",
            "liên kết": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "liên kết": "https:\/\/google.com"
        }
    ],
    "languagetarget": [
        {
            "ngôn ngữ": "en",
            "liên kết": "https:\/\/google.com"
        },
        {
            "ngôn ngữ": "fr",
            "liên kết": "https:\/\/google.ca"
        }
    ],
    "tham số": [
        {
            "tên": "aff",
            "giá trị": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "id": 3,
    "shorturl": "https:\/\/urlkai.com\/google"
}
```

###### Liên kết Atualizar

ĐỂ  `https://urlkai.com/api/url/:id/update`

Để cập nhật liên kết, bạn cần gửi dữ liệu hợp lệ ở dạng JSON thông qua yêu cầu PUT. Dữ liệu phải được gửi dưới dạng nội dung thô của yêu cầu của bạn như hình dưới đây. Ví dụ dưới đây cho thấy tất cả các thông số bạn có thể gửi nhưng bạn không bắt buộc phải gửi tất cả (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| Url | (bắt buộc) URL dài để rút ngắn. |
| phong tục | (tùy chọn) Bí danh tùy chỉnh thay vì bí danh ngẫu nhiên. |
| kiểu | (tùy chọn) Loại chuyển hướng [trực tiếp, khung, giật gân] |
| mật khẩu | (tùy chọn) Bảo vệ bằng mật khẩu |
| miền | (tùy chọn) Tên miền tùy chỉnh |
| Hết hạn | (tùy chọn) Hết hạn cho ví dụ liên kết 2021-09-28 23:11:16 |
| mục tiêu địa lý | (tùy chọn) Dữ liệu nhắm mục tiêu theo địa lý |
| mục tiêu thiết bị | (tùy chọn) Dữ liệu nhắm mục tiêu thiết bị |
| Mục tiêu ngôn ngữ | (tùy chọn) Dữ liệu nhắm mục tiêu ngôn ngữ |
| siêu tiêu đề | (tùy chọn) Tiêu đề meta |
| Mô tả siêu | (tùy chọn) Mô tả meta |
| siêu hình ảnh | (tùy chọn) Liên kết đến hình ảnh jpg hoặc png |
| Pixel | (tùy chọn) Mảng id pixel |
| kênh | (tùy chọn) ID kênh |
| chiến dịch | (tùy chọn) ID chiến dịch |
| liên kết sâu | (tùy chọn) Đối tượng chứa liên kết cửa hàng ứng dụng. Khi sử dụng tính năng này, điều quan trọng là phải đặt nhắm mục tiêu thiết bị. |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu PUT 'https://urlkai.com/api/url/:id/update' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "url": "https:\/\/google.com",
    "custom": "google",
    "password": "mypass",
    "hết hạn": "2020-11-11 12:00:00",
    "type": "giật gân",
    "pixel": [
        1,
        2,
        3,
        4
    ],
    "kênh": 1,
    "liên kết sâu": {
        "táo": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "mục tiêu địa lý": [
        {
            "location": "Canada",
            "liên kết": "https:\/\/google.ca"
        },
        {
            "location": "Hoa Kỳ",
            "liên kết": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "thiết bị": "iPhone",
            "liên kết": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "liên kết": "https:\/\/google.com"
        }
    ],
    "tham số": [
        {
            "tên": "aff",
            "giá trị": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/url/:id/update",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐẶT",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "url": "https:\/\/google.com",
	    "custom": "google",
	    "password": "mypass",
	    "hết hạn": "2020-11-11 12:00:00",
	    "type": "giật gân",
	    "pixel": [
	        1,
	        2,
	        3,
	        4
	    ],
	    "kênh": 1,
	    "liên kết sâu": {
	        "táo": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
	        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
	    },
	    "mục tiêu địa lý": [
	        {
	            "location": "Canada",
	            "liên kết": "https:\/\/google.ca"
	        },
	        {
	            "location": "Hoa Kỳ",
	            "liên kết": "https:\/\/google.us"
	        }
	    ],
	    "devicetarget": [
	        {
	            "thiết bị": "iPhone",
	            "liên kết": "https:\/\/google.com"
	        },
	        {
	            "device": "Android",
	            "liên kết": "https:\/\/google.com"
	        }
	    ],
	    "tham số": [
	        {
	            "tên": "aff",
	            "giá trị": "3"
	        },
	        {
	            "device": "gtm_source",
	            "link": "api"
	        }
	    ]
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'PUT',
    'url': 'https://urlkai.com/api/url/:id/update',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "url": "https:\/\/google.com",
    "custom": "google",
    "password": "mypass",
    "hết hạn": "2020-11-11 12:00:00",
    "type": "giật gân",
    "pixel": [
        1,
        2,
        3,
        4
    ],
    "kênh": 1,
    "liên kết sâu": {
        "táo": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "mục tiêu địa lý": [
        {
            "location": "Canada",
            "liên kết": "https:\/\/google.ca"
        },
        {
            "location": "Hoa Kỳ",
            "liên kết": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "thiết bị": "iPhone",
            "liên kết": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "liên kết": "https:\/\/google.com"
        }
    ],
    "tham số": [
        {
            "tên": "aff",
            "giá trị": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/url/:id/update"
tải trọng = {
    "url": "https://google.com",
    "custom": "google",
    "password": "mypass",
    "hết hạn": "2020-11-11 12:00:00",
    "type": "giật gân",
    "pixel": [
        1,
        2,
        3,
        4
    ],
    "kênh": 1,
    "liên kết sâu": {
        "táo": "https://apps.apple.com/us/app/google/id284815942",
        "google": "https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=Hoa Kỳ"
    },
    "mục tiêu địa lý": [
        {
            "location": "Canada",
            "link": "https://google.ca"
        },
        {
            "location": "Hoa Kỳ",
            "link": "https://google.us"
        }
    ],
    "devicetarget": [
        {
            "thiết bị": "iPhone",
            "link": "https://google.com"
        },
        {
            "device": "Android",
            "link": "https://google.com"
        }
    ],
    "tham số": [
        {
            "tên": "aff",
            "giá trị": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/url/:id/update");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "url": "https:\/\/google.com",
    "custom": "google",
    "password": "mypass",
    "hết hạn": "2020-11-11 12:00:00",
    "type": "giật gân",
    "pixel": [
        1,
        2,
        3,
        4
    ],
    "kênh": 1,
    "liên kết sâu": {
        "táo": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "mục tiêu địa lý": [
        {
            "location": "Canada",
            "liên kết": "https:\/\/google.ca"
        },
        {
            "location": "Hoa Kỳ",
            "liên kết": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "thiết bị": "iPhone",
            "liên kết": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "liên kết": "https:\/\/google.com"
        }
    ],
    "tham số": [
        {
            "tên": "aff",
            "giá trị": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "id": 3,
    "short": "https:\/\/urlkai.com\/google"
}
```

###### Xóa liên kết

XÓA  `https://urlkai.com/api/url/:id/delete`

Để xóa liên kết, bạn cần gửi yêu cầu XÓA.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu XÓA 'https://urlkai.com/api/url/:id/delete' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/url/:id/delete",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "XÓA",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'XÓA',
    'url': 'https://urlkai.com/api/url/:id/delete',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/url/:id/delete"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/url/:id/delete");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Liên kết đã bị xóa thành công"
}
```

---

#### Píxeis - Open in ChatGPT - Open in Claude

###### Danh sách pixel

ĐƯỢC  `https://urlkai.com/api/pixels?limit=2&page=1`

Để lấy mã pixel của bạn thông qua API, bạn có thể sử dụng điểm cuối này. Bạn cũng có thể lọc dữ liệu (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/pixels?limit=2&page=1' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL = > "https://urlkai.com/api/pixels?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/pixels?limit=2&page=1',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/pixels?limit=2&page=1"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var request = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/pixels?limit=2&page=1");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": "0",
    "dữ liệu": {
        "kết quả": 2,
        "perpage": 2,
        "trang hiện tại": 1,
        "trang tiếp theo": 1,
        "maxpage": 1,
        "pixel": [
            {
                "id": 1,
                "type": "gtmpixel",
                "name": "GTM Pixel",
                "thẻ": "GA-123456789",
                "Date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "twitterpixel",
                "name": "Twitter Pixel",
                "thẻ": "1234567",
                "ngày": "2020-11-10 18:10:00"
            }
        ]
    }
}
```

###### Tạo Pixel

TRỤ  `https://urlkai.com/api/pixel/add`

Một pixel có thể được tạo bằng điểm cuối này. Bạn cần gửi loại pixel và thẻ.

| **Parâmetro** | **Descrição** |
| --- | --- |
| kiểu | (bắt buộc) gtmpixel | Gapixel | FBPIXEL | AdwordsPixel | Linkedinpixel | Twitterpixel | Adrollpixel | Quorapixel | Pinterest | Bing | Snapchat | Reddit | Tiktok |
| Tên | (bắt buộc) Tên tùy chỉnh cho pixel |
| thẻ | (bắt buộc) Thẻ cho pixel |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu POST 'https://urlkai.com/api/pixel/add' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "type": "gtmpixel",
    "name": "GTM của tôi",
    "tag": "GTM-ABCDE"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/pixel/add",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐĂNG",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "type": "gtmpixel",
	    "name": "GTM của tôi",
	    "tag": "GTM-ABCDE"
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'ĐĂNG',
    'url': 'https://urlkai.com/api/pixel/add',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "type": "gtmpixel",
    "name": "GTM của tôi",
    "tag": "GTM-ABCDE"
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/pixel/add"
tải trọng = {
    "type": "gtmpixel",
    "name": "GTM của tôi",
    "tag": "GTM-ABCDE"
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/pixel/add");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "type": "gtmpixel",
    "name": "GTM của tôi",
    "tag": "GTM-ABCDE"
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "id": 1
}
```

###### Atualizar pixel

ĐỂ  `https://urlkai.com/api/pixel/:id/update`

Để cập nhật pixel, bạn cần gửi dữ liệu hợp lệ ở dạng JSON thông qua yêu cầu PUT. Dữ liệu phải được gửi dưới dạng nội dung thô của yêu cầu của bạn như hình dưới đây. Ví dụ dưới đây cho thấy tất cả các thông số bạn có thể gửi nhưng bạn không bắt buộc phải gửi tất cả (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| Tên | (tùy chọn) Tên tùy chỉnh cho pixel |
| thẻ | (bắt buộc) Thẻ cho pixel |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu PUT 'https://urlkai.com/api/pixel/:id/update' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
--data-raw '{
    "name": "GTM của tôi",
    "tag": "GTM-ABCDE"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/pixel/:id/update",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "ĐẶT",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "name": "GTM của tôi",
	    "tag": "GTM-ABCDE"
	}',
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'PUT',
    'url': 'https://urlkai.com/api/pixel/:id/update',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    nội dung: JSON.stringify({
    "name": "GTM của tôi",
    "tag": "GTM-ABCDE"
}),
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/pixel/:id/update"
tải trọng = {
    "name": "GTM của tôi",
    "tag": "GTM-ABCDE"
}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/pixel/:id/update");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{
    "name": "GTM của tôi",
    "tag": "GTM-ABCDE"
}", System.Text.Encoding.UTF8, "ứng dụng/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Pixel đã được cập nhật thành công."
}
```

###### Xóa Pixel

XÓA  `https://urlkai.com/api/pixel/:id/delete`

Để xóa pixel, bạn cần gửi yêu cầu XÓA.

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu XÓA 'https://urlkai.com/api/pixel/:id/delete' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/pixel/:id/delete",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "XÓA",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'method': 'XÓA',
    'url': 'https://urlkai.com/api/pixel/:id/delete',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/pixel/:id/delete"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/pixel/:id/delete");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": 0,
    "message": "Pixel đã bị xóa thành công."
}
```

---

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

###### Liệt kê lớp phủ CTA

ĐƯỢC  `https://urlkai.com/api/overlay?limit=2&page=1`

Để nhận lớp phủ cta thông qua API, bạn có thể sử dụng điểm cuối này. Bạn cũng có thể lọc dữ liệu (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/overlay?limit=2&page=1' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL => "https://urlkai.com/api/overlay?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/overlay?limit=2&page=1',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/overlay?limit=2&page=1"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var yêu cầu = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/overlay?limit=2&page=1");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": "0",
    "dữ liệu": {
        "kết quả": 2,
        "perpage": 2,
        "trang hiện tại": 1,
        "trang tiếp theo": 1,
        "maxpage": 1,
        "CTA": [
            {
                "id": 1,
                "type": "tin nhắn",
                "name": "Khuyến mãi sản phẩm 1",
                "Date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "liên hệ",
                "name": "Trang liên hệ",
                "ngày": "2020-11-10 18:10:00"
            }
        ]
    }
}
```

---

#### Cá nhân hóa giật gân - Open in ChatGPT - Open in Claude

###### Danh sách Splash tùy chỉnh

ĐƯỢC  `https://urlkai.com/api/splash?limit=2&page=1`

Để nhận các trang giật gân tùy chỉnh thông qua API, bạn có thể sử dụng điểm cuối này. Bạn cũng có thể lọc dữ liệu (Xem bảng để biết thêm thông tin).

| **Parâmetro** | **Descrição** |
| --- | --- |
| giới hạn | (tùy chọn) Kết quả dữ liệu trên mỗi trang |
| trang | (tùy chọn) Yêu cầu trang hiện tại |

cURL
PHP
Node.js
Python
C#

```
curl --vị trí --yêu cầu GET 'https://urlkai.com/api/splash?limit=2&page=1' \
--header 'Ủy quyền: Người mang YOURAPIKEY' \
--header 'Loại nội dung: ứng dụng / json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, mảng(
    CURLOPT_URL = > "https://urlkai.com/api/splash?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => đúng,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => đúng,
    CURLOPT_CUSTOMREQUEST => "NHẬN",
    CURLOPT_HTTPHEADER => [
        "Ủy quyền: Người mang YOURAPIKEY",
        "Loại nội dung: ứng dụng / json",
    ],
    
));

$response = curl_exec ($curl);

curl_close ($curl);
tiếng vang $response;
```

```
var yêu cầu = require('yêu cầu');
var options = {
    'phương thức': 'GET',
    'url': 'https://urlkai.com/api/splash?limit=2&page=1',
    'tiêu đề': {
        'Ủy quyền': 'Người mang YOURAPIKEY',
        'Content-Type': 'ứng dụng/json'
    },
    
};
request(tùy chọn, hàm (lỗi, phản hồi) {
    if (lỗi) throw new Error(lỗi);
    console.log(phản hồi.cơ thể);
});
```

```
Yêu cầu nhập
url = "https://urlkai.com/api/splash?limit=2&page=1"
tải trọng = {}
tiêu đề = {
    'Ủy quyền': 'Người mang YOURAPIKEY',
    'Content-Type': 'ứng dụng/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
in (phản hồi.văn bản)
```

```
var client = HttpClient mới();
var request = mới HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/splash?limit=2&page=1");
yêu cầu. Headers.Add("Ủy quyền", "Người mang YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
yêu cầu. Nội dung = nội dung;
var response = chờ khách hàng. SendAsync(yêu cầu);
phản ứng. EnsureSuccessStatusCode();
Console.WriteLine(chờ phản hồi. Content.ReadAsStringAsync());
```

###### Resposta do servidor

```
{
    "lỗi": "0",
    "dữ liệu": {
        "kết quả": 2,
        "perpage": 2,
        "trang hiện tại": 1,
        "trang tiếp theo": 1,
        "maxpage": 1,
        "splash": [
            {
                "id": 1,
                "name": "Khuyến mãi sản phẩm 1",
                "Date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "name": "Khuyến mãi sản phẩm 2",
                "ngày": "2020-11-10 18:10:00"
            }
        ]
    }
}
```