/
Contact usSee pricingStart building
    Introduction
    Device Fingerprinting
      Fingerprint Lookup
      Fingerprint Lookup (Deprecated)
      Set Rule
      Get Rules
      Set Verdict Reason Override
      Get Verdict Reasons
    Errors
      Overview
      Error object
      400
      401
      403
      404
      408
      499
      500
      503
Get support on SlackVisit our developer forum

Contact us

Fraud and Risk Prevention

/

API reference

/

Device Fingerprinting

/

Get Rules

Get Rules

POST
https://telemetry.stytch.com/v1/rules/list

Get all rules that have been set for your project.


Body parameters


cursor string

The cursor field allows you to paginate through your results. Each result array is limited to 100 results. If your query returns more than 100 results, you will need to paginate the responses using the cursor. If you receive a response that includes a non-null next_cursor, repeat the request with the next_cursor value set to the cursor field to retrieve the next page of results. Continue to make requests until the next_cursor in the response is null.


limit int

The number of results to return per page. The default limit is 10. A maximum of 100 results can be returned by a single get request. If the total size of your result set is greater than one page size, you must paginate the response. See the cursor field.


Response fields


request_id string

Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.


status_code int

The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.


rules array[objects]

A list of rules for the project

rule_type string

The rule type. The possible values are VISITOR_ID, BROWSER_ID, VISITOR_FINGERPRINT, BROWSER_FINGERPRINT, HARDWARE_FINGERPRINT, NETWORK_FINGERPRINT, CIDR_BLOCK, ASN, or COUNTRY_CODE.

action string

The action (ALLOW, BLOCK, or CHALLENGE) that will be returned for this rule.

description string

A description for the rule.

visitor_id string

The visitor ID that a rule was set for.

browser_id string

The browser ID that a rule was set for.

visitor_fingerprint string

The visitor fingerprint that a rule was set for.

browser_fingerprint string

The browser fingerprint that a rule was set for.

hardware_fingerprint string

The hardware fingerprint that a rule was set for.

network_fingerprint string

The network fingerprint that a rule was set for.

cidr_block string

The CIDR block that a rule was set for. If an end user's IP address is within this CIDR block, this rule will be applied.

asn string

The ASN that a rule was set for.

country_code string

The country code that a rule was set for.

created_at string

The time when the rule was created. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. 2021-12-29T12:33:09Z.

expires_at string

The timestamp when the rule expires. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. 2021-12-29T12:33:09Z.

last_updated_at string

The time when the rule was last updated. Will be null if the rule has never been updated. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. 2021-12-29T12:33:09Z.


next_cursor string

The next_cursor string is returned when your result contains more than one page of results. This value is passed into your next request in the cursor field.

const stytch = require('stytch');

const client = new stytch.Client({
  project_id: 'PROJECT_ID',
  secret: 'SECRET',
});

const params = {
  limit: 10,
};

client.fraud.rules.list(params)
  .then(resp => { console.log(resp) })
  .catch(err => { console.log(err) });
RESPONSE 200
200
​
{
  "next_cursor": "",
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "rules": [
    {
      "action": "CHALLENGE",
      "browser_id": "",
      "visitor_id": "visitor-6139cbcc-4dda-4b1f-b1c0-13c08ec64d72",
      "visitor_fingerprint": "",
      "browser_fingerprint": "",
      "hardware_fingerprint": "",
      "network_fingerprint": "",
      "asn": "",
      "cidr_block":,
      "country_code": "",
      "description": "",
      "rule_type": "VISITOR_ID",
      "created_at": "2024-01-01T00:00:00Z",
      "expires_at": "2033-01-01T00:00:00Z",
      "last_updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "status_code": 200
}
RESPONSE 401
200
​
{
  "status_code": 401,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "error_type": "unauthorized_credentials",
  "error_message": "Unauthorized credentials.",
  "error_url": "https://stytch.com/docs/api/errors/401"
}
RESPONSE 429
200
​
{
  "status_code": 429,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "error_type": "too_many_requests",
  "error_message": "Too many requests have been made.",
  "error_url": "https://stytch.com/docs/api/errors/429"
}
RESPONSE 500
200
​
{
  "status_code": 500,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "error_type": "internal_server_error",
  "error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
  "error_url": "https://stytch.com/docs/api/errors/500"
}