Page cover

User API

Looking for an older version? Please click this link Previous versions to view previous API versions.

Get User Data

get

Retrieves the aggregated data for a single user, including their risk score and a list of related predictions.

Authorizations
Path parameters
user_idstringRequired

The ID of the user whose data is being retrieved.

Query parameters
fields[users]string · enumOptional

The additional fields of the user to be returned.

Example: predictions,analyticsPossible values:
includestring · enumOptional

The included resources of the user.

Example: journeysPossible values:
Header parameters
x-scope-partner-idstringRequired

The partner id, please contact Yofi to get the partner id

x-scope-app-idstringRequired

The app id

x-scope-organization-idstringRequired

The organization id

Responses
200

Successful response with user data and related predictions.

application/json
get
/users/{user_id}
GET /data-api/v3/users/{user_id} HTTP/1.1
Host: server.telemetry.services.yofi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-scope-partner-id: text
x-scope-app-id: text
x-scope-organization-id: text
Accept: */*
{
  "trace_id": "text",
  "data": [
    {
      "type": "user",
      "id": "text",
      "attributes": {
        "user_id": "text",
        "source_user_id": "text",
        "last_active_at": "2025-10-29T12:18:41.121Z",
        "created_at": "2025-10-29T12:18:41.121Z",
        "updated_at": "2025-10-29T12:18:41.121Z",
        "app_id": "text",
        "predictions": [
          {
            "prediction_id": "c545c017598956b55df7811f0fdb2164681557447481c159a4b93ec0f4503734",
            "entity_id": "jid-e90328e0-1be9-540e-8671-41acd5cc9a5d",
            "entity_type": "journey",
            "app_id": "77b395e7-3c13-4121-9894-f8d21e3e597f",
            "model_name": "RuleBasedBotDetector",
            "model_type": "rule_based",
            "model_level": "journey",
            "model_version": "0.0.1",
            "prediction_category": "bot",
            "prediction_subcategory": "botd_detect",
            "label_name": "Bot - BotD Detect",
            "is_public_model": true,
            "predicted_value": 1,
            "severity": "high",
            "value_type": "number",
            "indicators": [
              {
                "indicatorName": "botd sessions count",
                "indicatorDescription": "This journey contains sessions that are detected by botd.",
                "indicatorRiskLevel": "high",
                "value": "3"
              },
              {
                "indicatorName": "suspicious behavior patterns",
                "indicatorDescription": "Detected automated navigation patterns typical of bots",
                "indicatorRiskLevel": "medium",
                "value": "true"
              },
              {
                "indicatorName": "session frequency",
                "indicatorDescription": "Unusually high number of sessions in short time period",
                "indicatorRiskLevel": "medium",
                "value": "high"
              }
            ],
            "justification": "This journey is flagged by BotD due to multiple suspicious sessions and automated navigation patterns.",
            "prediction_source": "stream",
            "created_at": "2025-09-10T03:45:29.113091Z",
            "updated_at": "2025-09-10T03:45:29.113101Z"
          }
        ],
        "analytics": [
          {
            "analytics_id": "text",
            "entity_id": "text",
            "entity_type": "text",
            "app_id": "text",
            "metric_name": "text",
            "metric_category": "text",
            "metric_subcategory": "text",
            "metric_title": "text",
            "metric_value": "text",
            "metric_threshold_value": "text",
            "value_type": "text",
            "value_type_parameter": "text",
            "description": "text",
            "effect": "text",
            "include": 1,
            "chart": {},
            "created_at": "2025-10-29T12:18:41.121Z",
            "updated_at": "2025-10-29T12:18:41.121Z"
          }
        ]
      },
      "relationships": {
        "journeys": {
          "data": [
            {
              "type": "journey",
              "id": "text"
            }
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "journey",
      "id": "text",
      "attributes": {
        "predictions": [
          {
            "prediction_id": "c545c017598956b55df7811f0fdb2164681557447481c159a4b93ec0f4503734",
            "entity_id": "jid-e90328e0-1be9-540e-8671-41acd5cc9a5d",
            "entity_type": "journey",
            "app_id": "77b395e7-3c13-4121-9894-f8d21e3e597f",
            "model_name": "RuleBasedBotDetector",
            "model_type": "rule_based",
            "model_level": "journey",
            "model_version": "0.0.1",
            "prediction_category": "bot",
            "prediction_subcategory": "botd_detect",
            "label_name": "Bot - BotD Detect",
            "is_public_model": true,
            "predicted_value": 1,
            "severity": "high",
            "value_type": "number",
            "indicators": [
              {
                "indicatorName": "botd sessions count",
                "indicatorDescription": "This journey contains sessions that are detected by botd.",
                "indicatorRiskLevel": "high",
                "value": "3"
              },
              {
                "indicatorName": "suspicious behavior patterns",
                "indicatorDescription": "Detected automated navigation patterns typical of bots",
                "indicatorRiskLevel": "medium",
                "value": "true"
              },
              {
                "indicatorName": "session frequency",
                "indicatorDescription": "Unusually high number of sessions in short time period",
                "indicatorRiskLevel": "medium",
                "value": "high"
              }
            ],
            "justification": "This journey is flagged by BotD due to multiple suspicious sessions and automated navigation patterns.",
            "prediction_source": "stream",
            "created_at": "2025-09-10T03:45:29.113091Z",
            "updated_at": "2025-09-10T03:45:29.113101Z"
          }
        ]
      }
    }
  ]
}

Get User Predictions

get

Retrieves the predictions for a specific user.

Authorizations
Path parameters
user_idstringRequired

The ID of the user whose data is being retrieved.

Query parameters
isForceboolean · enumOptional

Whether to force calculate the features.

Possible values:
Header parameters
x-scope-partner-idstringRequired

The partner id, please contact Yofi to get the partner id

x-scope-app-idstringRequired

The app id

x-scope-organization-idstringRequired

The organization id

Responses
200

Successful response with user predictions.

application/json
get
/users/{user_id}/predictions
GET /data-api/v3/users/{user_id}/predictions HTTP/1.1
Host: server.telemetry.services.yofi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-scope-partner-id: text
x-scope-app-id: text
x-scope-organization-id: text
Accept: */*
{
  "trace_id": "text",
  "data": [
    {
      "type": "prediction",
      "id": "text",
      "attributes": {
        "prediction_id": "c545c017598956b55df7811f0fdb2164681557447481c159a4b93ec0f4503734",
        "entity_id": "jid-e90328e0-1be9-540e-8671-41acd5cc9a5d",
        "entity_type": "journey",
        "app_id": "77b395e7-3c13-4121-9894-f8d21e3e597f",
        "model_name": "RuleBasedBotDetector",
        "model_type": "rule_based",
        "model_level": "journey",
        "model_version": "0.0.1",
        "prediction_category": "bot",
        "prediction_subcategory": "botd_detect",
        "label_name": "Bot - BotD Detect",
        "is_public_model": true,
        "predicted_value": 1,
        "severity": "high",
        "value_type": "number",
        "indicators": [
          {
            "indicatorName": "botd sessions count",
            "indicatorDescription": "This journey contains sessions that are detected by botd.",
            "indicatorRiskLevel": "high",
            "value": "3"
          },
          {
            "indicatorName": "suspicious behavior patterns",
            "indicatorDescription": "Detected automated navigation patterns typical of bots",
            "indicatorRiskLevel": "medium",
            "value": "true"
          },
          {
            "indicatorName": "session frequency",
            "indicatorDescription": "Unusually high number of sessions in short time period",
            "indicatorRiskLevel": "medium",
            "value": "high"
          }
        ],
        "justification": "This journey is flagged by BotD due to multiple suspicious sessions and automated navigation patterns.",
        "prediction_source": "stream",
        "created_at": "2025-09-10T03:45:29.113091Z",
        "updated_at": "2025-09-10T03:45:29.113101Z"
      }
    }
  ]
}

Last updated

Was this helpful?