Developers

Referencia de API para desarrolladores

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.

Empezando

Se requiere una clave API para que el sistema procese las solicitudes. Una vez que un usuario se registra, se genera automáticamente una clave API para este usuario. La clave API debe enviarse con cada solicitud (consulte el ejemplo completo a continuación). Si la clave API no se envía o está caducada, habrá un error. Asegúrese de mantener en secreto su clave API para evitar abusos.

Autenticación

Para autenticarse con el sistema API, debe enviar su clave API como un token de autorización con cada solicitud. Puede ver el código de muestra a continuación.

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

Límite de tarifa

Nuestra API tiene un limitador de velocidad para protegerse contra picos en las solicitudes para maximizar su estabilidad. Nuestro limitador de frecuencia actualmente tiene un límite de 30 solicitudes por 1 minuto. Please note that the rate might change according to the subscribed plan.

Se enviarán varios encabezados junto con la respuesta y estos se pueden examinar para determinar información diversa sobre la solicitud.

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

Manejo de respuestas

Todas las respuestas de la API se devuelven en formato JSON de forma predeterminada. Para convertir esto en datos utilizables, será necesario utilizar la función adecuada según el idioma. En PHP, la función json_decode() se puede usar para convertir los datos en un objeto (predeterminado) o en una matriz (establezca el segundo parámetro en verdadero). Es muy importante verificar la clave de error ya que proporciona información sobre si hubo un error o no. También puede consultar el código de cabecera.

{
    "error": 1,
    "message": "An error occurred"
}

Campañas

캠페인 나열

가져오기 https://urlkai.com/api/campaigns?limit=2&page=1

API를 통해 캠페인을 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

Parámetro Descripción
한계 (선택 사항) 페이지별 데이터 결과
페이지 (선택 사항) 현재 페이지 요청
curl --location --request GET 'https://urlkai.com/api/campaigns?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

{
    "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"
            }
        ]
    }
}

Crear una campaña

올리기 https://urlkai.com/api/campaign/add

이 엔드포인트를 사용하여 캠페인을 추가할 수 있습니다.

Parámetro Descripción
이름 (선택 사항) 캠페인 이름
민달팽이 (선택 사항) 로테이터 슬러그
공공의 (선택 사항) 접근
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
}'

Respuesta del servidor

{
    "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"
}
올리기 https://urlkai.com/api/campaign/:campaignid/assign/:linkid

이 엔드포인트를 사용하여 캠페인에 짧은 링크를 할당할 수 있습니다. 엔드포인트에는 캠페인 ID와 단축 링크 ID가 필요합니다.

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

Respuesta del servidor

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

Actualizar campaña

놓다 https://urlkai.com/api/campaign/:id/update

캠페인을 업데이트하려면 PUT 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예제에서는 보낼 수 있는 모든 매개 변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

Parámetro Descripción
이름 (필수) 캠페인 이름
민달팽이 (선택 사항) 로테이터 슬러그
공공의 (선택 사항) 접근
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
}'

Respuesta del servidor

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

캠페인 삭제

삭제하다 https://urlkai.com/api/campaign/:id/delete

캠페인을 삭제하려면 DELETE 요청을 보내야 합니다.

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

Respuesta del servidor

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

채널 나열

가져오기 https://urlkai.com/api/channels?limit=2&page=1

API를 통해 채널을 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

Parámetro Descripción
한계 (선택 사항) 페이지별 데이터 결과
페이지 (선택 사항) 현재 페이지 요청
curl --location --request GET 'https://urlkai.com/api/channels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

{
    "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
            }
        ]
    }
}

채널 항목 나열

가져오기 https://urlkai.com/api/channel/:id?limit=1&page=1

API를 통해 선택한 채널의 항목을 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

Parámetro Descripción
한계 (선택 사항) 페이지별 데이터 결과
페이지 (선택 사항) 현재 페이지 요청
curl --location --request GET 'https://urlkai.com/api/channel/:id?limit=1&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

{
    "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"
            }
        ]
    }
}

Crear un canal

올리기 https://urlkai.com/api/channel/add

이 엔드포인트를 사용하여 채널을 추가할 수 있습니다.

Parámetro Descripción
이름 (필수) 채널 이름
묘사 (선택 사항) 채널 설명
색 (선택 사항) 채널 배지 색상(HEX)
별표 (선택 사항) 채널에 별표 표시 여부(참 또는 거짓)
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
}'

Respuesta del servidor

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

채널에 항목 할당하기

올리기 https://urlkai.com/api/channel/:channelid/assign/:type/:itemid

채널 ID, 항목 유형(링크, 바이오 또는 qr) 및 항목 ID와 함께 요청을 전송하여 모든 채널에 항목을 할당할 수 있습니다.

Parámetro Descripción
:채널ID (필수) 채널 ID
:형 (필수) 링크 또는 약력 또는 QR
:항목 ID (필수) 항목 ID
curl --location --request POST 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

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

Actualizar canal

놓다 https://urlkai.com/api/channel/:id/update

채널을 업데이트하려면 PUT 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예제에서는 보낼 수 있는 모든 매개 변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

Parámetro Descripción
이름 (선택 사항) 채널 이름
묘사 (선택 사항) 채널 설명
색 (선택 사항) 채널 배지 색상(HEX)
별표 (선택 사항) 채널에 별표 표시 여부(참 또는 거짓)
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
}'

Respuesta del servidor

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

채널 삭제

삭제하다 https://urlkai.com/api/channel/:id/delete

채널을 삭제하려면 DELETE 요청을 보내야 합니다. 모든 항목도 할당되지 않습니다.

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

Respuesta del servidor

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

Obtener cuenta

가져오기 https://urlkai.com/api/account

Para obtener información sobre la cuenta, puede enviar una solicitud a este punto final y devolverá datos sobre la cuenta.

curl --location --request GET 'https://urlkai.com/api/account' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

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

Actualizar cuenta

놓다 https://urlkai.com/api/account/update

Para actualizar la información de la cuenta, puede enviar una solicitud a este punto final y actualizará los datos de la cuenta.

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

Respuesta del servidor

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

코디고스 QR

QR 코드 나열

가져오기 https://urlkai.com/api/qr?limit=2&page=1

Para obtener sus códigos QR a través de la API, puede usar este punto final. También puede filtrar datos (Ver tabla para más información).

Parámetro Descripción
한계 (선택 사항) 페이지별 데이터 결과
페이지 (선택 사항) 현재 페이지 요청
curl --location --request GET 'https://urlkai.com/api/qr?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

{
    "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"
            }
        ]
    }
}

Obtenga un solo código QR

가져오기 https://urlkai.com/api/qr/:id

Para obtener detalles de un solo código QR a través de la API, puede usar este punto final.

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

Respuesta del servidor

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

Crear un código QR

올리기 https://urlkai.com/api/qr/add

QR 코드를 생성하려면 POST 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예제에서는 보낼 수 있는 모든 매개 변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

Parámetro Descripción
형 (필수) text | vCard | 링크 | 이메일 | 전화 | 문자 메시지 | 와이파이
데이터 (필수) QR 코드 내부에 삽입될 데이터입니다. 데이터는 유형에 따라 문자열 또는 배열일 수 있습니다
배경 (선택 사항) RGB 색상 예 : rgb (255,255,255)
전경 (선택 사항) RGB 색상 예 : rgb(0,0,0)
로고 (선택 사항) 로고 경로(png 또는 jpg)
이름 (선택 사항) 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"
}'

Respuesta del servidor

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

QR 코드 업데이트

놓다 https://urlkai.com/api/qr/:id/update

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

Parámetro Descripción
데이터 (필수) QR 코드 내부에 삽입될 데이터입니다. 데이터는 유형에 따라 문자열 또는 배열일 수 있습니다
배경 (선택 사항) RGB 색상 예 : rgb (255,255,255)
전경 (선택 사항) RGB 색상 예 : rgb(0,0,0)
로고 (선택 사항) 로고 경로(png 또는 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"
}'

Respuesta del servidor

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

Eliminar un código QR

삭제하다 https://urlkai.com/api/qr/:id/delete

Para eliminar un código QR, debe enviar una solicitud de ELIMINACIÓN.

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

Respuesta del servidor

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

Dominios de marca

브랜드 도메인 나열

가져오기 https://urlkai.com/api/domains?limit=2&page=1

API를 통해 브랜드 도메인을 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

Parámetro Descripción
한계 (선택 사항) 페이지별 데이터 결과
페이지 (선택 사항) 현재 페이지 요청
curl --location --request GET 'https://urlkai.com/api/domains?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

{
    "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"
            }
        ]
    }
}

브랜드 도메인 만들기

올리기 https://urlkai.com/api/domain/add

이 엔드포인트를 사용하여 도메인을 추가할 수 있습니다. 도메인이 당사 서버를 올바르게 가리키고 있는지 확인하십시오.

Parámetro Descripción
도메인 (필수) http 또는 https를 포함한 브랜드 도메인
리다이렉터루트 (선택 사항) 누군가 도메인을 방문할 때 루트 리디렉션
리디렉션404 (선택 사항) 사용자 지정 404 리디렉션
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"
}'

Respuesta del servidor

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

Actualizar dominio

놓다 https://urlkai.com/api/domain/:id/update

브랜드 도메인을 업데이트하려면 PUT 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예제에서는 보낼 수 있는 모든 매개 변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

Parámetro Descripción
리다이렉터루트 (선택 사항) 누군가 도메인을 방문할 때 루트 리디렉션
리디렉션404 (선택 사항) 사용자 지정 404 리디렉션
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"
}'

Respuesta del servidor

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

도메인 삭제

삭제하다 https://urlkai.com/api/domain/:id/delete

도메인을 삭제하려면 DELETE 요청을 보내야 합니다.

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

Respuesta del servidor

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

목록 파일

가져오기 https://urlkai.com/api/files?limit=2&page=1

모든 파일을 확보하세요. 이름으로도 검색할 수 있습니다.

Parámetro Descripción
이름 (선택 사항) 파일명으로 검색
한계 (선택 사항) 페이지별 데이터 결과
페이지 (선택 사항) 현재 페이지 요청
curl --location --request GET 'https://urlkai.com/api/files?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

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

파일 업로드

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

파일을 업로드하려면 이진 데이터를 게시물 본문으로 보내세요. URL에 :filename 대신 확장자를 포함한 파일 이름을 보내야 합니다(예: brandkit.zip). 다음 매개변수를 보내면 옵션을 설정할 수 있습니다.

Parámetro Descripción
이름 (선택 사항) 파일 이름
관습 (선택 사항) 임의 별칭 대신 사용자 지정 별칭.
도메인 (선택 사항) 사용자 지정 도메인
암호 (선택 사항) 비밀번호 보호
만료 (선택 사항) 다운로드 예제 만료 2021-09-28
맥스다운로드스 (선택 사항) 최대 다운로드 수
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"'

Respuesta del servidor

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

Personalizar página de bienvenida

사용자 지정 스플래시 나열

가져오기 https://urlkai.com/api/splash?limit=2&page=1

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

Parámetro Descripción
한계 (선택 사항) 페이지별 데이터 결과
페이지 (선택 사항) 현재 페이지 요청
curl --location --request GET 'https://urlkai.com/api/splash?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

{
    "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"
            }
        ]
    }
}

목록 픽셀

가져오기 https://urlkai.com/api/pixels?limit=2&page=1

API를 통해 픽셀 코드를 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

Parámetro Descripción
한계 (선택 사항) 페이지별 데이터 결과
페이지 (선택 사항) 현재 페이지 요청
curl --location --request GET 'https://urlkai.com/api/pixels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

{
    "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"
            }
        ]
    }
}

픽셀 만들기

올리기 https://urlkai.com/api/pixel/add

이 엔드포인트를 사용하여 픽셀을 만들 수 있습니다. 픽셀 유형과 태그를 보내야 합니다.

Parámetro Descripción
형 (필수) gtmpixel | 가픽셀 | FBWipixel | 애드워즈픽셀 | 링크드인픽셀 | 트위터픽셀 | 애드롤픽셀 | 쿠오라픽셀 | 핀터레스트 | 빙 | 스냅챗 | 레딧 | 틱톡
이름 (필수) 픽셀의 맞춤 이름
태그 (필수) 픽셀의 태그
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"
}'

Respuesta del servidor

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

Actualizar píxel

놓다 https://urlkai.com/api/pixel/:id/update

픽셀을 업데이트하려면 PUT 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예제에서는 보낼 수 있는 모든 매개 변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

Parámetro Descripción
이름 (선택 사항) 픽셀의 맞춤 이름
태그 (필수) 픽셀의 태그
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"
}'

Respuesta del servidor

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

픽셀 삭제

삭제하다 https://urlkai.com/api/pixel/:id/delete

픽셀을 삭제하려면 DELETE 요청을 보내야 합니다.

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

Respuesta del servidor

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

Superposiciones de CTA

CTA 오버레이 나열

가져오기 https://urlkai.com/api/overlay?limit=2&page=1

API를 통해 cta 오버레이를 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

Parámetro Descripción
한계 (선택 사항) 페이지별 데이터 결과
페이지 (선택 사항) 현재 페이지 요청
curl --location --request GET 'https://urlkai.com/api/overlay?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Respuesta del servidor

{
    "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"
            }
        ]
    }
}