Skip to main content
POST
/
api
/
public
/
v1
/
block-rules
Create block rule
curl --request POST \
  --url https://app.tagadapay.com/api/public/v1/block-rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Block High Risk Countries",
  "type": "country",
  "value": [
    "XX",
    "YY"
  ],
  "enabled": true
}'
{
  "id": "rule_123",
  "name": "Block High Risk Countries",
  "enabled": true,
  "type": "country",
  "value": [
    "XX",
    "YY"
  ],
  "createdAt": "2024-03-20T10:30:00Z"
}

Authorizations

Authorization
string
header
required

Enter your API key as: Bearer your-api-key

Body

application/json
name
string
required
Minimum length: 1
operator
enum<string>
required
Available options:
OR,
AND
ipAddress
required
customerId
string | null
required
email
string<email> | null
required
emailRegex
string | null
required
pan
string | null
required
panRegex
string | null
required
bin
string | null
required
binRegex
string | null
required
paymentId
string | null
required
autoCreated
boolean
default:false
isPermanent
boolean
default:false
ttlHours
number
Required range: 1 <= x <= 8760
metadata
object | null

Response

Successful response

The response is of type any.