Skip to main content
POST
/
v1
/
rules
/
list
C#
// POST /v1/rules/list
const stytch = require('stytch');

const client = new stytch.B2BClient({
  project_id: '${projectId}',
  secret: '${secret}',
});

const params = {
  limit: 10,
};

client.Fraud.Rules.List(params)
  .then(resp => { console.log(resp) })
  .catch(err => { console.log(err) });
{
  "request_id": "<string>",
  "next_cursor": "<string>",
  "rules": [
    {
      "rule_type": "VISITOR_ID",
      "action": "ALLOW",
      "created_at": "<string>",
      "visitor_id": "<string>",
      "browser_id": "<string>",
      "visitor_fingerprint": "<string>",
      "browser_fingerprint": "<string>",
      "hardware_fingerprint": "<string>",
      "network_fingerprint": "<string>",
      "cidr_block": "<string>",
      "country_code": "<string>",
      "asn": "<string>",
      "description": "<string>",
      "expires_at": "<string>",
      "last_updated_at": "<string>"
    }
  ],
  "status_code": 123
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Request type

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
integer<int32>

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

Successful response

request_id
string
required

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.

next_cursor
string
required

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.

rules
object[]
required

A list of rules for the project

status_code
integer<int32>
required

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.