Riferimento API per sviluppatori

Iniziare

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

Autenticazione

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

curl --location --request POST 'https://urlkai.com/api/account' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;
curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/account »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « POST »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
));

$response = curl_exec($curl) ; 
var request = require('request') ;
options var = {
    'method' : 'POST',
    'url' : 'https://urlkai.com/api/account',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : ''
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/account »
charge utile = {}
en-têtes = {
  'Autorisation' : 'Porteur YOURAPIKEY',
  'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/account ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Limite di tariffa

La nostra API ha un limitatore di velocità per salvaguardare da picchi di richieste per massimizzarne la stabilità. Il nostro limitatore di velocità è attualmente limitato a 30 richieste al 1 minuto. Veuillez noter que le tarif peut changer en fonction du forfait souscrit.

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

X-RateLimit-Limit : 30 
X-RateLimit-Restant : 29
X-RateLimit-Reset : TIMESTAMP
Gestione della risposta

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

{
    « error » : 1,
    « message » : « Une erreur s’est produite »
} 

Compte

Compte Ottieni
GET https://urlkai.com/api/account

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

curl --location --request GET 'https://urlkai.com/api/account' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/account »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/account',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/account »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/account ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « données » : {
        « id » : 1,
        « email » : » [email protected] ",
        « username » : « sampleuser »,
        « avatar » : « https :\/\/domain.com\/content\/avatar.png »,
        « status » : « pro »,
        « expire » : « 2022-11-15 15:00:00 »,
        « registered » : « 2020-11-10 18:01:43 »
    }
} 
Compte Aggiorna
PUT https://urlkai.com/api/account/update

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

curl --location --request PUT 'https://urlkai.com/api/account/update' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « email » : » [email protected] ",
    « password » : « nouveaumot de passe »
}' 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/account/update »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « METTRE »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « email » : » [email protected] ",
	    « password » : « nouveaumot de passe »
	}',
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'PUT',
    'url' : 'https://urlkai.com/api/account/update',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « email » : » [email protected] ",
    « password » : « nouveaumot de passe »
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/account/update »
charge utile = {
    « email » : » [email protected] ",
    « password » : « nouveaumot de passe »
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« PUT », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Put, « https://urlkai.com/api/account/update ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « email » : » [email protected] ",
    « password » : « nouveaumot de passe »
} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « Le compte a été mis à jour avec succès. »
} 

Campagne

Campagnes de liste
GET https://urlkai.com/api/campaigns?limit=2&page=1

Pour obtenir vos campagnes via l’API, vous pouvez utiliser ce point de terminaison. Vous pouvez également filtrer les données (voir le tableau pour plus d’informations).

Paramétro Description
limite (facultatif) Résultat des données par page
page (facultatif) Demande de page actuelle
curl --location --request GET 'https://urlkai.com/api/campaigns?limit=2&page=1' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/campaigns?limit=2&page=1 »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/campaigns?limit=2&page=1',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/campaigns?limit=2&page=1 »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/campaigns?limit=2&page=1 ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : « 0 »,
    « données » : {
        « résultat » : 2,
        « perpage » : 2,
        « currentpage » : 1,
        « page suivante » : 1,
        « maxpage » : 1,
        « campagnes » : [
            {
                « id » : 1,
                « name » : « Exemple de campagne »,
                « public » : faux,
                « rotator » : faux,
                « list » : « https :\/\/domain.com\/u\/admin\/list-1 »
            },
            {
                « id » : 2,
                « domain » : « Campagne Facebook »,
                « public » : vrai,
                « rotator » : « https :\/\/domain.com\/r\/test »,
                « list » : « https :\/\/domain.com\/u\/admin\/test-2 »
            }
        ]
    }
} 
Crea una campagna
POST https://urlkai.com/api/campaign/add

Une campagne peut être ajoutée à l’aide de ce point de terminaison.

Paramétro Description
nom (facultatif) Nom de la campagne
limace (facultatif) Limace du rotateur
public (facultatif) Accès
curl --location --request POST 'https://urlkai.com/api/campaign/add' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « name » : « Nouvelle campagne »,
    « slug » : « nouvelle-campagne »,
    « public » : vrai
}' 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/campaign/add »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « POST »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « name » : « Nouvelle campagne »,
	    « slug » : « nouvelle-campagne »,
	    « public » : vrai
	}',
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'POST',
    'url' : 'https://urlkai.com/api/campaign/add',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « name » : « Nouvelle campagne »,
    « slug » : « nouvelle-campagne »,
    « public » : vrai
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/campaign/add »
charge utile = {
    « name » : « Nouvelle campagne »,
    « slug » : « nouvelle-campagne »,
    « public » : vrai
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« POST », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Post, « https://urlkai.com/api/campaign/add ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « name » : « Nouvelle campagne »,
    « slug » : « nouvelle-campagne »,
    « public » : vrai
} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « id » : 3,
    « domain » : « Nouvelle campagne »,
    « public » : vrai,
    « rotator » : « https :\/\/domain.com\/r\/new-campaign »,
    « list » : « https :\/\/domain.com\/u\/admin\/new-campaign-3 »
} 
POST https://urlkai.com/api/campaign/:campaignid/assign/:linkid

Un lien court peut être attribué à une campagne à l’aide de ce point de terminaison. Le point de terminaison nécessite l’ID de la campagne et l’ID du lien court.

curl --location --request POST 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/campaign/:campaignid/assign/:linkid »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « POST »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'POST',
    'url' : 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/campaign/:campaignid/assign/:linkid »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« POST », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Post, « https://urlkai.com/api/campaign/:campaignid/assign/:linkid ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « Lien ajouté avec succès à la campagne. »
} 
Aggiorna campagna
PUT https://urlkai.com/api/campaign/:id/update

Pour mettre à jour une campagne, vous devez envoyer des données valides en JSON via une requête PUT. Les données doivent être envoyées dans le corps brut de votre demande, comme indiqué ci-dessous. L’exemple ci-dessous montre tous les paramètres que vous pouvez envoyer, mais vous n’êtes pas obligé de tous les envoyer (voir le tableau pour plus d’informations).

Paramétro Description
nom (obligatoire) Nom de la campagne
limace (facultatif) Limace du rotateur
public (facultatif) Accès
curl --location --request PUT 'https://urlkai.com/api/campaign/:id/update' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « name » : « Campagne Twitter »,
    « slug » : « campagne-twitter »,
    « public » : vrai
}' 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/campaign/:id/update »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « METTRE »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « name » : « Campagne Twitter »,
	    « slug » : « campagne-twitter »,
	    « public » : vrai
	}',
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'PUT',
    'url' : 'https://urlkai.com/api/campaign/:id/update',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « name » : « Campagne Twitter »,
    « slug » : « campagne-twitter »,
    « public » : vrai
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/campaign/:id/update »
charge utile = {
    « name » : « Campagne Twitter »,
    « slug » : « campagne-twitter »,
    « public » : vrai
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« PUT », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Put, « https://urlkai.com/api/campaign/:id/update ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « name » : « Campagne Twitter »,
    « slug » : « campagne-twitter »,
    « public » : vrai
} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « id » : 3,
    « domain » : « Campagne Twitter »,
    « public » : vrai,
    « rotator » : « https :\/\/domain.com\/r\/twitter-campaign »,
    « list » : « https :\/\/domain.com\/u\/admin\/twitter-campaign-3 »
} 
Supprimer la campagne
DELETE https://urlkai.com/api/campaign/:id/delete

Pour supprimer une campagne, vous devez envoyer une demande DELETE.

curl --location --request DELETE 'https://urlkai.com/api/campaign/:id/delete' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/campaign/:id/delete »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « SUPPRIMER »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'SUPPRIMER',
    'url' : 'https://urlkai.com/api/campaign/:id/delete',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/campaign/:id/delete »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« DELETE », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Delete, « https://urlkai.com/api/campaign/:id/delete ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « La campagne a été supprimée avec succès. »
} 

Canali

Liste des chaînes
GET https://urlkai.com/api/channels?limit=2&page=1

Pour obtenir vos chaînes via l’API, vous pouvez utiliser ce point de terminaison. Vous pouvez également filtrer les données (voir le tableau pour plus d’informations).

Paramétro Description
limite (facultatif) Résultat des données par page
page (facultatif) Demande de page actuelle
curl --location --request GET 'https://urlkai.com/api/channels?limit=2&page=1' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/channels?limit=2&page=1 »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/channels?limit=2&page=1',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/channels?limit=2&page=1 »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/channels?limit=2&page=1 ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : « 0 »,
    « données » : {
        « résultat » : 2,
        « perpage » : 2,
        « currentpage » : 1,
        « page suivante » : 1,
        « maxpage » : 1,
        « chaînes » : [
            {
                « id » : 1,
                « name » : « Canal 1 »,
                « description » : « Description du canal 1 »,
                « color » : « #000000 »,
                « étoilé » : vrai
            },
            {
                « id » : 2,
                « name » : « Canal 2 »,
                « description » : « Description du canal 2 »,
                « color » : « #FF0000 »,
                « starred » : faux
            }
        ]
    }
} 
Liste des éléments de chaîne
GET https://urlkai.com/api/channel/:id?limit=1&page=1

Pour obtenir des éléments dans un canal sélectionné via l’API, vous pouvez utiliser ce point de terminaison. Vous pouvez également filtrer les données (voir le tableau pour plus d’informations).

Paramétro Description
limite (facultatif) Résultat des données par page
page (facultatif) Demande de page actuelle
curl --location --request GET 'https://urlkai.com/api/channel/:id?limit=1&page=1' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/channel/:id?limit=1&page=1 »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/channel/:id?limit=1&page=1',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/channel/:id?limit=1&page=1 »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/channel/:id?limit=1&page=1 ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : « 0 »,
    « données » : {
        « résultat » : 2,
        « perpage » : 2,
        « currentpage » : 1,
        « page suivante » : 1,
        « maxpage » : 1,
        « items » : [
            {
                « type » : « liens »,
                « id » : 1,
                « title » : « Mon exemple de lien »,
                « preview » : « https :\/\/google.com »,
                « link » : « https :\/\/urlkai.com\/google »,
                « date » : « 2022-05-12 »
            },
            {
                « type » : « bio »,
                « id » : 1,
                « title » : « Mon échantillon de biographie »,
                « preview » : « https :\/\/urlkai.com\/mybio »,
                « link » : « https :\/\/urlkai.com\/mybio »,
                « date » : « 2022-06-01 »
            }
        ]
    }
} 
Crea un canale
POST https://urlkai.com/api/channel/add

Un canal peut être ajouté à l’aide de ce point de terminaison.

Paramétro Description
nom (obligatoire) Nom de la chaîne
description (facultatif) Description de la chaîne
Couleur (facultatif) Couleur de l’insigne de canal (HEX)
Joué (facultatif) Marquez la chaîne d’une étoile ou non (vrai ou faux)
curl --location --request POST 'https://urlkai.com/api/channel/add' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « name » : « Nouvelle chaîne »,
    « description » : « Ma nouvelle chaîne »,
    « color » : « #000000 »,
    « étoilé » : vrai
}' 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/channel/add »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « POST »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « name » : « Nouvelle chaîne »,
	    « description » : « Ma nouvelle chaîne »,
	    « color » : « #000000 »,
	    « étoilé » : vrai
	}',
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'POST',
    'url' : 'https://urlkai.com/api/channel/add',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « name » : « Nouvelle chaîne »,
    « description » : « Ma nouvelle chaîne »,
    « color » : « #000000 »,
    « étoilé » : vrai
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/channel/add »
charge utile = {
    « name » : « Nouvelle chaîne »,
    « description » : « Ma nouvelle chaîne »,
    « color » : « #000000 »,
    « étoilé » : vrai
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« POST », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Post, « https://urlkai.com/api/channel/add ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « name » : « Nouvelle chaîne »,
    « description » : « Ma nouvelle chaîne »,
    « color » : « #000000 »,
    « étoilé » : vrai
} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « id » : 3,
    « name » : « Nouvelle chaîne »,
    « description » : « Ma nouvelle chaîne »,
    « color » : « #000000 »,
    « étoilé » : vrai
} 
Attribuer un élément à un canal
POST https://urlkai.com/api/channel/:channelid/assign/:type/:itemid

Un élément peut être attribué à n’importe quel canal en envoyant une demande avec l’identifiant du canal, le type d’élément (liens, biographie ou QR) et l’identifiant de l’élément.

Paramétro Description
:channelid (obligatoire) ID de la chaîne
:type (obligatoire) liens ou biographie ou QR
:itemid (obligatoire) ID de l’objet
curl --location --request POST 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/channel/:channelid/assign/:type/:itemid »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « POST »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'POST',
    'url' : 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/channel/:channelid/assign/:type/:itemid »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« POST », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Post, « https://urlkai.com/api/channel/:channelid/assign/:type/:itemid ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « L’élément a été ajouté avec succès au canal. »
} 
Aggiorna canale
PUT https://urlkai.com/api/channel/:id/update

Pour mettre à jour un canal, vous devez envoyer des données valides en JSON via une requête PUT. Les données doivent être envoyées dans le corps brut de votre demande, comme indiqué ci-dessous. L’exemple ci-dessous montre tous les paramètres que vous pouvez envoyer, mais vous n’êtes pas obligé de tous les envoyer (voir le tableau pour plus d’informations).

Paramétro Description
nom (facultatif) Nom de la chaîne
description (facultatif) Description de la chaîne
Couleur (facultatif) Couleur de l’insigne de canal (HEX)
Joué (facultatif) Marquez la chaîne d’une étoile ou non (vrai ou faux)
curl --location --request PUT 'https://urlkai.com/api/channel/:id/update' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « name » : « Acme Corp »,
    « description » : « canal pour les articles pour Acme Corp »,
    « color » : « #FFFFFF »,
    « starred » : faux
}' 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/channel/:id/update »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « METTRE »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « name » : « Acme Corp »,
	    « description » : « canal pour les articles pour Acme Corp »,
	    « color » : « #FFFFFF »,
	    « starred » : faux
	}',
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'PUT',
    'url' : 'https://urlkai.com/api/channel/:id/update',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « name » : « Acme Corp »,
    « description » : « canal pour les articles pour Acme Corp »,
    « color » : « #FFFFFF »,
    « starred » : faux
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/channel/:id/update »
charge utile = {
    « name » : « Acme Corp »,
    « description » : « canal pour les articles pour Acme Corp »,
    « color » : « #FFFFFF »,
    « starred » : faux
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« PUT », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Put, « https://urlkai.com/api/channel/:id/update ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « name » : « Acme Corp »,
    « description » : « canal pour les articles pour Acme Corp »,
    « color » : « #FFFFFF »,
    « starred » : faux
} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « La chaîne a été mise à jour avec succès. »
} 
Supprimer la chaîne
DELETE https://urlkai.com/api/channel/:id/delete

Pour supprimer un canal, vous devez envoyer une demande DELETE. Tous les éléments seront également désattribués.

curl --location --request DELETE 'https://urlkai.com/api/channel/:id/delete' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/channel/:id/delete »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « SUPPRIMER »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'SUPPRIMER',
    'url' : 'https://urlkai.com/api/channel/:id/delete',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/channel/:id/delete »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« DELETE », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Delete, « https://urlkai.com/api/channel/:id/delete ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « La chaîne a été supprimée avec succès. »
} 

Codici QR

Liste des codes QR
GET https://urlkai.com/api/qr?limit=2&page=1

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

Paramétro Description
limite (facultatif) Résultat des données par page
page (facultatif) Demande de page actuelle
curl --location --request GET 'https://urlkai.com/api/qr?limit=2&page=1' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/qr?limit=2&page=1 »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/qr?limit=2&page=1',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/qr?limit=2&page=1 »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/qr?limit=2&page=1 ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : « 0 »,
    « données » : {
        « résultat » : 2,
        « perpage » : 2,
        « currentpage » : 1,
        « page suivante » : 1,
        « maxpage » : 1,
        « QRS » : [
            {
                « id » : 2,
                « link » : « https :\/\/urlkai.com\/qr\/a2d5e »,
                « scans » : 0,
                « name » : « Google »,
                « date » : « 2020-11-10 18:01:43 »
            },
            {
                « id » : 1,
                « link » : « https :\/\/urlkai.com\/qr\/b9edfe »,
                « scans » : 5,
                « name » : « Google Canada »,
                « date » : « 2020-11-10 18:00:25 »
            }
        ]
    }
} 
Ottieni un unico QR Code
GET https://urlkai.com/api/qr/:id

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

curl --location --request GET 'https://urlkai.com/api/qr/:id' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/qr/:id »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/qr/:id',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/qr/:id »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/qr/:id ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « détails » : {
        « id » : 1,
        « link » : « https :\/\/urlkai.com\/qr\/b9edfe »,
        « scans » : 5,
        « name » : « Google Canada »,
        « date » : « 2020-11-10 18:00:25 »
    },
    « données » : {
        « clics » : 1,
        « uniqueClicks » : 1,
        « topCountries » : {
            « Inconnu » : « 1 »
        },
        « topReferrers » : {
            « Direct, email et autres » : « 1 »
        },
        « topBrowsers » : {
            « Chrome » : « 1 »
        },
        « topOs » : {
            « Windows 10 » : « 1 »
        },
        « socialCount » : {
            « Facebook » : 0,
            « twitter » : 0,
            « Instagram » : 0
        }
    }
} 
Crea un codice QR
POST https://urlkai.com/api/qr/add

Pour créer un QR Code, vous devez envoyer des données valides en JSON via une requête POST. Les données doivent être envoyées dans le corps brut de votre demande, comme indiqué ci-dessous. L’exemple ci-dessous montre tous les paramètres que vous pouvez envoyer, mais vous n’êtes pas obligé de tous les envoyer (voir le tableau pour plus d’informations).

Paramétro Description
type Texte (obligatoire) | vcard | lien | Courriel | Téléphone | Par SMS | Wifi
données (obligatoire) Les données doivent être intégrées dans le code QR. Les données peuvent être des chaînes ou des tableaux selon le type
arrière-plan (facultatif) Couleur RVB, par exemple rgb(255,255,255)
premier plan (facultatif) Couleur RVB, par exemple rgb(0,0,0)
logo (facultatif) Chemin d’accès au logo png ou jpg
curl --location --request POST 'https://urlkai.com/api/qr/add' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « type » : « lien »,
    « 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, array(
    CURLOPT_URL => « https://urlkai.com/api/qr/add »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « POST »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « type » : « lien »,
	    « 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) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'POST',
    'url' : 'https://urlkai.com/api/qr/add',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « type » : « lien »,
    « data » : « https :\/\/google.com »,
    « background » : « rgb(255,255,255) »,
    « foreground » : « rgb(0,0,0) »,
    « logo » : « https :\/\/site.com\/logo.png »
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/qr/add »
charge utile = {
    « type » : « lien »,
    « data » : « https://google.com »,
    « background » : « rgb(255,255,255) »,
    « foreground » : « rgb(0,0,0) »,
    « logo » : « https://site.com/logo.png »
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« POST », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Post, « https://urlkai.com/api/qr/add ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « type » : « lien »,
    « 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 ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « id » : 3,
    « link » : « https :\/\/urlkai.com\/QR\/A58F79 »
} 
Mettre à jour le code QR
PUT https://urlkai.com/api/qr/:id/update

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

Paramétro Description
données (obligatoire) Les données doivent être intégrées dans le code QR. Les données peuvent être des chaînes ou des tableaux selon le type
arrière-plan (facultatif) Couleur RVB, par exemple rgb(255,255,255)
premier plan (facultatif) Couleur RVB, par exemple rgb(0,0,0)
logo (facultatif) Chemin d’accès au logo png ou jpg
curl --location --request PUT 'https://urlkai.com/api/qr/:id/update' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « type » : « lien »,
    « 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, array(
    CURLOPT_URL => « https://urlkai.com/api/qr/:id/update »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « METTRE »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « type » : « lien »,
	    « 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) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'PUT',
    'url' : 'https://urlkai.com/api/qr/:id/update',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « type » : « lien »,
    « data » : « https :\/\/google.com »,
    « background » : « rgb(255,255,255) »,
    « foreground » : « rgb(0,0,0) »,
    « logo » : « https :\/\/site.com\/logo.png »
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/qr/:id/update »
charge utile = {
    « type » : « lien »,
    « data » : « https://google.com »,
    « background » : « rgb(255,255,255) »,
    « foreground » : « rgb(0,0,0) »,
    « logo » : « https://site.com/logo.png »
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« PUT », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Put, « https://urlkai.com/api/qr/:id/update ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « type » : « lien »,
    « 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 ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « Le QR a été mis à jour avec succès. »
} 
Elimina un codice QR
DELETE https://urlkai.com/api/qr/:id/delete

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

curl --location --request DELETE 'https://urlkai.com/api/qr/:id/delete' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/qr/:id/delete »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « SUPPRIMER »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'SUPPRIMER',
    'url' : 'https://urlkai.com/api/qr/:id/delete',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/qr/:id/delete »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« DELETE », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Delete, « https://urlkai.com/api/qr/:id/delete ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « Le code QR a été supprimé avec succès. »
} 

Domini di marca

Liste des domaines de marque
GET https://urlkai.com/api/domains?limit=2&page=1

Pour obtenir vos domaines de marque via l’API, vous pouvez utiliser ce point de terminaison. Vous pouvez également filtrer les données (voir le tableau pour plus d’informations).

Paramétro Description
limite (facultatif) Résultat des données par page
page (facultatif) Demande de page actuelle
curl --location --request GET 'https://urlkai.com/api/domains?limit=2&page=1' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/domains?limit=2&page=1 »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/domains?limit=2&page=1',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/domains?limit=2&page=1 »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/domains?limit=2&page=1 ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : « 0 »,
    « données » : {
        « résultat » : 2,
        « perpage » : 2,
        « currentpage » : 1,
        « page suivante » : 1,
        « maxpage » : 1,
        « domaines » : [
            {
                « id » : 1,
                « domain » : « https :\/\/domain1.com »,
                « redirectroot » : « https :\/\/rootdomain.com »,
                « redirect404 » : « https :\/\/rootdomain.com\/404 »
            },
            {
                « id » : 2,
                « domain » : « https :\/\/domain2.com »,
                « redirectroot » : « https :\/\/rootdomain2.com »,
                « redirect404 » : « https :\/\/rootdomain2.com\/404 »
            }
        ]
    }
} 
Créer un domaine de marque
POST https://urlkai.com/api/domain/add

Un domaine peut être ajouté à l’aide de ce point de terminaison. Veuillez vous assurer que le domaine est correctement pointé vers notre serveur.

Paramétro Description
domaine (obligatoire) Domaine de marque incluant http ou https
redirectroot (facultatif) Redirection racine lorsque quelqu’un visite votre domaine
redirect404 (facultatif) Redirection 404 personnalisée
curl --location --request POST 'https://urlkai.com/api/domain/add' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « domain » : « https :\/\/domain1.com »,
    « redirectroot » : « https :\/\/rootdomain.com »,
    « redirect404 » : « https :\/\/rootdomain.com\/404 »
}' 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/domain/add »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « POST »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « domain » : « https :\/\/domain1.com »,
	    « redirectroot » : « https :\/\/rootdomain.com »,
	    « redirect404 » : « https :\/\/rootdomain.com\/404 »
	}',
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'POST',
    'url' : 'https://urlkai.com/api/domain/add',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « domain » : « https :\/\/domain1.com »,
    « redirectroot » : « https :\/\/rootdomain.com »,
    « redirect404 » : « https :\/\/rootdomain.com\/404 »
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/domain/add »
charge utile = {
    « domain » : « https://domain1.com »,
    « redirectroot » : « https://rootdomain.com »,
    « redirect404 » : « https://rootdomain.com/404 »
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« POST », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Post, « https://urlkai.com/api/domain/add ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « domain » : « https :\/\/domain1.com »,
    « redirectroot » : « https :\/\/rootdomain.com »,
    « redirect404 » : « https :\/\/rootdomain.com\/404 »
} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « id » : 1
} 
Aggiorna dominio
PUT https://urlkai.com/api/domain/:id/update

Pour mettre à jour un domaine de marque, vous devez envoyer des données valides en JSON via une requête PUT. Les données doivent être envoyées dans le corps brut de votre demande, comme indiqué ci-dessous. L’exemple ci-dessous montre tous les paramètres que vous pouvez envoyer, mais vous n’êtes pas obligé de tous les envoyer (voir le tableau pour plus d’informations).

Paramétro Description
redirectroot (facultatif) Redirection racine lorsque quelqu’un visite votre domaine
redirect404 (facultatif) Redirection 404 personnalisée
curl --location --request PUT 'https://urlkai.com/api/domain/:id/update' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « redirectroot » : « https :\/\/rootdomain-new.com »,
    « redirect404 » : « https :\/\/rootdomain-new.com\/404 »
}' 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/domain/:id/update »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « METTRE »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « redirectroot » : « https :\/\/rootdomain-new.com »,
	    « redirect404 » : « https :\/\/rootdomain-new.com\/404 »
	}',
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'PUT',
    'url' : 'https://urlkai.com/api/domain/:id/update',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « redirectroot » : « https :\/\/rootdomain-new.com »,
    « redirect404 » : « https :\/\/rootdomain-new.com\/404 »
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/domain/:id/update »
charge utile = {
    « redirectroot » : « https://rootdomain-new.com »,
    « redirect404 » : « https://rootdomain-new.com/404 »
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« PUT », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Put, « https://urlkai.com/api/domain/:id/update ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « redirectroot » : « https :\/\/rootdomain-new.com »,
    « redirect404 » : « https :\/\/rootdomain-new.com\/404 »
} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « Le domaine a été mis à jour avec succès. »
} 
Supprimer le domaine
DELETE https://urlkai.com/api/domain/:id/delete

Pour supprimer un domaine, vous devez envoyer une demande DELETE.

curl --location --request SUPPRIMER 'https://urlkai.com/api/domain/:id/delete' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/domain/:id/delete »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « SUPPRIMER »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'SUPPRIMER',
    'url' : 'https://urlkai.com/api/domain/:id/delete',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/domain/:id/delete »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« DELETE », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Delete, « https://urlkai.com/api/domain/:id/delete ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « Le domaine a été supprimé avec succès. »
} 

Liens


CTA de superposition

Liste des superpositions CTA
GET https://urlkai.com/api/overlay?limit=2&page=1

Pour obtenir des superpositions de cta via l’API, vous pouvez utiliser ce point de terminaison. Vous pouvez également filtrer les données (voir le tableau pour plus d’informations).

Paramétro Description
limite (facultatif) Résultat des données par page
page (facultatif) Demande de page actuelle
curl --location --request GET 'https://urlkai.com/api/overlay?limit=2&page=1' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/overlay?limit=2&page=1 »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/overlay?limit=2&page=1',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/overlay?limit=2&page=1 »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/overlay?limit=2&page=1 ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : « 0 »,
    « données » : {
        « résultat » : 2,
        « perpage » : 2,
        « currentpage » : 1,
        « page suivante » : 1,
        « maxpage » : 1,
        « CTA » : [
            {
                « id » : 1,
                « type » : « message »,
                « name » : « Promo Produit 1 »,
                « date » : « 2020-11-10 18:00:00 »
            },
            {
                « id » : 2,
                « type » : « contact »,
                « name » : « Page de contact »,
                « date » : « 2020-11-10 18:10:00 »
            }
        ]
    }
} 

Pixels

Liste des pixels
GET https://urlkai.com/api/pixels?limit=2&page=1

Pour obtenir vos codes de pixels via l’API, vous pouvez utiliser ce point de terminaison. Vous pouvez également filtrer les données (voir le tableau pour plus d’informations).

Paramétro Description
limite (facultatif) Résultat des données par page
page (facultatif) Demande de page actuelle
curl --location --request GET 'https://urlkai.com/api/pixels?limit=2&page=1' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/pixels?limit=2&page=1 »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/pixels?limit=2&page=1',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/pixels?limit=2&page=1 »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/pixels?limit=2&page=1 ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : « 0 »,
    « données » : {
        « résultat » : 2,
        « perpage » : 2,
        « currentpage » : 1,
        « page suivante » : 1,
        « maxpage » : 1,
        « pixels » : [
            {
                « id » : 1,
                « type » : « gtmpixel »,
                « name » : « GTM Pixel »,
                « tag » : « GA-123456789 »,
                « date » : « 2020-11-10 18:00:00 »
            },
            {
                « id » : 2,
                « type » : « twitterpixel »,
                « name » : « Pixel Twitter »,
                « tag » : « 1234567 »,
                « date » : « 2020-11-10 18:10:00 »
            }
        ]
    }
} 
Créer un pixel
POST https://urlkai.com/api/pixel/add

Un pixel peut être créé à l’aide de ce point de terminaison. Vous devez envoyer le type de pixel et la balise.

Paramétro Description
type (obligatoire) gtmpixel | gapixel | fbpixel | AdWordsPixel | Linkedinpixel | Pixel Twitter | Adrollpixel | QuoraPixel | Pinterest | Bing | Instantané | Reddit | Tiktok
nom (obligatoire) Nom personnalisé de votre pixel
étiquette (obligatoire) La balise du pixel
curl --location --request POST 'https://urlkai.com/api/pixel/add' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « type » : « gtmpixel »,
    « name » : « Mon GTM »,
    « tag » : « GTM-ABCDE »
}' 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/pixel/add »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « POST »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « type » : « gtmpixel »,
	    « name » : « Mon GTM »,
	    « tag » : « GTM-ABCDE »
	}',
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'POST',
    'url' : 'https://urlkai.com/api/pixel/add',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « type » : « gtmpixel »,
    « name » : « Mon GTM »,
    « tag » : « GTM-ABCDE »
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/pixel/add »
charge utile = {
    « type » : « gtmpixel »,
    « name » : « Mon GTM »,
    « tag » : « GTM-ABCDE »
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« POST », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Post, « https://urlkai.com/api/pixel/add ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « type » : « gtmpixel »,
    « name » : « Mon GTM »,
    « tag » : « GTM-ABCDE »
} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « id » : 1
} 
Aggiorna Pixel
PUT https://urlkai.com/api/pixel/:id/update

Pour mettre à jour un pixel, vous devez envoyer des données valides en JSON via une requête PUT. Les données doivent être envoyées dans le corps brut de votre demande, comme indiqué ci-dessous. L’exemple ci-dessous montre tous les paramètres que vous pouvez envoyer, mais vous n’êtes pas obligé de tous les envoyer (voir le tableau pour plus d’informations).

Paramétro Description
nom (facultatif) Nom personnalisé de votre pixel
étiquette (obligatoire) La balise du pixel
curl --location --request PUT 'https://urlkai.com/api/pixel/:id/update' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \
--data-raw '{
    « name » : « Mon GTM »,
    « tag » : « GTM-ABCDE »
}' 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/pixel/:id/update »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « METTRE »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    CURLOPT_POSTFIELDS => 
        '{
	    « name » : « Mon GTM »,
	    « tag » : « GTM-ABCDE »
	}',
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'PUT',
    'url' : 'https://urlkai.com/api/pixel/:id/update',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    corps : JSON.stringify({
    « name » : « Mon GTM »,
    « tag » : « GTM-ABCDE »
}),
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/pixel/:id/update »
charge utile = {
    « name » : « Mon GTM »,
    « tag » : « GTM-ABCDE »
}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« PUT », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Put, « https://urlkai.com/api/pixel/:id/update ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent("{
    « name » : « Mon GTM »,
    « tag » : « GTM-ABCDE »
} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « Le pixel a été mis à jour avec succès. »
} 
Supprimer le pixel
DELETE https://urlkai.com/api/pixel/:id/delete

Pour supprimer un pixel, vous devez envoyer une requête DELETE.

curl --location --request DELETE 'https://urlkai.com/api/pixel/:id/delete' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/pixel/:id/delete »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « SUPPRIMER »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'SUPPRIMER',
    'url' : 'https://urlkai.com/api/pixel/:id/delete',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/pixel/:id/delete »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« DELETE », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Delete, « https://urlkai.com/api/pixel/:id/delete ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : 0,
    « message » : « Le pixel a été supprimé avec succès. »
} 

Splash personalizzato

Liste Custom Splash
GET https://urlkai.com/api/splash?limit=2&page=1

Pour obtenir des pages d’accueil personnalisées via l’API, vous pouvez utiliser ce point de terminaison. Vous pouvez également filtrer les données (voir le tableau pour plus d’informations).

Paramétro Description
limite (facultatif) Résultat des données par page
page (facultatif) Demande de page actuelle
curl --location --request GET 'https://urlkai.com/api/splash?limit=2&page=1' \
--header 'Autorisation : Porteur YOURAPIKEY' \
--header 'Type-de-contenu : application/json' \ 
$curl = curl_init() ;

curl_setopt_array($curl, array(
    CURLOPT_URL => « https://urlkai.com/api/splash?limit=2&page=1 »,
    CURLOPT_RETURNTRANSFER => vrai,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => vrai,
    CURLOPT_CUSTOMREQUEST => « OBTENIR »,
    CURLOPT_HTTPHEADER => [
        « Autorisation : Porteur YOURAPIKEY »,
        « Type-de-contenu : application/json »,
    ],
    
));

$response = curl_exec($curl) ;

curl_close($curl) ;
écho $response ; 
var request = require('request') ;
options var = {
    'method' : 'GET',
    'url' : 'https://urlkai.com/api/splash?limit=2&page=1',
    'en-têtes' : {
        'Autorisation' : 'Porteur YOURAPIKEY',
        'content-Type' : 'application/json'
    },
    
};
request(options, function (erreur, réponse) {
    if (error) throw new Error(error) ;
    console.log(response.body) ;
}); 
Demandes d’importation
url = « https://urlkai.com/api/splash?limit=2&page=1 »
charge utile = {}
en-têtes = {
    'Autorisation' : 'Porteur YOURAPIKEY',
    'content-Type' : 'application/json'
}
réponse = requests.request(« GET », url, headers=headers, json=payload)
print(réponse.texte) 
var client = nouveau HttpClient() ;
var request = new HttpRequestMessage(HttpMethod.Get, « https://urlkai.com/api/splash?limit=2&page=1 ») ;
demander. headers.add(« autorisation », « porteur YOURAPIKEY ») ;
var content = new StringContent(« {} », System.Text.Encoding.UTF8, « application/json ») ;
demander. Contenu = contenu ;
var response = attendre le client. SendAsync(demande) ;
réponse. EnsureSuccessStatusCode() ;
Console.WriteLine(attendre la réponse. Content.ReadAsStringAsync()) ; 
Risposta del server
{
    « error » : « 0 »,
    « données » : {
        « résultat » : 2,
        « perpage » : 2,
        « currentpage » : 1,
        « page suivante » : 1,
        « maxpage » : 1,
        « éclaboussure » : [
            {
                « id » : 1,
                « name » : « Promo Produit 1 »,
                « date » : « 2020-11-10 18:00:00 »
            },
            {
                « id » : 2,
                « name » : « Promo Produit 2 »,
                « date » : « 2020-11-10 18:10:00 »
            }
        ]
    }
}