# Developers
**Source:** https://es.urlkai.com/id/developers
**Language:** Spanish

---

API documentation

Mulai

Mulai 
Autentikasi 
Tarifa de Batas 
Penanganan Respon 

Akun 

Akun 
Dapatkan Akun 
Perbaharui akun

Dominio Bermerek 

Dominio Bermerek 
Lista de dominios de marca 
Crear un dominio de marca 
Dominio Perbarui 
Eliminar dominio

Archivos 

Archivos 
Archivos de lista 
Subir un archivo

Hamparan CTA 

Hamparan CTA 
Lista de superposiciones de CTA

Kampanye 

Kampanye 
Campañas de listas 
Buat Kampanye 
Asignar un enlace a una campaña 
Perbarui Kampanye 
Eliminar campaña

Kode QR 

Kode QR 
Lista de códigos QR 
Dapatkan satu Kode QR 
Buat Kode QR 
Actualizar código QR 
Hapus Kode QR

Pembuka Kustom 

Pembuka Kustom 
Lista de salpicaduras personalizadas

Piksel 

Piksel 
Píxeles de lista 
Crear un píxel 
Perbarui Piksel 
Eliminar píxel

Tautan 

Tautan 
Enlaces de lista 
Obtener un solo enlace 
Persingkat Tautan 
Perbarui Tautan 
Hapus Tautan

Saluran 

Saluran 
Canales de lista 
Enumerar elementos de canal 
Buat Saluran 
Asignar un elemento a un canal 
Perbarui Saluran 
Eliminar canal

Developers

# Referensi API untuk Pengembang

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

## Mulai

Kunci API diperlukan agar permintaan diproses oleh sistem. Setelah pengguna mendaftar, kunci API secara otomatis dibuat untuk pengguna ini. Kunci API harus dikirim dengan setiap permintaan (lihat contoh lengkap di bawah). Jika kunci API tidak dikirim atau kedaluwarsa, akan terjadi kesalahan. Pastikan untuk merahasiakan kunci API Anda untuk mencegah penyalahgunaan.

## Autentikasi

Untuk mengautentikasi dengan sistem API, Anda perlu mengirim kunci API sebagai token otorisasi dengan setiap permintaan. Anda dapat melihat contoh kode di bawah ini.

```
curl --location --request POST 'https://urlkai.com/api/account' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();
curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/account",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PUBLICAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
));

$response = curl_exec($curl);
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'POST',
    'url': 'https://urlkai.com/api/account',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    Cuerpo: ''
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/account"
carga útil = {}
encabezados = {
  «Autorización»: «Portador YOURAPIKEY»,
  'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/account");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

## Tarifa de Batas

API kami memiliki pembatas kecepatan untuk melindungi dari lonjakan permintaan untuk memaksimalkan stabilitasnya. Pembatas tarif kami saat ini dibatasi pada 30 permintaan per 1 menit. Tenga en cuenta que la tarifa puede cambiar según el plan suscrito.

Beberapa tajuk akan dikirim bersama respons dan ini dapat diperiksa untuk menentukan berbagai informasi tentang permintaan.

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

## Penanganan Respon

Semua respons API dikembalikan dalam format JSON secara default. Untuk mengubah ini menjadi data yang dapat digunakan, fungsi yang sesuai perlu digunakan sesuai dengan bahasa. Di PHP, fungsi json\_decode() dapat digunakan untuk mengonversi data menjadi objek (default) atau array (setel parameter kedua ke true). Sangat penting untuk memeriksa kunci kesalahan karena memberikan informasi apakah ada kesalahan atau tidak. Anda juga dapat memeriksa kode header.

```
{
    "error": 1,
    "message": "Se ha producido un error"
}
```

## Akun

Open in ChatGPT 

Open in Claude

### Dapatkan Akun

OBTENER 
`https://urlkai.com/api/account`

Untuk mendapatkan informasi tentang akun, Anda dapat mengirim permintaan ke titik akhir ini dan itu akan mengembalikan data pada akun.

```
curl --location --request GET 'https://urlkai.com/api/account' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/account",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/account',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/account"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/account");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "datos": {
        "id": 1,
        "correo electrónico": " [correo electrónico protegido] ",
        "nombre de usuario": "usuario de muestra",
        "avatar": "https:\/\/domain.com\/content\/avatar.png",
        "status": "pro",
        "expira": "2022-11-15 15:00:00",
        "registrado": "2020-11-10 18:01:43"
    }
}
```

### Perbaharui akun

PONER 
`https://urlkai.com/api/account/update`

Untuk memperbarui informasi di akun, Anda dapat mengirim permintaan ke titik akhir ini dan itu akan memperbarui data di akun.

```
curl --location --request PUT 'https://urlkai.com/api/account/update' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "correo electrónico": " [correo electrónico protegido] ",
    "password": "NewPassword1"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/account/update",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PONER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "correo electrónico": " [correo electrónico protegido] ",
	    "password": "NewPassword1"
	}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'PUT',
    'url': 'https://urlkai.com/api/account/update',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "correo electrónico": " [correo electrónico protegido] ",
    "password": "NewPassword1"
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/account/update"
carga útil = {
    "correo electrónico": " [correo electrónico protegido] ",
    "password": "NewPassword1"
}
headers = {
    'Authorization': 'Bearer YOURAPIKEY',
    'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
print(response.text)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/account/update");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "correo electrónico": " [correo electrónico protegido] ",
    "password": "NewPassword1"
}", System.Text.Encoding.UTF8, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "La cuenta se ha actualizado correctamente".
}
```

## Dominio Bermerek

Open in ChatGPT 

Open in Claude

### Lista de dominios de marca

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

Para obtener sus dominios de marca a través de la API, puede utilizar este punto de conexión. También puede filtrar datos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |

```
curl --location --request GET 'https://urlkai.com/api/domains?limit=2&page=1' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/domains?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/domains?limit=2&page=1',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/domains?limit=2&page=1"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/domains?limit=2&page=1");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": "0",
    "datos": {
        "resultado": 2,
        "por página": 2,
        "currentpage": 1,
        "página siguiente": 1,
        "maxpage": 1,
        "dominios": [
            {
                "id": 1,
                "dominio": "https:\/\/domain1.com",
                "redirectroot": "https:\/\/rootdomain.com",
                "redirect404": "https:\/\/rootdomain.com\/404"
            },
            {
                "id": 2,
                "dominio": "https:\/\/domain2.com",
                "redirectroot": "https:\/\/rootdomain2.com",
                "redirect404": "https:\/\/rootdomain2.com\/404"
            }
        ]
    }
}
```

### Crear un dominio de marca

EXPONER 
`https://urlkai.com/api/domain/add`

Se puede agregar un dominio mediante este punto de conexión. Por favor, asegúrese de que el dominio esté correctamente apuntado a nuestro servidor.

| Parámetro | Keterangan |
| --- | --- |
| dominio | (obligatorio) Dominio de marca, incluyendo http o https |
| raíz, redireccionamiento | (Opcional) Redireccionamiento de root cuando alguien visita tu dominio |
| redirección404 | (Opcional) Redireccionamiento 404 personalizado |

```
curl --location --request POST 'https://urlkai.com/api/domain/add' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "dominio": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/domain/add",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PUBLICAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "dominio": "https:\/\/domain1.com",
	    "redirectroot": "https:\/\/rootdomain.com",
	    "redirect404": "https:\/\/rootdomain.com\/404"
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'POST',
    'url': 'https://urlkai.com/api/domain/add',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "dominio": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/domain/add"
carga útil = {
    "domain": "https://domain1.com",
    "redirectroot": "https://rootdomain.com",
    "redirect404": "https://rootdomain.com/404"
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/domain/add");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "dominio": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

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

### Dominio Perbarui

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

Para actualizar un dominio de marca, debe enviar un dato válido en JSON a través de una solicitud PUT. Los datos deben enviarse como el cuerpo sin procesar de su solicitud como se muestra a continuación. En el ejemplo siguiente se muestran todos los parámetros que puede enviar, pero es necesario que los envíe todos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| raíz, redireccionamiento | (Opcional) Redireccionamiento de root cuando alguien visita tu dominio |
| redirección404 | (Opcional) Redireccionamiento 404 personalizado |

```
curl --location --request PUT 'https://urlkai.com/api/domain/:id/update' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/domain/:id/update",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PONER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "redirectroot": "https:\/\/rootdomain-new.com",
	    "redirect404": "https:\/\/rootdomain-new.com\/404"
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'PUT',
    'url': 'https://urlkai.com/api/domain/:id/update',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/domain/:id/update"
carga útil = {
    "redirectroot": "https://rootdomain-new.com",
    "redirect404": "https://rootdomain-new.com/404"
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/domain/:id/update");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "El dominio se ha actualizado correctamente".
}
```

### Eliminar dominio

BORRAR 
`https://urlkai.com/api/domain/:id/delete`

Para eliminar un dominio, debe enviar una solicitud DELETE.

```
curl --location --request DELETE 'https://urlkai.com/api/domain/:id/delete' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/domain/:id/delete",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "ELIMINAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'ELIMINAR',
    'url': 'https://urlkai.com/api/domain/:id/delete',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/domain/:id/delete"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/domain/:id/delete");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "El dominio se ha eliminado con éxito".
}
```

## Archivos

Open in ChatGPT 

Open in Claude

### Archivos de lista

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

Obtén todos tus archivos. También puede buscar por nombre.

| Parámetro | Keterangan |
| --- | --- |
| nombre | (Opcional) Buscar un archivo por nombre |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |

```
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());
```

#### Servidor Tanggapan

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

### Subir un archivo

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

Cargue un archivo enviando los datos binarios como el cuerpo de la publicación. Debe enviar el nombre del archivo incluyendo la extensión en lugar de :filename en la url (por ejemplo, brandkit.zip). Puede establecer opciones enviando los siguientes parámetros.

| Parámetro | Keterangan |
| --- | --- |
| nombre | (Opcional) Nombre de archivo |
| costumbre | (Opcional) Alias personalizado en lugar de alias aleatorio. |
| dominio | (Opcional) Dominio personalizado |
| contraseña | (Opcional) Protección con contraseña |
| expiración | (Opcional) Caducidad del ejemplo de descarga 2021-09-28 |
| maxdownloads | (Opcional) Número máximo de descargas |

```
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());
```

#### Servidor Tanggapan

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

## Hamparan CTA

Open in ChatGPT 

Open in Claude

### Lista de superposiciones de CTA

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

Para obtener superposiciones de CTA a través de la API, puede usar este punto de conexión. También puede filtrar datos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |

```
curl --location --request GET 'https://urlkai.com/api/overlay?limit=2&page=1' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/overlay?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/overlay?limit=2&page=1',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/overlay?limit=2&page=1"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/overlay?limit=2&page=1");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": "0",
    "datos": {
        "resultado": 2,
        "por página": 2,
        "currentpage": 1,
        "página siguiente": 1,
        "maxpage": 1,
        "CTA": [
            {
                "id": 1,
                "type": "mensaje",
                "name": "Producto 1 Promo",
                "fecha": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "contacto",
                "name": "Página de contacto",
                "fecha": "2020-11-10 18:10:00"
            }
        ]
    }
}
```

## Kampanye

Open in ChatGPT 

Open in Claude

### Campañas de listas

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

Para obtener sus campañas a través de la API, puede utilizar este punto de conexión. También puede filtrar datos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |

```
curl --location --request GET 'https://urlkai.com/api/campaigns?limit=2&page=1' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/campaigns?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/campaigns?limit=2&page=1',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/campaigns?limit=2&page=1"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/campaigns?limit=2&page=1");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": "0",
    "datos": {
        "resultado": 2,
        "por página": 2,
        "currentpage": 1,
        "página siguiente": 1,
        "maxpage": 1,
        "Campañas": [
            {
                "id": 1,
                "name": "Campaña de muestra",
                "público": falso,
                "rotador": falso,
                "lista": "https:\/\/domain.com\/u\/admin\/list-1"
            },
            {
                "id": 2,
                "domain": "Campaña de Facebook",
                "público": cierto,
                "rotador": "https:\/\/domain.com\/r\/prueba",
                "lista": "https:\/\/domain.com\/u\/admin\/test-2"
            }
        ]
    }
}
```

### Buat Kampanye

EXPONER 
`https://urlkai.com/api/campaign/add`

Se puede agregar una campaña mediante este punto de conexión.

| Parámetro | Keterangan |
| --- | --- |
| nombre | (Opcional) Nombre de la campaña |
| trago | (Opcional) rotadora |
| público | (Opcional) Acceso |

```
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());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "id": 3,
    "dominio": "Nueva Campaña",
    "Público": Cierto,
    "rotator": "https:\/\/domain.com\/r\/new-campaign",
    "lista": "https:\/\/domain.com\/u\/admin\/new-campaign-3"
}
```

### Asignar un enlace a una campaña

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

Se puede asignar un enlace corto a una campaña utilizando este punto final. El punto de conexión requiere el ID de campaña y el ID de enlace corto.

```
curl --location --request POST 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/campaign/:campaignid/assign/:linkid",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PUBLICAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'POST',
    'url': 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/campaign/:campaignid/assign/:linkid"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/campaign/:campaignid/assign/:linkid");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "Enlace añadido con éxito a la campaña."
}
```

### Perbarui Kampanye

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

Para actualizar una campaña, debe enviar datos válidos en JSON a través de una solicitud PUT. Los datos deben enviarse como el cuerpo sin procesar de su solicitud como se muestra a continuación. En el ejemplo siguiente se muestran todos los parámetros que puede enviar, pero es necesario que los envíe todos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| nombre | (obligatorio) Nombre de la campaña |
| trago | (Opcional) rotadora |
| público | (Opcional) Acceso |

```
curl --location --request PUT 'https://urlkai.com/api/campaign/:id/update' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Campaña de Twitter",
    "slug": "campaña-de-twitter",
    "público": verdadero
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/campaign/:id/update",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PONER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "name": "Campaña de Twitter",
	    "slug": "campaña-de-twitter",
	    "público": verdadero
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'PUT',
    'url': 'https://urlkai.com/api/campaign/:id/update',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "name": "Campaña de Twitter",
    "slug": "campaña-de-twitter",
    "público": verdadero
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/campaign/:id/update"
carga útil = {
    "name": "Campaña de Twitter",
    "slug": "campaña-de-twitter",
    "público": verdadero
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/campaign/:id/update");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "name": "Campaña de Twitter",
    "slug": "campaña-de-twitter",
    "público": verdadero
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "id": 3,
    "domain": "Campaña de Twitter",
    "público": cierto,
    "rotador": "https:\/\/domain.com\/r\/campaña-de-twitter",
    "lista": "https:\/\/domain.com\/u\/admin\/twitter-campaign-3"
}
```

### Eliminar campaña

BORRAR 
`https://urlkai.com/api/campaign/:id/delete`

Para eliminar una campaña, debe enviar una solicitud DELETE.

```
curl --location --request DELETE 'https://urlkai.com/api/campaign/:id/delete' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/campaign/:id/delete",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "ELIMINAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'ELIMINAR',
    'url': 'https://urlkai.com/api/campaign/:id/delete',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/campaign/:id/delete"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/campaign/:id/delete");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "La campaña se ha eliminado con éxito".
}
```

## Kode QR

Open in ChatGPT 

Open in Claude

### Lista de códigos QR

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

Untuk mendapatkan kode QR Anda melalui API, Anda dapat menggunakan titik akhir ini. Anda juga dapat memfilter data (Lihat tabel untuk info selengkapnya).

| Parámetro | Keterangan |
| --- | --- |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |

```
curl --location --request GET 'https://urlkai.com/api/qr?limit=2&page=1' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/qr?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/qr?limit=2&page=1',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/qr?limit=2&page=1"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/qr?limit=2&page=1");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": "0",
    "datos": {
        "resultado": 2,
        "por página": 2,
        "currentpage": 1,
        "página siguiente": 1,
        "maxpage": 1,
        "QRS": [
            {
                "id": 2,
                "enlace": "https:\/\/urlkai.com\/qr\/a2d5e",
                "escaneos": 0,
                "name": "Google",
                "fecha": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "enlace": "https:\/\/urlkai.com\/qr\/b9edfe",
                "escaneos": 5,
                "name": "Google Canadá",
                "fecha": "2020-11-10 18:00:25"
            }
        ]
    }
}
```

### Dapatkan satu Kode QR

OBTENER 
`https://urlkai.com/api/qr/:id`

Untuk mendapatkan detail untuk satu kode QR melalui API, Anda dapat menggunakan titik akhir ini.

```
curl --location --request GET 'https://urlkai.com/api/qr/:id' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/qr/:id",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/qr/:id',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/qr/:id"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/qr/:id");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "detalles": {
        "id": 1,
        "enlace": "https:\/\/urlkai.com\/qr\/b9edfe",
        "escaneos": 5,
        "name": "Google Canadá",
        "fecha": "2020-11-10 18:00:25"
    },
    "datos": {
        "clics": 1,
        "uniqueClicks": 1,
        "topCountries": {
            "Desconocido": "1"
        },
        "topReferrers": {
            "Directo, correo electrónico y otros": "1"
        },
        "topBrowsers": {
            "Cromo": "1"
        },
        "topOs": {
            "Windows 10": "1"
        },
        "socialCount": {
            "facebook": 0,
            "Twitter": 0,
            "Instagram": 0
        }
    }
}
```

### Buat Kode QR

EXPONER 
`https://urlkai.com/api/qr/add`

Para crear un código QR, debe enviar un dato válido en JSON a través de una solicitud POST. Los datos deben enviarse como el cuerpo sin procesar de su solicitud como se muestra a continuación. En el ejemplo siguiente se muestran todos los parámetros que puede enviar, pero es necesario que los envíe todos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| tipo | Texto (obligatorio) | vCard | Enlace | Correo electrónico | Teléfo| SMS | Wifi |
| datos | (obligatorio) Datos a incrustar dentro del código QR. Los datos pueden ser de cadena o de matriz, según el tipo |
| fondo | (Opcional) Color RGB, por ejemplo, rgb (255,255,255) |
| primer pla| (Opcional) Color RGB, por ejemplo, rgb (0,0,0) |
| logotipo | (Opcional) Ruta al logotipo, ya sea png o jpg |
| nombre | (Opcional) Nombre del código QR |

```
curl --location --request POST 'https://urlkai.com/api/qr/add' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "enlace",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png",
    "name": "API de código QR"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/qr/add",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PUBLICAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "type": "enlace",
	    "data": "https:\/\/google.com",
	    "background": "rgb(255,255,255)",
	    "foreground": "rgb(0,0,0)",
	    "logo": "https:\/\/site.com\/logo.png",
	    "name": "API de código QR"
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'POST',
    'url': 'https://urlkai.com/api/qr/add',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "type": "enlace",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png",
    "name": "API de código QR"
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/qr/add"
carga útil = {
    "type": "enlace",
    "data": "https://google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https://site.com/logo.png",
    "name": "API de código QR"
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/qr/add");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "type": "enlace",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png",
    "name": "API de código QR"
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

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

### Actualizar código QR

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

Untuk memperbarui Kode QR, Anda perlu mengirim data yang valid di JSON melalui permintaan PUT. Data harus dikirim sebagai badan mentah permintaan Anda seperti yang ditunjukkan di bawah ini. Contoh di bawah ini menunjukkan semua parameter yang dapat Anda kirim tetapi Anda tidak diharuskan untuk mengirim semua (Lihat tabel untuk info lebih lanjut).

| Parámetro | Keterangan |
| --- | --- |
| datos | (obligatorio) Datos a incrustar dentro del código QR. Los datos pueden ser de cadena o de matriz, según el tipo |
| fondo | (Opcional) Color RGB, por ejemplo, rgb (255,255,255) |
| primer pla| (Opcional) Color RGB, por ejemplo, rgb (0,0,0) |
| logotipo | (Opcional) Ruta al logotipo, ya sea png o jpg |

```
curl --location --request PUT 'https://urlkai.com/api/qr/:id/update' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "enlace",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/qr/:id/update",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PONER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "type": "enlace",
	    "data": "https:\/\/google.com",
	    "background": "rgb(255,255,255)",
	    "foreground": "rgb(0,0,0)",
	    "logo": "https:\/\/site.com\/logo.png"
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'PUT',
    'url': 'https://urlkai.com/api/qr/:id/update',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "type": "enlace",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/qr/:id/update"
carga útil = {
    "type": "enlace",
    "data": "https://google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https://site.com/logo.png"
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/qr/:id/update");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "type": "enlace",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "QR se ha actualizado con éxito".
}
```

### Hapus Kode QR

BORRAR 
`https://urlkai.com/api/qr/:id/delete`

Untuk menghapus kode QR, Anda perlu mengirim permintaan DELETE.

```
curl --location --request DELETE 'https://urlkai.com/api/qr/:id/delete' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/qr/:id/delete",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "ELIMINAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'ELIMINAR',
    'url': 'https://urlkai.com/api/qr/:id/delete',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/qr/:id/delete"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/qr/:id/delete");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "El código QR se ha eliminado correctamente".
}
```

## Pembuka Kustom

Open in ChatGPT 

Open in Claude

### Lista de salpicaduras personalizadas

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

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

| Parámetro | Keterangan |
| --- | --- |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |

```
curl --location --request GET 'https://urlkai.com/api/splash?limit=2&page=1' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/splash?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/splash?limit=2&page=1',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/splash?limit=2&page=1"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/splash?limit=2&page=1");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": "0",
    "datos": {
        "resultado": 2,
        "por página": 2,
        "currentpage": 1,
        "página siguiente": 1,
        "maxpage": 1,
        "salpicadura": [
            {
                "id": 1,
                "name": "Producto 1 Promo",
                "fecha": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "name": "Producto 2 Promo",
                "fecha": "2020-11-10 18:10:00"
            }
        ]
    }
}
```

## Piksel

Open in ChatGPT 

Open in Claude

### Píxeles de lista

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

Para obtener los códigos de píxeles a través de la API, puede utilizar este punto de conexión. También puede filtrar datos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |

```
curl --location --request GET 'https://urlkai.com/api/pixels?limit=2&page=1' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/pixels?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/pixels?limit=2&page=1',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/pixels?limit=2&page=1"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/pixels?limit=2&page=1");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": "0",
    "datos": {
        "resultado": 2,
        "por página": 2,
        "currentpage": 1,
        "página siguiente": 1,
        "maxpage": 1,
        "píxeles": [
            {
                "id": 1,
                "tipo": "gtmpixel",
                "name": "GTM Pixel",
                "etiqueta": "GA-123456789",
                "fecha": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "tipo": "twitterpixel",
                "name": "Píxel de Twitter",
                "tag": "1234567",
                "fecha": "2020-11-10 18:10:00"
            }
        ]
    }
}
```

### Crear un píxel

EXPONER 
`https://urlkai.com/api/pixel/add`

Se puede crear un píxel con este punto de conexión. Debe enviar el tipo de píxel y la etiqueta.

| Parámetro | Keterangan |
| --- | --- |
| tipo | (obligatorio) gtmpixel | Gapixel | FBPIXEL | Píxel de Adwords| Píxel de LinkedIn | TwitterPixel | AdrollPixel | quorapixel | Pinterest | Bing | Snapchat | Reddit | TikTok |
| nombre | (obligatorio) Nombre personalizado para tu píxel |
| día | (obligatorio) La etiqueta para el píxel |

```
curl --location --request POST 'https://urlkai.com/api/pixel/add' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tipo": "gtmpixel",
    "name": "Mi GTM",
    "tag": "GTM-ABCDE"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/pixel/add",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PUBLICAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "tipo": "gtmpixel",
	    "name": "Mi GTM",
	    "tag": "GTM-ABCDE"
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'POST',
    'url': 'https://urlkai.com/api/pixel/add',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "tipo": "gtmpixel",
    "name": "Mi GTM",
    "tag": "GTM-ABCDE"
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/pixel/add"
carga útil = {
    "tipo": "gtmpixel",
    "name": "Mi GTM",
    "tag": "GTM-ABCDE"
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/pixel/add");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "tipo": "gtmpixel",
    "name": "Mi GTM",
    "tag": "GTM-ABCDE"
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

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

### Perbarui Piksel

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

Para actualizar un píxel, debe enviar datos válidos en JSON a través de una solicitud PUT. Los datos deben enviarse como el cuerpo sin procesar de su solicitud como se muestra a continuación. En el ejemplo siguiente se muestran todos los parámetros que puede enviar, pero es necesario que los envíe todos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| nombre | (Opcional) Nombre personalizado para tu píxel |
| día | (obligatorio) La etiqueta para el píxel |

```
curl --location --request PUT 'https://urlkai.com/api/pixel/:id/update' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Mi GTM",
    "tag": "GTM-ABCDE"
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/pixel/:id/update",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PONER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "name": "Mi GTM",
	    "tag": "GTM-ABCDE"
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'PUT',
    'url': 'https://urlkai.com/api/pixel/:id/update',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "name": "Mi GTM",
    "tag": "GTM-ABCDE"
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/pixel/:id/update"
carga útil = {
    "name": "Mi GTM",
    "tag": "GTM-ABCDE"
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/pixel/:id/update");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "name": "Mi GTM",
    "tag": "GTM-ABCDE"
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "Pixel se ha actualizado correctamente".
}
```

### Eliminar píxel

BORRAR 
`https://urlkai.com/api/pixel/:id/delete`

Para eliminar un píxel, debe enviar una solicitud DELETE.

```
curl --location --request DELETE 'https://urlkai.com/api/pixel/:id/delete' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/pixel/:id/delete",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "ELIMINAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'ELIMINAR',
    'url': 'https://urlkai.com/api/pixel/:id/delete',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/pixel/:id/delete"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/pixel/:id/delete");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "El píxel se ha eliminado correctamente".
}
```

## Tautan

Open in ChatGPT 

Open in Claude

### Enlaces de lista

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

Untuk mendapatkan tautan Anda melalui API, Anda dapat menggunakan titik akhir ini. Anda juga dapat memfilter data (Lihat tabel untuk info selengkapnya).

| Parámetro | Keterangan |
| --- | --- |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |
| orden | (Opcional) Ordenar datos por fecha o clic |
| corto | (Opcional) Busca usando la URL corta. Tenga en cuenta que cuando utiliza el parámetro short, todos los demás parámetros se ignoran y, si hay una coincidencia, se devolverá una respuesta de enlace único. |
| q | (Opcional) Búsqueda de enlaces mediante una palabra clave |

```
curl --location --request GET 'https://urlkai.com/api/urls?limit=2&page=1o=date' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/urls?limit=2&page=1o=date",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/urls?limit=2&page=1o=date',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/urls?limit=2&page=1o=date"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/urls?limit=2&page=1o=date");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": "0",
    "datos": {
        "resultado": 2,
        "por página": 2,
        "currentpage": 1,
        "página siguiente": 1,
        "maxpage": 1,
        "urls": [
            {
                "id": 2,
                "alias": "google",
                "shorturl": "https:\/\/urlkai.com\/google",
                "longurl": "https:\/\/google.com",
                "clics": 0,
                "title": "Google",
                "descripción": "",
                "fecha": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "alias": "googlecanada",
                "shorturl": "https:\/\/urlkai.com\/googlecanada",
                "longurl": "https:\/\/google.ca",
                "clics": 0,
                "title": "Google Canadá",
                "descripción": "",
                "fecha": "2020-11-10 18:00:25"
            }
        ]
    }
}
```

### Obtener un solo enlace

OBTENER 
`https://urlkai.com/api/url/:id`

Untuk mendapatkan detail untuk satu tautan melalui API, Anda dapat menggunakan titik akhir ini.

```
curl --location --request GET 'https://urlkai.com/api/url/:id' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/url/:id",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/url/:id',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/url/:id"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/url/:id");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "id": 1,
    "detalles": {
        "id": 1,
        "shorturl": "https:\/\/urlkai.com\/googlecanada",
        "longurl": "https:\/\/google.com",
        "title": "Google",
        "descripción": "",
        "ubicación": {
            "Canadá": "https:\/\/google.ca",
            "Estados Unidos": "https:\/\/google.us"
        },
        "dispositivo": {
            "iPhone": "https:\/\/google.com",
            "Android": "https:\/\/google.com"
        },
        "expiry": nulo,
        "fecha": "2020-11-10 18:01:43"
    },
    "datos": {
        "clics": 0,
        "uniqueClicks": 0,
        "topCountries": 0,
        "topReferrers": 0,
        "topBrowsers": 0,
        "topOs": 0,
        "socialCount": {
            "facebook": 0,
            "Twitter": 0,
            "google": 0
        }
    }
}
```

### Persingkat Tautan

EXPONER 
`https://urlkai.com/api/url/add`

Untuk mempersingkat tautan, Anda perlu mengirim data yang valid di JSON melalui permintaan POST. Data harus dikirim sebagai badan mentah permintaan Anda seperti yang ditunjukkan di bawah ini. Contoh di bawah ini menunjukkan semua parameter yang dapat Anda kirim tetapi Anda tidak diharuskan untuk mengirim semua (Lihat tabel untuk info lebih lanjut).

| Parámetro | Keterangan |
| --- | --- |
| URL | (obligatorio) URL larga para acortar. |
| costumbre | (Opcional) Alias personalizado en lugar de alias aleatorio. |
| tipo | (Opcional) Tipo de redireccionamiento [directo, marco, salpicadura], solo *identificación* para la página de inicio personalizada o *overlay-id* Para páginas de CTA |
| contraseña | (Opcional) Protección con contraseña |
| dominio | (Opcional) Dominio personalizado |
| expiración | (Opcional) Caducidad del ejemplo de enlace 2021-09-28 23:11:16 |
| Segmentación geográfica | (Opcional) Datos de segmentación geográfica |
| Destidel dispositivo | (Opcional) Datos de segmentación por dispositivo |
| Objetivo de lenguaje | (Opcional) Datos de segmentación por idioma |
| Metatítulo | (Opcional) Meta título |
| Metadescripción | (Opcional) Meta descripción |
| Metaimagen | (Opcional) Enlace a una imagen jpg o png |
| descripción | (Opcional) Nota o descripción |
| Píxeles | (Opcional) Matriz de identificadores de píxeles |
| canal | (Opcional) ID de canal |
| campaña | (Opcional) ID de campaña |
| Enlace profundo | (opcional) Objeto que contiene enlaces a la tienda de aplicaciones. Al usar esto, también es importante establecer la segmentación de dispositivos. (Nuevo) Ahora puedes configurar el parámetro "auto" como verdadero para generar automáticamente los enlaces profundos a partir del enlace largo proporcionado. |
| estado | (Opcional) *público* o *private (predeterminado)* |

```
curl --location --request POST 'https://urlkai.com/api/url/add' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https:\/\/google.com",
    "status": "privado",
    "personalizado": "google",
    "contraseña": "mypass",
    "expiry": "2020-11-11 12:00:00",
    "type": "salpicadura",
    "metatitle": "No es Google",
    "metadescription": "No es una descripción de Google",
    "metaimagen": "https:\/\/www.mozilla.org\/media\/protocolo\/img\/logos\/firefox\/navegador\/og.4ad05d4125a5.png",
    "description": "Para facebook",
    "píxeles": [
        1,
        2,
        3,
        4
    ],
    "canal": 1,
    "campaña": 1,
    "enlace profundo": {
        "auto": verdadero,
        "Apple": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "geotarget": [
        {
            "location": "Canadá",
            "enlace": "https:\/\/google.ca"
        },
        {
            "location": "Estados Unidos",
            "enlace": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "device": "iPhone",
            "enlace": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "enlace": "https:\/\/google.com"
        }
    ],
    "languagetarget": [
        {
            "language": "en",
            "enlace": "https:\/\/google.com"
        },
        {
            "idioma": "fr",
            "enlace": "https:\/\/google.ca"
        }
    ],
    "parámetros": [
        {
            "nombre": "aff",
            "valor": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/url/add",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PUBLICAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "url": "https:\/\/google.com",
	    "status": "privado",
	    "personalizado": "google",
	    "contraseña": "mypass",
	    "expiry": "2020-11-11 12:00:00",
	    "type": "salpicadura",
	    "metatitle": "No es Google",
	    "metadescription": "No es una descripción de Google",
	    "metaimagen": "https:\/\/www.mozilla.org\/media\/protocolo\/img\/logos\/firefox\/navegador\/og.4ad05d4125a5.png",
	    "description": "Para facebook",
	    "píxeles": [
	        1,
	        2,
	        3,
	        4
	    ],
	    "canal": 1,
	    "campaña": 1,
	    "enlace profundo": {
	        "auto": verdadero,
	        "Apple": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
	        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
	    },
	    "geotarget": [
	        {
	            "location": "Canadá",
	            "enlace": "https:\/\/google.ca"
	        },
	        {
	            "location": "Estados Unidos",
	            "enlace": "https:\/\/google.us"
	        }
	    ],
	    "devicetarget": [
	        {
	            "device": "iPhone",
	            "enlace": "https:\/\/google.com"
	        },
	        {
	            "device": "Android",
	            "enlace": "https:\/\/google.com"
	        }
	    ],
	    "languagetarget": [
	        {
	            "language": "en",
	            "enlace": "https:\/\/google.com"
	        },
	        {
	            "idioma": "fr",
	            "enlace": "https:\/\/google.ca"
	        }
	    ],
	    "parámetros": [
	        {
	            "nombre": "aff",
	            "valor": "3"
	        },
	        {
	            "device": "gtm_source",
	            "link": "api"
	        }
	    ]
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'POST',
    'url': 'https://urlkai.com/api/url/add',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "url": "https:\/\/google.com",
    "status": "privado",
    "personalizado": "google",
    "contraseña": "mypass",
    "expiry": "2020-11-11 12:00:00",
    "type": "salpicadura",
    "metatitle": "No es Google",
    "metadescription": "No es una descripción de Google",
    "metaimagen": "https:\/\/www.mozilla.org\/media\/protocolo\/img\/logos\/firefox\/navegador\/og.4ad05d4125a5.png",
    "description": "Para facebook",
    "píxeles": [
        1,
        2,
        3,
        4
    ],
    "canal": 1,
    "campaña": 1,
    "enlace profundo": {
        "auto": verdadero,
        "Apple": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "geotarget": [
        {
            "location": "Canadá",
            "enlace": "https:\/\/google.ca"
        },
        {
            "location": "Estados Unidos",
            "enlace": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "device": "iPhone",
            "enlace": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "enlace": "https:\/\/google.com"
        }
    ],
    "languagetarget": [
        {
            "language": "en",
            "enlace": "https:\/\/google.com"
        },
        {
            "idioma": "fr",
            "enlace": "https:\/\/google.ca"
        }
    ],
    "parámetros": [
        {
            "nombre": "aff",
            "valor": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/url/add"
carga útil = {
    "url": "https://google.com",
    "status": "privado",
    "personalizado": "google",
    "contraseña": "mypass",
    "expiry": "2020-11-11 12:00:00",
    "type": "salpicadura",
    "metatitle": "No es Google",
    "metadescription": "No es una descripción de Google",
    "metaimagen": "https://www.mozilla.org/media/protocol/img/logos/firefox/browser/og.4ad05d4125a5.png",
    "description": "Para facebook",
    "píxeles": [
        1,
        2,
        3,
        4
    ],
    "canal": 1,
    "campaña": 1,
    "enlace profundo": {
        "auto": verdadero,
        "manzana": "https://apps.apple.com/us/app/google/id284815942",
        "google": "https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=NOSOTROS"
    },
    "geotarget": [
        {
            "location": "Canadá",
            "link": "https://google.ca"
        },
        {
            "location": "Estados Unidos",
            "enlace": "https://google.us"
        }
    ],
    "devicetarget": [
        {
            "device": "iPhone",
            "enlace": "https://google.com"
        },
        {
            "device": "Android",
            "enlace": "https://google.com"
        }
    ],
    "languagetarget": [
        {
            "language": "en",
            "enlace": "https://google.com"
        },
        {
            "idioma": "fr",
            "link": "https://google.ca"
        }
    ],
    "parámetros": [
        {
            "nombre": "aff",
            "valor": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/url/add");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "url": "https:\/\/google.com",
    "status": "privado",
    "personalizado": "google",
    "contraseña": "mypass",
    "expiry": "2020-11-11 12:00:00",
    "type": "salpicadura",
    "metatitle": "No es Google",
    "metadescription": "No es una descripción de Google",
    "metaimagen": "https:\/\/www.mozilla.org\/media\/protocolo\/img\/logos\/firefox\/navegador\/og.4ad05d4125a5.png",
    "description": "Para facebook",
    "píxeles": [
        1,
        2,
        3,
        4
    ],
    "canal": 1,
    "campaña": 1,
    "enlace profundo": {
        "auto": verdadero,
        "Apple": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "geotarget": [
        {
            "location": "Canadá",
            "enlace": "https:\/\/google.ca"
        },
        {
            "location": "Estados Unidos",
            "enlace": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "device": "iPhone",
            "enlace": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "enlace": "https:\/\/google.com"
        }
    ],
    "languagetarget": [
        {
            "language": "en",
            "enlace": "https:\/\/google.com"
        },
        {
            "idioma": "fr",
            "enlace": "https:\/\/google.ca"
        }
    ],
    "parámetros": [
        {
            "nombre": "aff",
            "valor": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

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

### Perbarui Tautan

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

Untuk memperbarui tautan, Anda perlu mengirim data yang valid di JSON melalui permintaan PUT. Data harus dikirim sebagai badan mentah permintaan Anda seperti yang ditunjukkan di bawah ini. Contoh di bawah ini menunjukkan semua parameter yang dapat Anda kirim tetapi Anda tidak diharuskan untuk mengirim semua (Lihat tabel untuk info lebih lanjut).

| Parámetro | Keterangan |
| --- | --- |
| URL | (obligatorio) URL larga para acortar. |
| costumbre | (Opcional) Alias personalizado en lugar de alias aleatorio. |
| tipo | (Opcional) Tipo de redireccionamiento [directo, marco, salpicadura] |
| contraseña | (Opcional) Protección con contraseña |
| dominio | (Opcional) Dominio personalizado |
| expiración | (Opcional) Caducidad del ejemplo de enlace 2021-09-28 23:11:16 |
| Segmentación geográfica | (Opcional) Datos de segmentación geográfica |
| Destidel dispositivo | (Opcional) Datos de segmentación por dispositivo |
| Objetivo de lenguaje | (Opcional) Datos de segmentación por idioma |
| Metatítulo | (Opcional) Meta título |
| Metadescripción | (Opcional) Meta descripción |
| Metaimagen | (Opcional) Enlace a una imagen jpg o png |
| Píxeles | (Opcional) Matriz de identificadores de píxeles |
| canal | (Opcional) ID de canal |
| campaña | (Opcional) ID de campaña |
| Enlace profundo | (Opcional) Objeto que contiene enlaces a la tienda de aplicaciones. Al usar esto, también es importante establecer la orientación del dispositivo. |

```
curl --location --request PUT 'https://urlkai.com/api/url/:id/update' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https:\/\/google.com",
    "personalizado": "google",
    "contraseña": "mypass",
    "expiry": "2020-11-11 12:00:00",
    "type": "salpicadura",
    "píxeles": [
        1,
        2,
        3,
        4
    ],
    "canal": 1,
    "enlace profundo": {
        "Apple": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "geotarget": [
        {
            "location": "Canadá",
            "enlace": "https:\/\/google.ca"
        },
        {
            "location": "Estados Unidos",
            "enlace": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "device": "iPhone",
            "enlace": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "enlace": "https:\/\/google.com"
        }
    ],
    "parámetros": [
        {
            "nombre": "aff",
            "valor": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/url/:id/update",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PONER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "url": "https:\/\/google.com",
	    "personalizado": "google",
	    "contraseña": "mypass",
	    "expiry": "2020-11-11 12:00:00",
	    "type": "salpicadura",
	    "píxeles": [
	        1,
	        2,
	        3,
	        4
	    ],
	    "canal": 1,
	    "enlace profundo": {
	        "Apple": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
	        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
	    },
	    "geotarget": [
	        {
	            "location": "Canadá",
	            "enlace": "https:\/\/google.ca"
	        },
	        {
	            "location": "Estados Unidos",
	            "enlace": "https:\/\/google.us"
	        }
	    ],
	    "devicetarget": [
	        {
	            "device": "iPhone",
	            "enlace": "https:\/\/google.com"
	        },
	        {
	            "device": "Android",
	            "enlace": "https:\/\/google.com"
	        }
	    ],
	    "parámetros": [
	        {
	            "nombre": "aff",
	            "valor": "3"
	        },
	        {
	            "device": "gtm_source",
	            "link": "api"
	        }
	    ]
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'PUT',
    'url': 'https://urlkai.com/api/url/:id/update',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "url": "https:\/\/google.com",
    "personalizado": "google",
    "contraseña": "mypass",
    "expiry": "2020-11-11 12:00:00",
    "type": "salpicadura",
    "píxeles": [
        1,
        2,
        3,
        4
    ],
    "canal": 1,
    "enlace profundo": {
        "Apple": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "geotarget": [
        {
            "location": "Canadá",
            "enlace": "https:\/\/google.ca"
        },
        {
            "location": "Estados Unidos",
            "enlace": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "device": "iPhone",
            "enlace": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "enlace": "https:\/\/google.com"
        }
    ],
    "parámetros": [
        {
            "nombre": "aff",
            "valor": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/url/:id/update"
carga útil = {
    "url": "https://google.com",
    "personalizado": "google",
    "contraseña": "mypass",
    "expiry": "2020-11-11 12:00:00",
    "type": "salpicadura",
    "píxeles": [
        1,
        2,
        3,
        4
    ],
    "canal": 1,
    "enlace profundo": {
        "manzana": "https://apps.apple.com/us/app/google/id284815942",
        "google": "https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=NOSOTROS"
    },
    "geotarget": [
        {
            "location": "Canadá",
            "link": "https://google.ca"
        },
        {
            "location": "Estados Unidos",
            "enlace": "https://google.us"
        }
    ],
    "devicetarget": [
        {
            "device": "iPhone",
            "enlace": "https://google.com"
        },
        {
            "device": "Android",
            "enlace": "https://google.com"
        }
    ],
    "parámetros": [
        {
            "nombre": "aff",
            "valor": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/url/:id/update");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "url": "https:\/\/google.com",
    "personalizado": "google",
    "contraseña": "mypass",
    "expiry": "2020-11-11 12:00:00",
    "type": "salpicadura",
    "píxeles": [
        1,
        2,
        3,
        4
    ],
    "canal": 1,
    "enlace profundo": {
        "Apple": "https:\/\/apps.apple.com\/us\/app\/google\/id284815942",
        "google": "https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.googlequicksearchbox&hl=en_CA≷=US"
    },
    "geotarget": [
        {
            "location": "Canadá",
            "enlace": "https:\/\/google.ca"
        },
        {
            "location": "Estados Unidos",
            "enlace": "https:\/\/google.us"
        }
    ],
    "devicetarget": [
        {
            "device": "iPhone",
            "enlace": "https:\/\/google.com"
        },
        {
            "device": "Android",
            "enlace": "https:\/\/google.com"
        }
    ],
    "parámetros": [
        {
            "nombre": "aff",
            "valor": "3"
        },
        {
            "device": "gtm_source",
            "link": "api"
        }
    ]
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "id": 3,
    "corto": "https:\/\/urlkai.com\/google"
}
```

### Hapus Tautan

BORRAR 
`https://urlkai.com/api/url/:id/delete`

Untuk menghapus tautan, Anda perlu mengirim permintaan DELETE.

```
curl --location --request DELETE 'https://urlkai.com/api/url/:id/delete' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/url/:id/delete",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "ELIMINAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'ELIMINAR',
    'url': 'https://urlkai.com/api/url/:id/delete',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/url/:id/delete"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/url/:id/delete");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "El enlace se ha eliminado correctamente"
}
```

## Saluran

Open in ChatGPT 

Open in Claude

### Canales de lista

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

Para obtener sus canales a través de la API, puede usar este punto de conexión. También puede filtrar datos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |

```
curl --location --request GET 'https://urlkai.com/api/channels?limit=2&page=1' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/channels?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/channels?limit=2&page=1',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/channels?limit=2&page=1"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/channels?limit=2&page=1");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": "0",
    "datos": {
        "resultado": 2,
        "por página": 2,
        "currentpage": 1,
        "página siguiente": 1,
        "maxpage": 1,
        "canales": [
            {
                "id": 1,
                "name": "Canal 1",
                "description": "Descripción del canal 1",
                "color": "#000000",
                "Estrellado": Verdadero
            },
            {
                "id": 2,
                "name": "Canal 2",
                "description": "Descripción del canal 2",
                "color": "#FF0000",
                "Estrellado": falso
            }
        ]
    }
}
```

### Enumerar elementos de canal

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

Para obtener elementos en un canal seleccionado a través de la API, puede usar este punto de conexión. También puede filtrar datos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| límite | (Opcional) Resultado de datos por página |
| página | (Opcional) Solicitud de página actual |

```
curl --location --request GET 'https://urlkai.com/api/channel/:id?limit=1&page=1' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/channel/:id?limit=1&page=1",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "OBTENER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'GET',
    'url': 'https://urlkai.com/api/channel/:id?limit=1&page=1',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/channel/:id?limit=1&page=1"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Get, "https://urlkai.com/api/channel/:id?limit=1&page=1");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": "0",
    "datos": {
        "resultado": 2,
        "por página": 2,
        "currentpage": 1,
        "página siguiente": 1,
        "maxpage": 1,
        "artículos": [
            {
                "type": "enlaces",
                "id": 1,
                "title": "Mi enlace de muestra",
                "vista previa": "https:\/\/google.com",
                "enlace": "https:\/\/urlkai.com\/google",
                "fecha": "2022-05-12"
            },
            {
                "tipo": "biografía",
                "id": 1,
                "title": "Mi biografía de muestra",
                "vista previa": "https:\/\/urlkai.com\/mybio",
                "link": "https:\/\/urlkai.com\/mybio",
                "fecha": "2022-06-01"
            }
        ]
    }
}
```

### Buat Saluran

EXPONER 
`https://urlkai.com/api/channel/add`

Se puede agregar un canal mediante este punto de conexión.

| Parámetro | Keterangan |
| --- | --- |
| nombre | (obligatorio) Nombre del canal |
| descripción | (Opcional) Descripción del canal |
| Color | (Opcional) Color del distintivo del canal (HEX) |
| estrellado | (Opcional) Estrella el canal o (verdadero o falso) |

```
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());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "id": 3,
    "nombre": "Nuevo Canal",
    "Descripción": "Mi nuevo canal",
    "color": "#000000",
    "Estrellado": Cierto
}
```

### Asignar un elemento a un canal

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

Un artículo se puede asignar a cualquier canal enviando una solicitud con el ID del canal, el tipo de elemento (enlaces, biografía o qr) y el ID del artículo.

| Parámetro | Keterangan |
| --- | --- |
| :channelid | (obligatorio) ID de canal |
| :tipo | (obligatorio) enlaces o biografía o QR |
| :itemid | (obligatorio) ID del artículo |

```
curl --location --request POST 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/channel/:channelid/assign/:type/:itemid",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PUBLICAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'POST',
    'url': 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/channel/:channelid/assign/:type/:itemid"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Post, "https://urlkai.com/api/channel/:channelid/assign/:type/:itemid");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "Artículo agregado con éxito al canal."
}
```

### Perbarui Saluran

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

Para actualizar un canal, debe enviar datos válidos en JSON a través de una solicitud PUT. Los datos deben enviarse como el cuerpo sin procesar de su solicitud como se muestra a continuación. En el ejemplo siguiente se muestran todos los parámetros que puede enviar, pero es necesario que los envíe todos (consulte la tabla para obtener más información).

| Parámetro | Keterangan |
| --- | --- |
| nombre | (Opcional) Nombre del canal |
| descripción | (Opcional) Descripción del canal |
| Color | (Opcional) Color del distintivo del canal (HEX) |
| estrellado | (Opcional) Estrella el canal o (verdadero o falso) |

```
curl --location --request PUT 'https://urlkai.com/api/channel/:id/update' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "nombre": "Acme Corp",
    "description": "canal de artículos para Acme Corp",
    "color": "#FFFFFF",
    "Estrellado": falso
}'
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/channel/:id/update",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "PONER",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    "nombre": "Acme Corp",
	    "description": "canal de artículos para Acme Corp",
	    "color": "#FFFFFF",
	    "Estrellado": falso
	}',
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'PUT',
    'url': 'https://urlkai.com/api/channel/:id/update',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    cuerpo: JSON.stringify({
    "nombre": "Acme Corp",
    "description": "canal de artículos para Acme Corp",
    "color": "#FFFFFF",
    "Estrellado": falso
}),
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/channel/:id/update"
carga útil = {
    "nombre": "Acme Corp",
    "description": "canal de artículos para Acme Corp",
    "color": "#FFFFFF",
    "Estrellado": falso
}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Put, "https://urlkai.com/api/channel/:id/update");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
    "nombre": "Acme Corp",
    "description": "canal de artículos para Acme Corp",
    "color": "#FFFFFF",
    "Estrellado": falso
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "El canal se ha actualizado correctamente".
}
```

### Eliminar canal

BORRAR 
`https://urlkai.com/api/channel/:id/delete`

Para eliminar un canal, debe enviar una solicitud DELETE. Todos los artículos también se desasignarán.

```
curl --location --request DELETE 'https://urlkai.com/api/channel/:id/delete' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
```

```
$curl = curl_init();

curl_setopt_array($curl, matriz(
    CURLOPT_URL => "https://urlkai.com/api/channel/:id/delete",
    CURLOPT_RETURNTRANSFER => verdadero,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => verdadero,
    CURLOPT_CUSTOMREQUEST => "ELIMINAR",
    CURLOPT_HTTPHEADER => [
        "Autorización: Portador YOURAPIKEY",
        "Tipo de contenido: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
eco $response;
```

```
var solicitud = require('solicitud');
opciones var = {
    'método': 'ELIMINAR',
    'url': 'https://urlkai.com/api/channel/:id/delete',
    'encabezados': {
        «Autorización»: «Portador YOURAPIKEY»,
        'Content-Type': 'application/json'
    },
    
};
request(opciones, función (error, respuesta) {
    if (error) lanza un nuevo Error(error);
    console.log(respuesta.cuerpo);
});
```

```
Solicitudes de importación
url = "https://urlkai.com/api/channel/:id/delete"
carga útil = {}
encabezados = {
    «Autorización»: «Portador YOURAPIKEY»,
    'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, json=payload)
print(respuesta.texto)
```

```
var cliente = nuevo HttpClient();
var solicitud = new HttpRequestMessage(HttpMethod.Delete, "https://urlkai.com/api/channel/:id/delete");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
```

#### Servidor Tanggapan

```
{
    "error": 0,
    "message": "El canal se ha eliminado correctamente".
}
```