$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "preset": "seo-friendly",
< "sitemaps": [
< "https://example.com/sitemap.xml"
< ],
< "host": "example.com",
< "rules": [
< {
< "userAgents": [
< "*"
< ],
< "allow": [
< "/"
< ],
< "disallow": [
< "/admin/",
< "/private/"
< ],
< "crawlDelay": 1,
< "comment": "Default rules for all bots"
< },
< {
< "userAgents": [
< "Googlebot"
< ],
< "allow": [
< "/"
< ],
< "disallow": [],
< "comment": "Give Googlebot full access"
< }
< ],
< "presetConflictMode": "append",
< "sites": [
< {
< "label": "Marketing site",
< "preset": "seo-friendly",
< "sitemaps": [
< "https://example.com/sitemap.xml"
< ],
< "host": "example.com"
< },
< {
< "label": "Staging site",
< "preset": "staging-private",
< "sitemaps": [],
< "host": "staging.example.com"
< }
< ],
< "validateRules": true,
< "includeTimestamp": true,
< "includeGeneratorComment": true
<}
<EOF
$curl "https://api.apify.com/v2/acts/maximedupre~robots-txt-generator/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'