Lzarus Anti Phishing API - v.0.0.8

Introducción

1- Configuración global del proyecto.

curl --location 'https://lzrms-antiphishing.lazarustechservices.com/v1/projects/get-project-config' \
--header 'lzrmsaph-auth: <APP-AUTH-TOKEN>'

respuesta:

{
    "code": 200,
    "status": "success",
    "message": "project config",
    "data": {
        "project_config": [
            {
                "config_key": "DOMAIN_SCORING_CRITICAL_MAX",
                "config_value": "10"
            },
            {
                "config_key": "DOMAIN_SCORING_CRITICAL_MIN",
                "config_value": "7"
            },
            {
                "config_key": "DOMAIN_SCORING_HIGH_MAX",
                "config_value": "6.9"
            },
            {
                "config_key": "DOMAIN_SCORING_HIGH_MIN",
                "config_value": "5"
            },
            {
                "config_key": "DOMAIN_SCORING_LOW_MAX",
                "config_value": "1.9"
            },
            {
                "config_key": "DOMAIN_SCORING_LOW_MIN",
                "config_value": "0"
            },
            {
                "config_key": "DOMAIN_SCORING_MEDIUM_MAX",
                "config_value": "4.9"
            },
            {
                "config_key": "DOMAIN_SCORING_MEDIUM_MIN",
                "config_value": "2"
            }
        ]
    }
}

2- Para poder interactuar con la pi se necesita tener un usuario.

curl --location 'https://lzrms-antiphishing.lazarustechservices.com/v1/users/create-user' \
--header 'lzrmsaph-auth: <APP-AUTH-TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "project_uuid": "prj-generic-0001",
    "project_user_uuid": "usr-009"
}'

respuesta:

{
    "code": 201,
    "status": "success",
    "message": "user created successfully",
    "data": {
        "user_uuid": "aph-usr-71a24a842b754335a771710b6ab48ff5"
    }
}

3- Con el usuario creado, se puede generar un codigo de activacion para un dispositivo.

curl --location 'https://lzrms-antiphishing.lazarustechservices.com/v1/user-devices/generate-user-device-code' \
--header 'lzrmsaph-auth: <APP-AUTH-TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "user_uuid": "aph-usr-a6d3a77e5d4a452cb3a9d6d1b528562b"
}'

respuesta:

{
    "code": 201,
    "status": "success",
    "message": "user device generated successfully",
    "data": {
        "device_code": "2HMpR8UCDO"
    }
}

4- Con el codigo de activacion, se puede confirmar el dispositivo y obtener un token de autenticacion para este.

curl --location 'https://lzrms-antiphishing.lazarustechservices.com/v1/user-devices/confirm-user-device' \
--header 'Content-Type: application/json' \
--data '{
    "device_code": "QNBGcSIrDC",
    "device_name": "My phone",  //cualquier texto de 1 a 50 caracteres
    "device_os": "Android"
}'

respuesta:

{
    "code": 200,
    "status": "success",
    "message": "user device confirmed successfully",
    "data": {
        "user_device_uuid": "aph-dev-1de92aba7b3c418eae5ac3bcd2188f5e",
        "user_device_auth_token": "aph-dev-auth-BHLUDOOz2c4DWCx0KGWwAllfZiWN9LEs2An",
        "auth_token": "aph-dev-auth-BHLUDOOz2c4DWCx0KGWwAllfZiWN9LEs2An" //obsoleto
    }
}

5- Con el token de autenticacion, se puede obtener el riesgo asociado a un dominio.

curl --location 'https://lzrms-antiphishing.lazarustechservices.com/v1/phishing/get-domain-risk' \
--header 'lzrmsaph-device-auth: aph-dev-auth-zcbPtmaAsXKCUBgCxL8HWfBoeTMjndhAe14' \
--header 'Content-Type: application/json' \
--data '{
    "domain_uuid": "3c724010c530e8690731d881a126ce3d", // el dominio en md5
    "domain": "000000000a0uutlook.weebly.com"
}'

respuesta:

{
    "code": 200,
    "status": "success",
    "message": "domain risk retrieved",
    "data": {
        "domain_name": "000000000a0uutlook.weebly.com",
        "domain_uuid": "3c724010c530e8690731d881a126ce3d",
        "risk_score": "10.00",
        "created_at": "2025-08-27 07:47:54",
        "updated_at": ""
    }
}

6- Solicitar la reevaluación de un dominio.

curl --location 'https://lzrms-antiphishing.lazarustechservices.com/v1/phishing/reevaluate-domain-risk' \
--header 'lzrmsaph-auth: <APP-AUTH-TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "domain_uuid": "3c724010c530e8690731d881a126ce3d", // el dominio en md5
    "domain": "000000000a0uutlook.weebly.com"
}'

respuesta:

{
    "code": 200,
    "status": "success",
    "message": "domain queued for reevaluation",
    "data": {
        "evaluation_id": 6
    }
}

7- Con el user-uuid, se puede consultar los dispositivos asociados al usuario y ver en que estado estan o recuperar el token de autenticacion.

curl --location 'https://lzrms-antiphishing.lazarustechdev.com/v1/user-devices/get-user-devices/aph-usr-c07bade8d3b047b5934bee09ae908fb3' \
--header 'lzrmsaph-auth: <APP-AUTH-TOKEN>' 

respuesta:

{
    "code": 200,
    "status": "success",
    "message": "user devices",
    "data": {
        "total": 1,
        "user_devices": [
            {
                "id": 12,
                "device_uuid": "aph-dev-1de92aba7b3c418eae5ac3bcd2188f5e",
                "device_code": "2HMpR8UCDO",
                "device_name": "Device example 20250825",
                "os": "Android",
                "auth_token": "aph-dev-auth-BHLUDOOz2c4DWCx0KGWwAllfZiWN9LEs2An",
                "created_at": "2025-08-27 12:20:30",
                "updated_at": "",
                "deleted_at": "",
                "confirmed_at": "2025-08-27 12:21:00"
            }
        ]
    }
}

8- Este es el endpoint de sincronización batch de dominios.

curl --location 'https://lzrms-antiphishing.lazarustechservices.com/v1/domains/get-domains-batch' \
--header 'lzrmsaph-device-auth: aph-dev-auth-zcbPtmaAsXKCUBgCxL8HWfBoeTMjndhAe14' \
--header 'Content-Type: application/json' \
--data '{
    "domain_uuids": [
        "4ab875b80ff38da47cce668be1e8a7c5",
        "013bb8ee47216256bac99b44beb14611",
        "dc7b5895d40ee5ba45d0d6702e45c9e7",
        "dc7b5895d40ee5ba45d0d6702e45c910",
    ]
}'

respuesta:

{
    "code": 200,
    "status": "success",
    "message": "domains scored batch",
    "data": {
        "total": 3,
        "results": [
            {
                "domain_name": "00000000000000000000000000000000000000dfjjjhv.000webhostapp.com",
                "domain_uuid": "9aa7b59cb5432b0d53de789d65bcaeb6",
                "risk_score": "10.00",
                "created_at": "2025-08-27 07:47:54",
                "updated_at": ""
            },
            {
                "domain_name": "000000000000000000000000000000000000dbscrfg.000webhostapp.com",
                "domain_uuid": "ab6cd537f9ead71a668024afbf2087ac",
                "risk_score": "10.00",
                "created_at": "2025-08-27 07:47:54",
                "updated_at": ""
            },
            {
                "domain_name": "000000000000000000000000000.vstarbet555.com",
                "domain_uuid": "9e7347768900f7c1b49d1c5043caa700",
                "risk_score": "10.00",
                "created_at": "2025-08-27 07:47:54",
                "updated_at": ""
            }
        ]
    }
}

9- Envío de notificaciones al dispositivo (android / extension web)

curl --location 'https://lzrms-antiphishing.lazarustechservices.com/v1/notifications/send-push' \
--header 'lzrmsaph-device-auth: aph-dev-auth-3SaQk6FmuzK1oCYPGF3pcblKBIIzBX0EK30' \
--header 'Content-Type: application/json' \
--data '{
    "notificationToken": "c0NaHhxxxxxxxX6_0mqeXr:Axxxxxxxxxxxxx1cjKsA0bijO7xxxxxxxx_hDh0rPFxwdjG7Pn3Amohma3IvA0aHOlBzluxxxxxxtMk05lKAi3JItxxxxx",
    "title": "title of notification",
    "body": "body of notification"
}'

respuesta:

{
    "code": 200,
    "status": "success",
    "message": "notification sent successfully",
    "data": {
        "notification_id": "projects/antiphisihing-notification/messages/a6340a4b-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
}

10- Actualizar push token del dispositivo

curl --location --request PATCH 'https://lzrms-antiphishing.lazarustechservices.com/v1/user-devices/update-notification-token' \
--header 'lzrmsaph-device-auth: aph-dev-auth-1tMYnVuyUO92clR3FXYwawhoiGDJQXvI2IH' \
--header 'Content-Type: application/json' \
--data '{
    "notification_token": "xxxxyyyyzzz-new-notification-token"
}'

respuesta:

{
  "code": 200,
  "status": "success",
  "message": "notification token updated successfully",
  "data": {
    "updated_at": "2025-08-27 12:42:59"
  }
}
⬆️ Ir al inicio