User and Org Insights API Reference - PropelAuth Docs

User and Org Insights API Reference

These APIs can be called from the backend using your PropelAuth API Key. These APIs are used to fetch the raw data used in the User Insights reports and charts.


GET/api/backend/v1/user//signup_query_parameters

Fetch User Signup Query Parameters

Fetches the signup query parameters for the user. See the docs here for more information.

Required Permissions

Read Users

Properties

Request

Javascript

auth.fetchUserSignupQueryParams("31c41c16-c281-44ae-9602-8a047e3bf33d");

Python

auth.fetch_user_signup_query_params_by_user_id(
    user_id="31c41c16-c281-44ae-9602-8a047e3bf33d",
)

Rust

auth.user().fetch_user_signup_query_parameters(FetchUserSignupQueryParamsParams {
    user_id: "31c41c16-c281-44ae-9602-8a047e3bf33d".to_string(),
})

Go

auth.FetchUserSignupQueryParameters(uuid.MustParse("31c41c16-c281-44ae-9602-8a047e3bf33d"))

cURL

curl -H "Authorization: Bearer <API_KEY>" \
    -H "Content-Type: application/json" \
    "<AUTH_URL>/api/backend/v1/user/<userId>/signup_query_parameters"

Successful Response

{
    "user_signup_query_parameters": {
        "query_param_example": "example_value"
    }
}

GET/api/backend/v1/user_report/top_inviter

Fetch User Top Inviter Report

Fetches the top inviter report, a leaderboard of users with the highest number of invited users in a period of time.

Required Permissions

Read User Insights Data

Properties

Request

Javascript

auth.fetchUserTopInviterReport(
    TopInviterReportInterval.THIRTY_DAYS,
    ReportPagination {
        pageSize: 10,
        pageNumber: 0
    }
)

Python

auth.fetch_user_top_inviter_report(
    report_interval=TopInviterReportInterval.THIRTY_DAYS,
    page_size=10,
    page_number=0
)

Rust

auth.user_insights().fetch_user_top_inviter_report(
    TopInviterReportInterval::ThirtyDays,
    ReportPagination {
        page_size: Some(10),
        page_number: Some(0),
    }
)

Go

auth.FetchUserTopInviterReport(
    &"30",
    &models.ReportPagination {
        PageSize: &10,
        PageNumber: &0,
    },
)

cURL

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer <API_KEY>" \
    "<AUTH_URL>/api/backend/v1/user_report/top_inviter
        ?report_interval=30
        &page_size=10
        &page_number=0"

Successful Response

{
  "user_reports": [
    {
      "id": "df1940...",
      "report_id": "de58c...",
      "user_id": "813bef...",
      "user_created_at": 1701392700,
      "username": "exampleUsername",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@acmeinc.com",
      "last_active_at": 1773250562,
      "org_data": [
        {
            "display_name": "Acme Inc",
            "org_id": "4f18c3...",
            "user_role": "Owner"
        }
      ],
      "extra_properties": {
        "numInvites": 4
      }
    }
  ],
  "current_page": 0,
  "total_count": 2,
  "page_size": 10,
  "has_more_results": false,
  "report_time": 1773330458
}

GET/api/backend/v1/user_report/champion

Fetch User Champion Report

Fetches the potential champions report, a leaderboard of users with the highest amount of activity in a period of time.

Required Permissions

Read User Insights Data

Properties

Request

Javascript

auth.fetchUserChampionReport(
    ChampionReportInterval.THIRTY_DAYS,
    ReportPagination {
        pageSize: 10,
        pageNumber: 0
    }
)

Python

auth.fetch_user_champion_report(
    report_interval=ChampionReportInterval.THIRTY_DAYS,
    page_size=10,
    page_number=0
)

Rust

auth.user_insights().fetch_user_champion_report(
    ChampionReportInterval::ThirtyDays,
    ReportPagination {
        page_size: Some(10),
        page_number: Some(0),
    }
)

Go

auth.FetchUserChampionReport(
    &"30",
    &models.ReportPagination {
        PageSize: &10,
        PageNumber: &0,
    },
)

cURL

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer <API_KEY>" \
    "<AUTH_URL>/api/backend/v1/user_report/champion
        ?report_interval=30
        &page_size=10
        &page_number=0"

Successful Response

{
  "user_reports": [
    {
      "id": "df1940...",
      "report_id": "de58c...",
      "user_id": "813bef...",
      "user_created_at": 1701392700,
      "username": "exampleUsername",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@acmeinc.com",
      "last_active_at": 1773250562,
      "org_data": [
        {
          "display_name": "Acme Inc",
          "org_id": "4f18c3...",
          "user_role": "Owner"
        }
      ],
      "extra_properties": {
        "num_active_days": 4
      }
    }
  ],
  "current_page": 0,
  "total_count": 2,
  "page_size": 10,
  "has_more_results": false,
  "report_time": 1773330458
}

GET/api/backend/v1/user_report/reengagement

Fetch User Reengagement Report

Fetches the reengaged users report, a report of recently active users who were previously inactive for a period of time.

Required Permissions

Read User Insights Data

Properties

Request

Javascript

auth.fetchUserReengagementReport(
    ReengagementReportInterval.WEEKLY,
    ReportPagination {
        pageSize: 10,
        pageNumber: 0
    }
)

Python

auth.fetch_user_reengagement_report(
    report_interval=ReengagementReportInterval.WEEKLY,
    page_size=10,
    page_number=0
)

Rust

auth.user_insights().fetch_user_reengagement_report(
    ReengagementReportInterval::Weekly,
    ReportPagination {
        page_size: Some(10),
        page_number: Some(0),
    }
)

Go

auth.FetchUserReengagementReport(
    &"Weekly",
    &models.ReportPagination {
        PageSize: &10,
        PageNumber: &0,
    },
)

cURL

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer <API_KEY>" \
    "<AUTH_URL>/api/backend/v1/user_report/reengagement
        ?report_interval=Weekly
        &page_size=10
        &page_number=0"

Successful Response

{
  "user_reports": [
    {
      "id": "df1940...",
      "report_id": "de58c...",
      "user_id": "813bef...",
      "user_created_at": 1701392700,
      "username": "exampleUsername",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@acmeinc.com",
      "last_active_at": 1773250562,
      "org_data": [
        {
            "display_name": "Acme Inc",
            "org_id": "4f18c3...",
            "user_role": "Owner"
        }
      ],
    }
  ],
  "current_page": 0,
  "total_count": 2,
  "page_size": 10,
  "has_more_results": false,
  "report_time": 1773330458
}

GET/api/backend/v1/user_report/churn

Fetch User Churn Report

Fetches the churned users report, a report of users who have not been active in a certain amount of days.

Required Permissions

Read User Insights Data

Properties

Request

Javascript

auth.fetchUserChurnReport(
    ChurnReportInterval.SEVEN_DAYS,
    ReportPagination {
        pageSize: 10,
        pageNumber: 0
    }
)

Python

auth.fetch_user_churn_report(
    report_interval=ChurnReportInterval.SEVEN_DAYS,
    page_size=10,
    page_number=0
)

Rust

auth.user_insights().fetch_user_churn_report(
    ChurnReportInterval::SevenDays,
    ReportPagination {
        page_size: Some(10),
        page_number: Some(0),
    }
)

Go

auth.FetchUserChurnReport(
    &"7",
    &models.ReportPagination {
        PageSize: &10,
        PageNumber: &0,
    },
)

cURL

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer <API_KEY>" \
    "<AUTH_URL>/api/backend/v1/user_report/churn
        ?report_interval=7
        &page_size=10
        &page_number=0"

Successful Response


GET/api/backend/v1/org_report/reengagement

Fetch Org Reengagement Report

Fetches the reengaged org report, a report of organizations with recently active users who had no active users in a period of time.

Required Permissions

Read User Insights Data

Properties

Request

Javascript

auth.fetchOrgReengagementReport(
    ReengagementReportInterval.WEEKLY,
    ReportPagination {
        pageSize: 10,
        pageNumber: 0
    }
)

Python

auth.fetch_org_reengagement_report(
    report_interval=ReengagementReportInterval.WEEKLY,
    page_size=10,
    page_number=0
)

Rust

auth.user_insights().fetch_org_reengagement_report(
    ReengagementReportInterval::Weekly,
    ReportPagination {
        page_size: Some(10),
        page_number: Some(0),
    }
)

Go

auth.FetchOrgReengagementReport(
    &"Weekly",
    &models.ReportPagination {
        PageSize: &10,
        PageNumber: &0,
    },
)

cURL

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer <API_KEY>" \
    "<AUTH_URL>/api/backend/v1/org_report/reengagement
        ?report_interval=Weekly
        &page_size=10
        &page_number=0"

Successful Response

{
  "org_reports": [
    {
      "id": "df1940...",
      "report_id": "de58c...",
      "org_id": "813bef...",
      "name": "Acme Inc",
      "num_users": 1,
      "org_created_at": 1771841702
    }
  ],
  "current_page": 0,
  "total_count": 2,
  "page_size": 10,
  "has_more_results": false,
  "report_time": 1773330458
}

GET/api/backend/v1/org_report/churn

Fetch Org Churn Report

Fetches the churned org report, a report of organizations who had no active users in a period of time.

Required Permissions

Read User Insights Data

Properties

Request

Javascript

auth.fetchOrgChurnReport(
    ChurnReportInterval.SEVEN_DAYS,
    ReportPagination {
        pageSize: 10,
        pageNumber: 0
    }
)

Python

auth.fetch_org_churn_report(
    report_interval=ChurnReportInterval.SEVEN_DAYS,
    page_size=10,
    page_number=0
)

Rust

auth.user_insights().fetch_org_churn_report(
    ChurnReportInterval::SevenDays,
    ReportPagination {
        page_size: Some(10),
        page_number: Some(0),
    }
)

Go

auth.FetchOrgChurnReport(
    &"7",
    &models.ReportPagination {
        PageSize: &10,
        PageNumber: &0,
    },
)

cURL

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer <API_KEY>" \
    "<AUTH_URL>/api/backend/v1/org_report/churn
        ?report_interval=7
        &page_size=10
        &page_number=0"

Successful Response


GET/api/backend/v1/org_report/growth

Fetch Org Growth Report

Fetches the org growth report, a leaderboard of the organizations with the highest net growth over a period of time.

Required Permissions

Read User Insights Data

Properties

Request

Javascript

auth.fetchOrgGrowthReport(
    GrowthReportInterval.THIRTY_DAYS,
    ReportPagination {
        pageSize: 10,
        pageNumber: 0
    }
)

Python

auth.fetch_org_growth_report(
    report_interval=GrowthReportInterval.THIRTY_DAYS,
    page_size=10,
    page_number=0
)

Rust

auth.user_insights().fetch_org_growth_report(
    GrowthReportInterval::ThirtyDays,
    ReportPagination {
        page_size: Some(10),
        page_number: Some(0),
    }
)

Go

auth.FetchOrgGrowthReport(
    &"30",
    &models.ReportPagination {
        PageSize: &10,
        PageNumber: &0,
    },
)

cURL

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer <API_KEY>" \
    "<AUTH_URL>/api/backend/v1/org_report/growth
        ?report_interval=30
        &page_size=10
        &page_number=0"

Successful Response

{
  "org_reports": [
    {
      "id": "df1940...",
      "report_id": "de58c...",
      "org_id": "813bef...",
      "name": "Acme Inc",
      "num_users": 1,
      "org_created_at": 1771841702,
      "extra_properties": {
        "num_users_added": 10,
        "num_users_removed": 3
      }
    }
  ],
  "current_page": 0,
  "total_count": 2,
  "page_size": 10,
  "has_more_results": false,
  "report_time": 1773330458
}

GET/api/backend/v1/org_report/attrition

Fetch Org Attrition Report

Fetches the org attrition report, a leaderboard of the organizations with the highest number of users removed over a period of time.

Required Permissions

Read User Insights Data

Properties

Request

Javascript

auth.fetchOrgAttritionReport(
    AttritionReportInterval.THIRTY_DAYS,
    ReportPagination {
        pageSize: 10,
        pageNumber: 0
    }
)

Python

auth.fetch_org_attrition_report(
    report_interval=AttritionReportInterval.THIRTY_DAYS,
    page_size=10,
    page_number=0
)

Rust

auth.user_insights().fetch_org_attrition_report(
    AttritionReportInterval::ThirtyDays,
    ReportPagination {
        page_size: Some(10),
        page_number: Some(0),
    }
)

Go

auth.FetchOrgAttritionReport(
    &"30",
    &models.ReportPagination {
        PageSize: &10,
        PageNumber: &0,
    },
)

cURL

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer <API_KEY>" \
    "<AUTH_URL>/api/backend/v1/org_report/attrition
        ?report_interval=30
        &page_size=10
        &page_number=0"

Successful Response

{
  "org_reports": [
    {
      "id": "df1940...",
      "report_id": "de58c...",
      "org_id": "813bef...",
      "name": "Acme Inc",
      "num_users": 1,
      "org_created_at": 1771841702,
      "extra_properties": {
        "num_users_added": 10,
        "num_users_removed": 3,
        "net_users_change": 7
      }
    }
  ],
  "current_page": 0,
  "total_count": 2,
  "page_size": 10,
  "has_more_results": false,
  "report_time": 1773330458
}

GET/api/backend/v1/chart_metric/

Fetch Chart Metric Data

Returns a chart metric report for the given chart metric type and cadence.

Required Permissions

Read User Insights Data

Properties

Request

Javascript

auth.fetchChartMetricData(
    ChartMetric.SIGNUPS,
    ChartMetricCadence.DAILY,
    Date("2026-01-01T00:00:00Z"), // start date
    Date("2026-01-31T23:59:59Z"), // end date
)

Python

import datetime as dt

auth.fetch_chart_metric_data(
    chart_metric = ChartMetric.SIGNUPS,
    cadence = ChartMetricCadence.DAILY
    start_date = dt.date.fromisoformat('2026-01-01'),
    end_date = dt.date.fromisoformat('2026-01-31'),
)

Rust

auth.user_insights().fetch_chart_metric_data(
    ChartMetric::Signups,
    FetchChartDataQuery {
        cadence: Some(ChartMetricCadence::Daily),
        start_date: Some("2026-01-01".to_string()),
        end_date: Some("2026-01-31".to_string()),
    },
)

Go

auth.FetchChartMetricData(
    "signups",
    &"Daily",
    &models.ChartRange {
        StartDate: &"2026-01-01",
        EndDate: &"2026-01-31",
    },
)

cURL

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer <API_KEY>" \
    "<AUTH_URL>/api/backend/v1/chart_metrics/<chart_metric>
        ?cadence=Daily
        &start_date=2026-01-01
        &end_date=2026-01-31"

Successful Response

{
  "chart_type": "ActiveOrgs",
  "cadence": "Daily",
  "metrics": [
    {
      "date": "2026-01-01",
      "result": 10,
      "cadence_completed": false
    },
    {
      "date": "2026-01-02",
      "result": 14,
      "cadence_completed": false
    }
  ]
}