Stats

Get current stats for verifications.

Get Account Statistics

This endpoint provides a high-level snapshot of your account's verification activity, including user registration volume, a breakdown of user statuses, and a list of the most recent user records.

This is useful for building dashboards or for periodic reporting on your verification funnel.

GET https://{sub-domain}.trustswiftly.com/api/stats


Authentication

Authentication is handled via the Authorization header. There are no path or query parameters for this endpoint.

Header
Type
Required
Description

Authorization

string

Yes

Your secret API key, prefixed with Bearer .

Accept

string

Yes

Must be application/json.


Understanding the Response Body

The response object is composed of three main sections:

users_per_month

This object provides a monthly breakdown of total user registrations for the current calendar year.

"users_per_month": {
    "January": 0,
    "February": 0,
    "March": 1,
    // ...etc
}

users_per_status

This object gives you a real-time count of users categorized by their current status within the Trust Swiftly system.

Status
Description

total

The total number of user records associated with your account.

new

Users who have been created but have not yet started a verification flow.

banned

Users who have been explicitly banned.

unconfirmed

Users who are in a pending or processing state.

"users_per_status": {
    "total": 3,
    "new": 2,
    "banned": 0,
    "unconfirmed": 1
}

latest_registrations

This is an array containing the full user objects for the most recently created users on your account. While the full object is returned, the most relevant fields for statistical purposes are typically:

Field
Description

id

The user's unique ID within the Trust Swiftly system.

first_name

The user's first name.

last_name

The user's last name.

email

The user's email address.

status

The current status of the user (e.g., "Active", "Unconfirmed").

created_at

The timestamp when the user was created.


Example Request & Full Response

Request

curl --request GET \
  --url https://{sub-domain}.trustswiftly.com/api/stats \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Accept: application/json'

Full Response

Click to expand the full example response
{
  "users_per_month": {
    "January": 0,
    "February": 0,
    "March": 1,
    "April": 0,
    "May": 0,
    "June": 0,
    "July": 0,
    "August": 2,
    "September": 0,
    "October": 0,
    "November": 0,
    "December": 0
  },
  "users_per_status": {
    "total": 3,
    "new": 2,
    "banned": 0,
    "unconfirmed": 1
  },
  "latest_registrations": [
    {
      "id": 123,
      "first_name": "John",
      "last_name": "Doe",
      "username": "johndoe",
      "email": "[email protected]",
      "phone": "+381641234567",
      "avatar": "http://yourwebsite.com/users/milos-avatar.jpg",
      "address": "Some random street, 123, Serbia",
      "country_id": 688,
      "role_id": 1,
      "status": "Active",
      "birthday": "1989-01-03",
      "last_login": "2017-04-27 16:47:59",
      "two_factor_country_code": 381,
      "two_factor_phone": "6412345678",
      "two_factor_options": {
        "option1": 4,
        "option2": "option value"
      },
      "created_at": "2017-04-20 16:47:59",
      "updated_at": "2017-04-27 10:47:59"
    },
    {
      "id": 124,
      "first_name": "Jane",
      "last_name": "Smith",
      "username": "janesmith",
      "email": "[email protected]",
      "phone": "+1234567890",
      "avatar": null,
      "address": "123 Main St, Anytown, USA",
      "country_id": 840,
      "role_id": 1,
      "status": "Unconfirmed",
      "birthday": "1992-05-15",
      "last_login": null,
      "two_factor_country_code": null,
      "two_factor_phone": null,
      "two_factor_options": {},
      "created_at": "2024-09-20 11:30:00",
      "updated_at": "2024-09-20 11:30:00"
    }
  ]
}

Last updated