Damit Anfragen vom System verarbeitet werden können, ist ein API-Schlüssel erforderlich. Sobald sich ein Benutzer registriert, wird automatisch ein API-Schlüssel für diesen Benutzer generiert. Der API-Schlüssel muss mit jeder Anfrage gesendet werden (siehe vollständiges Beispiel unten). Wenn der API-Schlüssel nicht gesendet wird oder abgelaufen ist, wird ein Fehler angezeigt. Bitte achten Sie darauf, Ihren API-Schlüssel geheim zu halten, mmm Missbrauch zu verhindern.
Um sich beim API-System zu authentifizieren, müssen Sie bei jeder Anfrage Ihren API-Schlüssel als Autorisierungstoken senden. Unten sehen Sie einen Beispielcode.
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());
Unsere API verfügt über einen Ratenbegrenzer zum Schutz vor Anfragenspitzen, mmm ihre Stabilität zu maximieren. Unser Ratenbegrenzer ist derzeit auf 30 Anfragen pro 1 Minute begrenzt. Tenga en cuenta que la tarifa puede cambiar según el plan suscrito.
Neben der Antwort werden mehrere Header gesendet, die untersucht werden können, mmm verschiedene Informationen über die Anfrage zu ermitteln.
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: TIMESTAMP
Alle API-Antworten werden standardmäßig im JSON-Format zurückgegeben. Um diese in verwertbare Daten umzuwandeln, muss je nach Sprache die entsprechende Funktion verwendet werden. In PHP kann die Funktion json_decode() verwendet werden, mmm die Daten entweder in ein Objekt (Standard) oder ein Array (den zweiten Parameter auf true zu setzen) zu konvertieren. Es ist sehr wichtig, den Fehlerschlüssel zu überprüfen, da er Auskunft darüber gibt, ob ein Fehler aufgetreten ist oder nicht. Sie können auch den Header-Code überprüfen.
{
"error": 1,
"message": "An error occurred"
}
https://urlkai.com/api/splash?limit=2&page=1
Para obtener páginas de presentación personalizadas 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 | Beschreibung |
---|---|
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());
{
"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"
}
]
}
}
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 | Beschreibung |
---|---|
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());
{
"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"
}
]
}
}
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 | Beschreibung |
---|---|
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());
{
"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"
}
]
}
}
https://urlkai.com/api/campaign/add
Se puede agregar una campaña mediante este punto de conexión.
Parámetro | Beschreibung |
---|---|
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 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Nueva Campaña",
"slug": "nueva-campaña",
"público": verdadero
}'
$curl = curl_init();
curl_setopt_array($curl, matriz(
CURLOPT_URL => "https://urlkai.com/api/campaign/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 =>
'{
"name": "Nueva Campaña",
"slug": "nueva-campaña",
"público": verdadero
}',
));
$response = curl_exec($curl);
curl_close($curl);
eco $response;
var solicitud = require('solicitud');
opciones var = {
'método': 'POST',
'url': 'https://urlkai.com/api/campaign/add',
'encabezados': {
«Autorización»: «Portador YOURAPIKEY»,
'Content-Type': 'application/json'
},
cuerpo: JSON.stringify({
"name": "Nueva Campaña",
"slug": "nueva-campaña",
"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/add"
carga útil = {
"name": "Nueva Campaña",
"slug": "nueva-campaña",
"público": verdadero
}
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/add");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
"name": "Nueva Campaña",
"slug": "nueva-campaña",
"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());
{
"error": 0,
"id": 3,
"domain": "Nueva Campaña",
"público": cierto,
"rotator": "https:\/\/domain.com\/r\/nueva-campaña",
"lista": "https:\/\/domain.com\/u\/admin\/new-campaign-3"
}
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());
{
"error": 0,
"message": "Enlace añadido con éxito a la campaña."
}
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 no es necesario que los envíe todos (consulte la tabla para obtener más información).
Parámetro | Beschreibung |
---|---|
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());
{
"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"
}
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());
{
"error": 0,
"message": "La campaña se ha eliminado con éxito".
}
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 | Beschreibung |
---|---|
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());
{
"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
}
]
}
}
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 | Beschreibung |
---|---|
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());
{
"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"
}
]
}
}
https://urlkai.com/api/channel/add
Se puede agregar un canal mediante este punto de conexión.
Parámetro | Beschreibung |
---|---|
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 no (verdadero o falso) |
curl --location --request POST 'https://urlkai.com/api/channel/add' \
--header 'Autorización: Portador YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Nuevo canal",
"description": "mi nuevo canal",
"color": "#000000",
"Estrellado": Verdadero
}'
$curl = curl_init();
curl_setopt_array($curl, matriz(
CURLOPT_URL => "https://urlkai.com/api/channel/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 =>
'{
"name": "Nuevo canal",
"description": "mi nuevo canal",
"color": "#000000",
"Estrellado": Verdadero
}',
));
$response = curl_exec($curl);
curl_close($curl);
eco $response;
var solicitud = require('solicitud');
opciones var = {
'método': 'POST',
'url': 'https://urlkai.com/api/channel/add',
'encabezados': {
«Autorización»: «Portador YOURAPIKEY»,
'Content-Type': 'application/json'
},
cuerpo: JSON.stringify({
"name": "Nuevo canal",
"description": "mi nuevo canal",
"color": "#000000",
"Estrellado": 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/channel/add"
carga útil = {
"name": "Nuevo canal",
"description": "mi nuevo canal",
"color": "#000000",
"Estrellado": Verdadero
}
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/add");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
"name": "Nuevo canal",
"description": "mi nuevo canal",
"color": "#000000",
"Estrellado": Verdadero
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
{
"error": 0,
"id": 3,
"name": "Nuevo canal",
"description": "mi nuevo canal",
"color": "#000000",
"Estrellado": Verdadero
}
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 | Beschreibung |
---|---|
: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());
{
"error": 0,
"message": "Artículo agregado con éxito al canal."
}
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 no es necesario que los envíe todos (consulte la tabla para obtener más información).
Parámetro | Beschreibung |
---|---|
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 no (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());
{
"error": 0,
"message": "El canal se ha actualizado correctamente".
}
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());
{
"error": 0,
"message": "El canal se ha eliminado correctamente".
}
https://urlkai.com/api/account
Um Informationen über das Konto zu erhalten, können Sie eine Anfrage an diesen Endpunkt senden, der Daten über das Konto zurückgibt.
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());
{
"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"
}
}
https://urlkai.com/api/account/update
Um Informationen zu dem Konto zu aktualisieren, können Sie eine Anfrage an diesen Endpunkt senden und er aktualisiert die Daten zu dem Konto.
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": "newpassword"
}'
$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": "newpassword"
}',
));
$response = curl_exec($curl);
curl_close($curl);
eco $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": "newpassword"
}),
};
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/update"
carga útil = {
"correo electrónico": " [correo electrónico protegido] ",
"password": "newpassword"
}
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/account/update");
pedir. Headers.Add("Autorización", "Portador YOURAPIKEY");
var contenido = new StringContent("{
"correo electrónico": " [correo electrónico protegido] ",
"password": "newpassword"
}", System.Text.Encoding.UTF8, "application/json");
pedir. Contenido = contenido;
var respuesta = esperar cliente. SendAsync(solicitud);
respuesta. EnsureSuccessStatusCode();
Console.WriteLine(await response. Content.ReadAsStringAsync());
{
"error": 0,
"message": "La cuenta se ha actualizado correctamente".
}
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 | Beschreibung |
---|---|
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());
{
"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"
}
]
}
}
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 | Beschreibung |
---|---|
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());
{
"error": 0,
"id": 1
}
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 no es necesario que los envíe todos (consulte la tabla para obtener más información).
Parámetro | Beschreibung |
---|---|
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());
{
"error": 0,
"message": "El dominio se ha actualizado correctamente".
}
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());
{
"error": 0,
"message": "El dominio se ha eliminado con éxito".
}
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 | Beschreibung |
---|---|
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());
{
"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"
}
]
}
}
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 | Beschreibung |
---|---|
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());
{
"error": 0,
"id": 1
}
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 no es necesario que los envíe todos (consulte la tabla para obtener más información).
Parámetro | Beschreibung |
---|---|
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());
{
"error": 0,
"message": "Pixel se ha actualizado correctamente".
}
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());
{
"error": 0,
"message": "El píxel se ha eliminado correctamente".
}
https://urlkai.com/api/qr?limit=2&page=1
Um Ihre QR-Codes über die API abzurufen, können Sie diesen Endpunkt verwenden. Sie können Daten auch filtern (weitere Informationen finden Sie in der Tabelle).
Parámetro | Beschreibung |
---|---|
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());
{
"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"
}
]
}
}
https://urlkai.com/api/qr/:id
Um Details für einen einzelnen QR-Code über die API abzurufen, können Sie diesen Endpunkt verwenden.
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());
{
"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
}
}
}
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 no es necesario que los envíe todos (consulte la tabla para obtener más información).
Parámetro | Beschreibung |
---|---|
tipo | Texto (obligatorio) | vCard | Enlace | Correo electrónico | Teléfono | 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 plano | (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());
{
"error": 0,
"id": 3,
"enlace": "https:\/\/urlkai.com\/qr\/a58f79"
}
https://urlkai.com/api/qr/:id/update
Um einen QR-Code zu aktualisieren, müssen Sie gültige Daten in JSON über eine PUT-Anforderung senden. Die Daten müssen wie unten gezeigt als Rohtext Ihrer Anfrage gesendet werden. Das folgende Beispiel zeigt alle Parameter, die Sie senden können, aber Sie müssen nicht alle senden (siehe Tabelle für weitere Informationen).
Parámetro | Beschreibung |
---|---|
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 plano | (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());
{
"error": 0,
"message": "QR se ha actualizado con éxito".
}
https://urlkai.com/api/qr/:id/delete
Um einen QR-Code zu löschen, müssen Sie eine DELETE-Anfrage senden.
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());
{
"error": 0,
"message": "El código QR se ha eliminado correctamente".
}
https://urlkai.com/api/urls?limit=2&page=1o=date
Um Ihre Links über die API zu erhalten, können Sie diesen Endpunkt verwenden. Sie können Daten auch filtern (weitere Informationen finden Sie in der Tabelle).
Parámetro | Beschreibung |
---|---|
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());
{
"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"
}
]
}
}
https://urlkai.com/api/url/:id
Um Details für einen einzelnen Link über die API abzurufen, können Sie diesen Endpunkt verwenden.
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());
{
"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
}
}
}
https://urlkai.com/api/url/add
Um einen Link zu kürzen, müssen Sie gültige Daten in JSON über eine POST-Anforderung senden. Die Daten müssen wie unten gezeigt als Rohtext Ihrer Anfrage gesendet werden. Das folgende Beispiel zeigt alle Parameter, die Sie senden können, aber Sie müssen nicht alle senden (siehe Tabelle für weitere Informationen).
Parámetro | Beschreibung |
---|---|
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 |
Destino del 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 orientación del dispositivo. (Nuevo) Ahora puede establecer el parámetro "auto" en true 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());
{
"error": 0,
"id": 3,
"shorturl": "https:\/\/urlkai.com\/google"
}
https://urlkai.com/api/url/:id/update
Um einen Link zu aktualisieren, müssen Sie gültige Daten in JSON über eine PUT-Anforderung senden. Die Daten müssen wie unten gezeigt als Rohtext Ihrer Anfrage gesendet werden. Das folgende Beispiel zeigt alle Parameter, die Sie senden können, aber Sie müssen nicht alle senden (siehe Tabelle für weitere Informationen).
Parámetro | Beschreibung |
---|---|
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 |
Destino del 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());
{
"error": 0,
"id": 3,
"corto": "https:\/\/urlkai.com\/google"
}
https://urlkai.com/api/url/:id/delete
Um einen Link zu löschen, müssen Sie eine DELETE-Anfrage senden.
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());
{
"error": 0,
"message": "El enlace se ha eliminado correctamente"
}