Set Rule

POSThttps://telemetry.stytch.com/v1/rules/set

Set a rule for a particular visitor ID, browser ID, visitor_fingerprint, browser_fingerprint, hardware_fingerprint, or network_fingerprint. This is helpful in cases where you want to allow or block a specific user or fingerprint. You should be careful to set rules for browser_fingerprint, hardware_fingerprint, or network_fingerprint as they can be shared across multiple users, and you can affect more users than intended.


Body parameters


visitor_idstring

browser_idstring

visitor_fingerprintstring

browser_fingerprintstring

hardware_fingerprintstring

network_fingerprintstring

action*string

expires_in_minutesint

Response fields


request_idstring

status_codeint

actionstring

browser_idstring

visitor_idstring

visitor_fingerprintstring

browser_fingerprintstring

hardware_fingerprintstring

network_fingerprintstring
curl --request POST \
  --url https://telemetry.stytch.com/v1/rules/set \
  -u 'PROJECT_ID:SECRET' \
  --data '{
	"visitor_id": "visitor-6139cbcc-4dda-4b1f-b1c0-13c08ec64d72",
	"action": "CHALLENGE",
	"expires_in_minutes": 120
}'

RESPONSE

200
{
  "action": "CHALLENGE",
  "browser_id": "browser-id-99cffb93-6378-48a5-aa90-d680232a7979",
  "visitor_id": "",
  "visitor_fingerprint": "",
  "browser_fingerprint": "",
  "hardware_fingerprint": "",
  "network_fingerprint": "",
  "expires_at": "2033-01-01T00:00:00Z",
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "status_code": 200
}