Skip to content
StraventaDocs

Create a block/allow list

Creates a new block or allow list with the specified entry type. Once created, add entries via `POST /v1/fraud/lists/{id}/entries`. Requires `fraud.lists.write`.

POST
/v1/fraud/lists

Creates a new block or allow list with the specified entry type. Once created, add entries via POST /v1/fraud/lists/{id}/entries. Requires fraud.lists.write.

Authorization

bearerAuth
AuthorizationBearer <token>

PayOps platform JWT issued by the auth-service. The tenant_id claim is extracted server-side; callers do NOT send tenant_id in the request body.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/fraud/lists" \  -H "Content-Type: application/json" \  -d '{    "name": "Known bad IPs",    "kind": "block",    "entry_type": "ip"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "kind": "block",
  "entry_type": "ip",
  "created_at": "2019-08-24T14:15:22Z"
}
{
  "error": "validation_failed",
  "message": "required field 'value' is missing",
  "request_id": "01JA8BHN2P0ECTXN3J6TBKMS7Q"
}
{
  "error": "forbidden",
  "message": "missing required permission: fraud.rules.write",
  "request_id": "01JA8BHN2P0ECTXN3J6TBKMS7Q"
}

Was this page helpful?