Radar supports explicitly blocking and allowing attempts based on attempt attributes. You can manage these lists via the Radar list management APIs
Add an entry to a Radar list.
curl --request POST \ --url "https://api.workos.com/radar/lists/ip_address/block" \ --header "Authorization: Bearer sk_example_123456789" \ --header "Content-Type: application/json" \ -d @- <<'BODY' { "entry": "198.51.100.42" } BODY
| curl --request POST \ | |
| --url "https://api.workos.com/radar/lists/ip_address/block" \ | |
| --header "Authorization: Bearer sk_example_123456789" \ | |
| --header "Content-Type: application/json" \ | |
| -d @- <<'BODY' | |
| { | |
| "entry": "198.51.100.42" | |
| } | |
| BODY |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.api_key = "sk_example_123456789" | |
| end | |
| WorkOS.client.radar.add_list_entry( | |
| type: "ip_address", | |
| action: "block", | |
| entry: "198.51.100.42" | |
| ) |
| from workos import WorkOSClient | |
| client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789") | |
| client.radar.add_list_entry(type_="ip_address", action="block", entry="198.51.100.42") |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v9" | |
| ) | |
| func main() { | |
| client := workos.NewClient("sk_example_123456789") | |
| _, err := client.Radar().AddListEntry(context.Background(), "ip_address", "block", &workos.RadarAddListEntryParams{ | |
| Entry: "198.51.100.42", | |
| }) | |
| if err != nil { | |
| panic(err) | |
| } | |
| } |
| <?php | |
| use WorkOS\WorkOS; | |
| $workos = new WorkOS( | |
| apiKey: "sk_example_123456789", | |
| clientId: "client_123456789", | |
| ); | |
| $workos | |
| ->radar() | |
| ->addListEntry(type: "ip_address", action: "block", entry: "198.51.100.42"); |
| import com.workos.WorkOS; | |
| import com.workos.radar.RadarApi.AddListEntryOptions; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| AddListEntryOptions options = | |
| AddListEntryOptions.builder().entry("198.51.100.42").build(); | |
| workos.radar.addListEntry("ip_address", "block", options); |
| using WorkOS; | |
| var client = new WorkOSClient(new WorkOSOptions { | |
| ApiKey = "sk_example_123456789", | |
| ClientId = "client_123456789", | |
| }); | |
| await client.Radar.AddListEntryAsync("ip_address", "block", | |
| new RadarAddListEntryOptions { | |
| Entry = "198.51.100.42", | |
| }); |
| use workos::Client; | |
| use workos::radar::AddListEntryParams; | |
| #[tokio::main] | |
| async fn main() -> Result<(), workos::Error> { | |
| let client = Client::builder() | |
| .api_key("sk_example_123456789") | |
| .client_id("client_123456789") | |
| .build(); | |
| let _result = client | |
| .radar() | |
| .add_list_entry( | |
| "ip_address", | |
| "block", | |
| AddListEntryParams { | |
| entry: "198.51.100.42".into(), | |
| ..Default::default() | |
| } | |
| ) | |
| .await?; | |
| Ok(()) | |
| } |
POST/radar /lists /:type /:actionParameters Returns Remove an entry from a Radar list.
curl --request DELETE \ --url "https://api.workos.com/radar/lists/ip_address/block" \ --header "Authorization: Bearer sk_example_123456789" \ --header "Content-Type: application/json" \ -d @- <<'BODY' { "entry": "198.51.100.42" } BODY
| curl --request DELETE \ | |
| --url "https://api.workos.com/radar/lists/ip_address/block" \ | |
| --header "Authorization: Bearer sk_example_123456789" \ | |
| --header "Content-Type: application/json" \ | |
| -d @- <<'BODY' | |
| { | |
| "entry": "198.51.100.42" | |
| } | |
| BODY |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.api_key = "sk_example_123456789" | |
| end | |
| WorkOS.client.radar.remove_list_entry( | |
| type: "ip_address", | |
| action: "block", | |
| entry: "198.51.100.42" | |
| ) |
| from workos import WorkOSClient | |
| client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789") | |
| client.radar.remove_list_entry( | |
| type_="ip_address", action="block", entry="198.51.100.42" | |
| ) |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v9" | |
| ) | |
| func main() { | |
| client := workos.NewClient("sk_example_123456789") | |
| _, err := client.Radar().RemoveListEntry(context.Background(), "ip_address", "block", &workos.RadarRemoveListEntryParams{ | |
| Entry: "198.51.100.42", | |
| }) | |
| if err != nil { | |
| panic(err) | |
| } | |
| } |
| <?php | |
| use WorkOS\WorkOS; | |
| $workos = new WorkOS( | |
| apiKey: "sk_example_123456789", | |
| clientId: "client_123456789", | |
| ); | |
| $workos | |
| ->radar() | |
| ->removeListEntry( | |
| type: "ip_address", | |
| action: "block", | |
| entry: "198.51.100.42", | |
| ); |
| import com.workos.WorkOS; | |
| import com.workos.radar.RadarApi.RemoveListEntryOptions; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| RemoveListEntryOptions options = | |
| RemoveListEntryOptions.builder().entry("198.51.100.42").build(); | |
| workos.radar.removeListEntry("ip_address", "block", options); |
| using WorkOS; | |
| var client = new WorkOSClient(new WorkOSOptions { | |
| ApiKey = "sk_example_123456789", | |
| ClientId = "client_123456789", | |
| }); | |
| await client.Radar.RemoveListEntryAsync("ip_address", "block", | |
| new RadarRemoveListEntryOptions { | |
| Entry = "198.51.100.42", | |
| }); |
| use workos::Client; | |
| use workos::radar::RemoveListEntryParams; | |
| #[tokio::main] | |
| async fn main() -> Result<(), workos::Error> { | |
| let client = Client::builder() | |
| .api_key("sk_example_123456789") | |
| .client_id("client_123456789") | |
| .build(); | |
| let _result = client | |
| .radar() | |
| .remove_list_entry( | |
| "ip_address", | |
| "block", | |
| RemoveListEntryParams { | |
| entry: "198.51.100.42".into(), | |
| ..Default::default() | |
| } | |
| ) | |
| .await?; | |
| Ok(()) | |
| } |
DELETE/radar /lists /:type /:actionParameters Returns