$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "specCode": "describe('spec', () => {\n it('test that should succeed', () => {\n cy.visit('/');\n cy.get('h1').should('contain', 'Example Domain');\n cy.screenshot();\n });\n\n it('test that should fail', () => {\n cy.visit('/');\n cy.get('h1', { timeout: 1000 }).should('contain', 'Some different text');\n });\n});",
< "baseUrl": "https://example.com"
<}
<EOF
$curl "https://api.apify.com/v2/acts/valek.josef~cypress-test-runner/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'