To refresh a pipeline from a script, send POST https://app.etlmcp.com/api/v1/pipelines/{pipeline_id}/runs. etlmcp answers 202 with the new run, whose status is queued. Keep its id, then call GET https://app.etlmcp.com/api/v1/runs/{run_id} every so often until status is success, partial or failed. Those three are the only final states; queued and running mean the run is still going. Put this in front of a dashboard build or a report export so it reads fresh numbers.
The full field lists live on the generated reference pages: Start a run and Get a run.
Before you start
You need an API key that carries the run scope. A key has either read alone or read and run; a read-only key gets 403 with this credential cannot start runs. See API keys. Send the key as a Bearer token in the Authorization header; the examples read it from $ETLMCP_API_KEY.
You also need the pipeline's id. List pipelines returns it, together with paused_reason, which tells you in advance whether the plan has paused the pipeline.
Step 1: start the run
With no body, the run re-pulls the same trailing window the nightly run would pull, ending today in the pipeline's timezone and never later than today in UTC. How far back it reaches depends on the connector: 7 days by default, and longer for some connectors. When those connectors are available, a Meta pipeline re-pulls 29 days and a Google Ads pipeline 31. It never reaches past the plan's history.
curl -s -X POST \
-H "Authorization: Bearer $ETLMCP_API_KEY" \
https://app.etlmcp.com/api/v1/pipelines/PIPELINE_ID/runs
To pull a fixed range instead, send a JSON body with start and end, both as YYYY-MM-DD. The range includes both days.
curl -s -X POST \
-H "Authorization: Bearer $ETLMCP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"start": "2026-10-01", "end": "2026-10-31"}' \
https://app.etlmcp.com/api/v1/pipelines/PIPELINE_ID/runs
The date rules, each answered with 400 and an error message:
| What you sent | The message |
|---|---|
Only start, or only end |
give both start and end, or neither for the trailing window |
start later than end |
start must not be after end |
end after today in UTC |
end must not be in the future |
| More than 366 days | a sync can cover at most 366 days |
A start older than the plan keeps |
the {…} plan keeps {…} days of history |
The body accepts only start and end: any other field is refused with 400 too. The history limit is the plan's own: Free keeps 30 days, Starter 365, Team 365, Agency 730 and Scale 3650. To fill more than 366 days, start one range, wait for it to finish with step 2, then start the next.
Step 2: wait for the run to end
Poll the run by its id and look at status. When it is final, read three fields:
rows_in: the rows pulled from the platform.rows_out: the rows delivered to the destination after the pipeline's transform rules.error: the reason, when the run did not succeed.
partial means the data was pulled and stored but delivery to the destination failed; failed means the run stopped before it reached the destination. Both carry an error.
Do not stop polling because error is set. When an attempt fails for a reason that can pass, etlmcp puts the run back to queued with the last error on it and tries again, up to 3 attempts in all, and the attempts field counts them. Only the status tells you the run is over. See Retries.
RUN_ID=$(curl -s -X POST -H "Authorization: Bearer $ETLMCP_API_KEY" \
https://app.etlmcp.com/api/v1/pipelines/PIPELINE_ID/runs | jq -r .id)
while true; do
RUN=$(curl -s -H "Authorization: Bearer $ETLMCP_API_KEY" \
https://app.etlmcp.com/api/v1/runs/$RUN_ID)
STATUS=$(echo "$RUN" | jq -r .status)
case "$STATUS" in
success) echo "$RUN" | jq '{rows_in, rows_out}'; break ;;
partial|failed) echo "$RUN" | jq '{status, error}'; exit 1 ;;
esac
sleep 30
done
Pick a modest interval. Each credential may make 120 requests a minute, REST and MCP counted together, and a script that polls in a tight loop can use them up. Over the limit, the answer is 429 with rate limit exceeded; retry later and a Retry-After header giving the seconds to wait.
When the start is refused with 409
A 409 means the run was not created, so there is no run id to poll. The error message says why:
a sync is already running for this pipeline: the pipeline already has a run that is queued or running, scheduled or by hand. Only one may be active per pipeline. Find it with List runs and wait for it instead of starting another.this pipeline is paused by the plan's limits: the plan paused the pipeline. Switch it back on first, which the plan must have room for.{…} syncs are already queued or running: wait for one: your organization has as many runs started by hand queued or running as the plan allows, 10 on Free. Scheduled syncs neither count toward this cap nor are held by it.
A source that needs reconnecting, or one that is no longer accessible, is refused with 400 before any date check. See Status codes for the full list of answers.