$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "csvText": "Customer ID, Full Name ,Email,Amount,Order Date\nC-001, Alice Smith ,ALICE@ACME.COM,1250.50,2026-08-01\nC-001,Alice Smith,alice@acme.com,1250.50,2026-08-01",
< "format": "auto",
< "normalizeColumnNames": true,
< "trimWhitespace": true,
< "emptyAsNull": true,
< "columnRules": [
< {
< "column": "amount",
< "type": "number",
< "required": true,
< "min": 0
< },
< {
< "column": "order_date",
< "type": "date",
< "required": true
< },
< {
< "column": "email",
< "type": "string",
< "pattern": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"
< }
< ],
< "deduplicateBy": [
< "customer_id",
< "order_date"
< ],
< "duplicateAction": "flag",
< "caseInsensitiveDuplicates": true,
< "maxRows": 20
<}
<EOF
$curl "https://api.apify.com/v2/actors/automation-lab~csv-excel-data-quality-cleaner/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'