$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "rawData": "[{\"name\": \"John Doe\", \"email\": \"john@example.com\", \"phone\": \"5551234567\"}, {\"name\": \"Jane Smith\", \"email\": \"jane@test.org\", \"phone\": \"+1-555-987-6543\"}]",
< "targetExample": {
< "full_name": "Jane Doe",
< "email": "jane@example.com",
< "phone": "+1 (555) 123-4567",
< "company": "Acme Corp",
< "signup_date": "2026-01-15",
< "is_active": true
< },
< "targetSchema": {
< "fields": {
< "email": {
< "type": "string",
< "format": "email",
< "required": true,
< "description": "Contact email"
< },
< "full_name": {
< "type": "string",
< "required": true,
< "description": "Full name"
< },
< "phone": {
< "type": "string",
< "description": "Phone number"
< },
< "signup_date": {
< "type": "date",
< "description": "When they signed up"
< },
< "is_vip": {
< "type": "boolean",
< "description": "VIP customer flag"
< }
< }
< },
< "fieldMappings": {
< "email_address": "email",
< "full_name": "firstname",
< "company_name": "company",
< "phone_number": "phone",
< "city": "city"
< },
< "validationRules": {
< "email": {
< "pattern": "^[^@]+@[^@]+\\.[^@]+$"
< },
< "country": {
< "enum": [
< "US",
< "GB",
< "DE",
< "FR",
< "CA"
< ]
< },
< "age": {
< "min": 0,
< "max": 150
< }
< },
< "transformationRules": [
< {
< "sourceField": "full_name",
< "targetField": "firstname",
< "transform": "split_name",
< "params": {
< "output": "first"
< }
< },
< {
< "sourceField": "full_name",
< "targetField": "lastname",
< "transform": "split_name",
< "params": {
< "output": "last"
< }
< },
< {
< "sourceField": "signup_date",
< "targetField": "created_at",
< "transform": "date_normalize",
< "params": {
< "target_format": "%Y-%m-%d"
< }
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/acts/filip_cicvarek~data-bridge/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'