Developers

API-Referenz für Entwickler

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

Einstieg

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, um Missbrauch zu verhindern.

Authentifizierung

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 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \ 

Bewertungslimit

Unsere API verfügt über einen Ratenbegrenzer zum Schutz vor Anfragenspitzen, um ihre Stabilität zu maximieren. Unser Ratenbegrenzer ist derzeit auf 30 Anfragen pro 1 Minute begrenzt. Si prega di notare che la tariffa potrebbe cambiare in base al piano sottoscritto.

Neben der Antwort werden mehrere Header gesendet, die untersucht werden können, um verschiedene Informationen über die Anfrage zu ermitteln.

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

Antwortbehandlung

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, um 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"
}

Benutzerdefinierter Splash

Elenca Splash personalizzato

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

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

Parametro Beschreibung
limite (Facoltativo) Risultato dei dati per pagina
pagina (Facoltativo) Richiesta pagina corrente
curl --location --request GET 'https://urlkai.com/api/splash?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "splash": [
            {
                "id": 1,
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "name": "Product 2 Promo",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

Sovrapposizioni CTA

Elenca le sovrapposizioni CTA

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

Per ottenere sovrapposizioni cta tramite l'API, è possibile utilizzare questo endpoint. È inoltre possibile filtrare i dati (vedere la tabella per ulteriori informazioni).

Parametro Beschreibung
limite (Facoltativo) Risultato dei dati per pagina
pagina (Facoltativo) Richiesta pagina corrente
curl --location --request GET 'https://urlkai.com/api/overlay?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "cta": [
            {
                "id": 1,
                "type": "message",
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "contact",
                "name": "Contact Page",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

Elenca file

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

Recupera tutti i tuoi file. Puoi anche cercare per nome.

Parametro Beschreibung
nome (Facoltativo) Cercare un file in base al nome
limite (Facoltativo) Risultato dei dati per pagina
pagina (Facoltativo) Richiesta pagina corrente
curl --location --request GET 'https://urlkai.com/api/files?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

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

Caricare un file

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

Caricare un file inviando i dati binari come corpo del post. È necessario inviare il nome del file includendo l'estensione invece di :filename nell'url (ad es. brandkit.zip). È possibile impostare le opzioni inviando i seguenti parametri.

Parametro Beschreibung
nome (Facoltativo) Nome file
costume (Facoltativo) Alias personalizzato invece di alias casuali.
dominio (Facoltativo) Dominio personalizzato
parola d’ordine (Facoltativo) Protezione con password
scadenza (Facoltativo) Scadenza per l'esempio di download 2021-09-28
maxdownloads (Facoltativo) Numero massimo di download
curl --location --request POST 'https://urlkai.com/api/files/upload/:filename?name=My+File' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '"BINARY DATA"'

Antwort des Servers

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

Kampagnen

Elenca le campagne

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

Per ottenere le tue campagne tramite l'API, puoi utilizzare questo endpoint. È inoltre possibile filtrare i dati (vedere la tabella per ulteriori informazioni).

Parametro Beschreibung
limite (Facoltativo) Risultato dei dati per pagina
pagina (Facoltativo) Richiesta pagina corrente
curl --location --request GET 'https://urlkai.com/api/campaigns?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "campaigns": [
            {
                "id": 1,
                "name": "Sample Campaign",
                "public": false,
                "rotator": false,
                "list": "https:\/\/domain.com\/u\/admin\/list-1"
            },
            {
                "id": 2,
                "domain": "Facebook Campaign",
                "public": true,
                "rotator": "https:\/\/domain.com\/r\/test",
                "list": "https:\/\/domain.com\/u\/admin\/test-2"
            }
        ]
    }
}

Erstellen Sie eine Kampagne

INSERISCI https://urlkai.com/api/campaign/add

È possibile aggiungere una campagna utilizzando questo endpoint.

Parametro Beschreibung
nome (Facoltativo) Nome della campagna
Lumaca (Facoltativo) Lumaca rotatore
pubblico (Facoltativo) Accesso
curl --location --request POST 'https://urlkai.com/api/campaign/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}'

Antwort des Servers

{
    "error": 0,
    "id": 3,
    "domain": "New Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/new-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/new-campaign-3"
}
INSERISCI https://urlkai.com/api/campaign/:campaignid/assign/:linkid

Un collegamento breve può essere assegnato a una campagna utilizzando questo endpoint. L'endpoint richiede l'ID campagna e l'ID collegamento breve.

curl --location --request POST 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": 0,
    "message": "Link successfully added to the campaign."
}

Kampagne aktualisieren

METTERE https://urlkai.com/api/campaign/:id/update

Per aggiornare una campagna, è necessario inviare dati validi 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 sei obbligato a inviarli tutti (vedi tabella per maggiori informazioni).

Parametro Beschreibung
nome (obbligatorio) Nome della campagna
Lumaca (Facoltativo) Lumaca rotatore
pubblico (Facoltativo) Accesso
curl --location --request PUT 'https://urlkai.com/api/campaign/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}'

Antwort des Servers

{
    "error": 0,
    "id": 3,
    "domain": "Twitter Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/twitter-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/twitter-campaign-3"
}

Elimina campagna

CANCELLARE https://urlkai.com/api/campaign/:id/delete

Per eliminare una campagna, è necessario inviare una richiesta di ELIMINAZIONE.

curl --location --request DELETE 'https://urlkai.com/api/campaign/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": 0,
    "message": "Campaign has been deleted successfully."
}

Elenca canali

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

Per ottenere i tuoi canali tramite l'API, puoi utilizzare questo endpoint. È inoltre possibile filtrare i dati (vedere la tabella per ulteriori informazioni).

Parametro Beschreibung
limite (Facoltativo) Risultato dei dati per pagina
pagina (Facoltativo) Richiesta pagina corrente
curl --location --request GET 'https://urlkai.com/api/channels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "channels": [
            {
                "id": 1,
                "name": "Channel 1",
                "description": "Description of channel 1",
                "color": "#000000",
                "starred": true
            },
            {
                "id": 2,
                "name": "Channel 2",
                "description": "Description of channel 2",
                "color": "#FF0000",
                "starred": false
            }
        ]
    }
}

Elencare gli elementi del canale

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

Per ottenere elementi in un canale selezionato tramite l'API, è possibile utilizzare questo endpoint. È inoltre possibile filtrare i dati (vedere la tabella per ulteriori informazioni).

Parametro Beschreibung
limite (Facoltativo) Risultato dei dati per pagina
pagina (Facoltativo) Richiesta pagina corrente
curl --location --request GET 'https://urlkai.com/api/channel/:id?limit=1&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "items": [
            {
                "type": "links",
                "id": 1,
                "title": "My Sample Link",
                "preview": "https:\/\/google.com",
                "link": "https:\/\/urlkai.com\/google",
                "date": "2022-05-12"
            },
            {
                "type": "bio",
                "id": 1,
                "title": "My Sample Bio",
                "preview": "https:\/\/urlkai.com\/mybio",
                "link": "https:\/\/urlkai.com\/mybio",
                "date": "2022-06-01"
            }
        ]
    }
}

Erstellen Sie einen Kanal

INSERISCI https://urlkai.com/api/channel/add

È possibile aggiungere un canale utilizzando questo endpoint.

Parametro Beschreibung
nome (obbligatorio) Nome del canale
descrizione (Facoltativo) Descrizione del canale
Colore (Facoltativo) Colore del badge del canale (HEX)
Recitato (Facoltativo) Contrassegnare il canale con o meno (vero o falso)
curl --location --request POST 'https://urlkai.com/api/channel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}'

Antwort des Servers

{
    "error": 0,
    "id": 3,
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}

Assegnazione di un elemento a un canale

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

Un articolo può essere assegnato a qualsiasi canale inviando una richiesta con l'ID del canale, il tipo di articolo (link, bio o qr) e l'ID dell'articolo.

Parametro Beschreibung
:ID canale (obbligatorio) ID canale
:digitare (obbligatorio) link o bio o qr
:iditemida (obbligatorio) ID articolo
curl --location --request POST 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": 0,
    "message": "Item successfully added to the channel."
}

Kanal aktualisieren

METTERE https://urlkai.com/api/channel/:id/update

Per aggiornare un canale, è necessario inviare dati validi 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 sei obbligato a inviarli tutti (vedi tabella per maggiori informazioni).

Parametro Beschreibung
nome (Facoltativo) Nome del canale
descrizione (Facoltativo) Descrizione del canale
Colore (Facoltativo) Colore del badge del canale (HEX)
Recitato (Facoltativo) Contrassegnare il canale con o meno (vero o falso)
curl --location --request PUT 'https://urlkai.com/api/channel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Acme Corp",
    "description": "channel for items for Acme Corp",
    "color": "#FFFFFF",
    "starred": false
}'

Antwort des Servers

{
    "error": 0,
    "message": "Channel has been updated successfully."
}

Elimina canale

CANCELLARE https://urlkai.com/api/channel/:id/delete

Per eliminare un canale, è necessario inviare una richiesta di ELIMINAZIONE. Anche tutti gli articoli non saranno assegnati.

curl --location --request DELETE 'https://urlkai.com/api/channel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": 0,
    "message": "Channel has been deleted successfully."
}

Konto erhalten

OTTIENI 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 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": 0,
    "data": {
        "id": 1,
        "email": "[email protected]",
        "username": "sampleuser",
        "avatar": "https:\/\/domain.com\/content\/avatar.png",
        "status": "pro",
        "expires": "2022-11-15 15:00:00",
        "registered": "2020-11-10 18:01:43"
    }
}

Account aktualisieren

METTERE 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 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "password": "NewPassword1"
}'

Antwort des Servers

{
    "error": 0,
    "message": "Account has been successfully updated."
}

Markendomänen

Elenca i domini con marchio

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

Per ottenere i domini con il tuo marchio tramite l'API, puoi utilizzare questo endpoint. È inoltre possibile filtrare i dati (vedere la tabella per ulteriori informazioni).

Parametro Beschreibung
limite (Facoltativo) Risultato dei dati per pagina
pagina (Facoltativo) Richiesta pagina corrente
curl --location --request GET 'https://urlkai.com/api/domains?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "domains": [
            {
                "id": 1,
                "domain": "https:\/\/domain1.com",
                "redirectroot": "https:\/\/rootdomain.com",
                "redirect404": "https:\/\/rootdomain.com\/404"
            },
            {
                "id": 2,
                "domain": "https:\/\/domain2.com",
                "redirectroot": "https:\/\/rootdomain2.com",
                "redirect404": "https:\/\/rootdomain2.com\/404"
            }
        ]
    }
}

Crea un dominio con marchio

INSERISCI https://urlkai.com/api/domain/add

È possibile aggiungere un dominio utilizzando questo endpoint. Assicurati che il dominio sia puntato correttamente al nostro server.

Parametro Beschreibung
dominio (obbligatorio) Dominio con marchio che include http o https
radice di reindirizzamento (Facoltativo) Reindirizzamento root quando qualcuno visita il tuo dominio
reindirizzamento404 (Facoltativo) Reindirizzamento 404 personalizzato
curl --location --request POST 'https://urlkai.com/api/domain/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "domain": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}'

Antwort des Servers

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

Domäne aktualisieren

METTERE https://urlkai.com/api/domain/:id/update

Per aggiornare un dominio brandizzato, è necessario inviare dati validi 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 sei obbligato a inviarli tutti (vedi tabella per maggiori informazioni).

Parametro Beschreibung
radice di reindirizzamento (Facoltativo) Reindirizzamento root quando qualcuno visita il tuo dominio
reindirizzamento404 (Facoltativo) Reindirizzamento 404 personalizzato
curl --location --request PUT 'https://urlkai.com/api/domain/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}'

Antwort des Servers

{
    "error": 0,
    "message": "Domain has been updated successfully."
}

Elimina dominio

CANCELLARE https://urlkai.com/api/domain/:id/delete

Per eliminare un dominio, è necessario inviare una richiesta di DELETE.

curl --location --request DELETE 'https://urlkai.com/api/domain/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

Elenco pixel

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

Per ottenere i codici dei pixel tramite l'API, puoi utilizzare questo endpoint. È inoltre possibile filtrare i dati (vedere la tabella per ulteriori informazioni).

Parametro Beschreibung
limite (Facoltativo) Risultato dei dati per pagina
pagina (Facoltativo) Richiesta pagina corrente
curl --location --request GET 'https://urlkai.com/api/pixels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 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": "Twitter Pixel",
                "tag": "1234567",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

Crea un pixel

INSERISCI https://urlkai.com/api/pixel/add

È possibile creare un pixel utilizzando questo endpoint. È necessario inviare il tipo di pixel e il tag.

Parametro Beschreibung
digitare (obbligatorio) gtmpixel | gapixel | fbpixel | AdwordsPixel | Linkedinpixel | Pixel di Twitter | AdrollPixel | quorapixel | Pinterest | Bing | Snapchat | Reddit | tiktok
nome (obbligatorio) Nome personalizzato per il tuo pixel
cartellino (obbligatorio) Il tag per il pixel
curl --location --request POST 'https://urlkai.com/api/pixel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'

Antwort des Servers

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

Pixel aktualisieren

METTERE https://urlkai.com/api/pixel/:id/update

Per aggiornare un pixel, è necessario inviare dati validi 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 sei obbligato a inviarli tutti (vedi tabella per maggiori informazioni).

Parametro Beschreibung
nome (Facoltativo) Nome personalizzato per il tuo pixel
cartellino (obbligatorio) Il tag per il pixel
curl --location --request PUT 'https://urlkai.com/api/pixel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'

Antwort des Servers

{
    "error": 0,
    "message": "Pixel has been updated successfully."
}

Elimina pixel

CANCELLARE https://urlkai.com/api/pixel/:id/delete

Per eliminare un pixel, è necessario inviare una richiesta di ELIMINAZIONE.

curl --location --request DELETE 'https://urlkai.com/api/pixel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": 0,
    "message": "Pixel has been deleted successfully."
}

Codici QR

Elenca i codici QR

OTTIENI 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).

Parametro Beschreibung
limite (Facoltativo) Risultato dei dati per pagina
pagina (Facoltativo) Richiesta pagina corrente
curl --location --request GET 'https://urlkai.com/api/qr?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "link": "https:\/\/urlkai.com\/qr\/a2d5e",
                "scans": 0,
                "name": "Google",
                "date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "link": "https:\/\/urlkai.com\/qr\/b9edfe",
                "scans": 5,
                "name": "Google Canada",
                "date": "2020-11-10 18:00:25"
            }
        ]
    }
}

Holen Sie sich einen einzigen QR-Code

OTTIENI 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 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": 0,
    "details": {
        "id": 1,
        "link": "https:\/\/urlkai.com\/qr\/b9edfe",
        "scans": 5,
        "name": "Google Canada",
        "date": "2020-11-10 18:00:25"
    },
    "data": {
        "clicks": 1,
        "uniqueClicks": 1,
        "topCountries": {
            "Unknown": "1"
        },
        "topReferrers": {
            "Direct, email and other": "1"
        },
        "topBrowsers": {
            "Chrome": "1"
        },
        "topOs": {
            "Windows 10": "1"
        },
        "socialCount": {
            "facebook": 0,
            "twitter": 0,
            "instagram": 0
        }
    }
}

Erstellen Sie einen QR-Code

INSERISCI https://urlkai.com/api/qr/add

Per creare un codice QR, è necessario inviare dati validi in JSON tramite una richiesta POST. 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 sei obbligato a inviarli tutti (vedi tabella per maggiori informazioni).

Parametro Beschreibung
digitare testo (obbligatorio) | vcard | collegamento | e-mail | telefono | sms | Connessione Wi-Fi
dati (obbligatorio) Dati da incorporare all'interno del codice QR. I dati possono essere stringa o matrice a seconda del tipo
sfondo (Facoltativo) Colore RGB, ad esempio rgb(255,255,255)
primo piano (Facoltativo) Colore RGB, ad esempio rgb(0,0,0)
logo (Facoltativo) Percorso del logo png o jpg
nome (Facoltativo) Nome del codice QR
curl --location --request POST 'https://urlkai.com/api/qr/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png",
    "name": "QR Code API"
}'

Antwort des Servers

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

Aggiorna il codice QR

METTERE 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).

Parametro Beschreibung
dati (obbligatorio) Dati da incorporare all'interno del codice QR. I dati possono essere stringa o matrice a seconda del tipo
sfondo (Facoltativo) Colore RGB, ad esempio rgb(255,255,255)
primo piano (Facoltativo) Colore RGB, ad esempio rgb(0,0,0)
logo (Facoltativo) Percorso del logo png o jpg
curl --location --request PUT 'https://urlkai.com/api/qr/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'

Antwort des Servers

{
    "error": 0,
    "message": "QR has been updated successfully."
}

Löschen Sie einen QR-Code

CANCELLARE 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 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Antwort des Servers

{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}