How to force a Phantom to reprocess its input via API

Sophie
Sophie This badge shows you’re hearing straight from the source! Team members are here to share insider tips, answer questions, and guide you through PhantomBuster with expert knowledge. They’re dedicated to helping you succeed and making sure your automation journey feels easy and exciting. PhantomBuster Official
  • Updated

To force a Phantom to reprocess its input via API, rename its results file (csvName), pass a new file name per launch via bonusArgument, or change its File Management setting - all three break the memory a Phantom uses to skip already-processed inputs.

Why a Phantom may skip input on an API launch

Launching a Phantom via API and launching it manually from your PhantomBuster Dashboard work the same way under the hood.

When you click Launch in PhantomBuster, an API call is made using the Phantom’s current setup, it’s just invisible to your eye.

Because of this, API launches follow the same processing logic as manual launches.

By default, a Phantom uses its result file (usually a CSV) as a form of memory:

  • It checks which inputs were already processed.
  • It skips those inputs on the next launch.
  • Only new or unprocessed input is handled.

This is expected behavior and helps prevent duplicates.

When you may want to reprocess input via API

You may want to force a Phantom to start from scratch when:

  • You need fresh or updated data from the same input.
  • The previous results are outdated.
  • You’re testing or debugging an automation.
  • You intentionally want to rerun the same input again via API.

How to force reprocessing

There are three ways to force a Phantom to reprocess its input via API. All three work by changing something about how results are stored, which signals to the Phantom that the previous data is no longer the baseline.

Method 1 (recommended): Change csvName via /agents/save

Send a POST request to the /agents/save endpoint with the Phantom's Agent ID and an updated argument JSON containing a new csvName value.

Example:
{"id": "your-agent-id", "argument": "{"csvName": "result-rerun-2026-07-20"}"}

Effect: the Phantom creates a fresh results file on its next launch, and all inputs are reprocessed from scratch.
Persistence: permanent - the new csvName stays until you change it again.

Use this when you want to reset the Phantom's baseline for all future launches.

Method 2: Pass a new csvName per launch via bonusArgument in /agents/launch

For a one-off rerun without touching the saved setup, pass a bonusArgument field in your /agents/launch call.

Example:
{"id": "your-agent-id", "bonusArgument": "{"csvName": "result-oneoff-2026-07-20"}"}

Effect: same as Method 1 (new file, all inputs reprocessed), but scoped to that single launch only. The Phantom's saved setup stays unchanged.

Use this when you need a one-time reset without affecting future scheduled launches.

Method 3: Set File Management via /agents/save

You can control how the Phantom handles its results file by setting the fileManagement parameter in /agents/save. Accepted values:

  • folders: creates a new file on each launch (results accumulate across separate files)
  • mix: combines new results with the previous file
  • delete: deletes the previous file before each launch, always starting fresh

You can also set fileMgmtMaxFolders to cap how many separate files accumulate when using folders.

Use delete when you always want a clean slate on every launch, or folders when you want to keep a history of separate run files.

Showing method 3: set file management via /agents/save endpoint

Watcher mode is not a force-reprocess option. It keeps the same results file and only adds new results on top of existing ones. If you need a full reset, use one of the three methods above. 
→ See How to Fix Empty and Already Processed Input Errors for the default processing logic.

Frequently asked questions

What's the difference between Method 1 and Method 2?

Method 1 permanently updates the Phantom's saved setup: all future launches use the new file name. Method 2 applies the new file name to a single launch only, without touching the saved setup.

Does reprocessing create duplicate results?

Yes. If the same input was in your previous results file, it will appear again in the new one. Make sure you want a full reset before using any of these methods.

Can I set File Management via /agents/launch instead of /agents/save?

No. The fileManagement parameter is only accepted by /agents/save. The /agents/launch endpoint doesn't support it.

Does this work for chained Phantoms?

Each Phantom in a chain has its own results file. You'll need to reset each one individually to reprocess the full chain from scratch.

What if I only want to reprocess one specific row, not all inputs?

These methods reset the entire results baseline, there's no API option to target a single row. For partial reprocessing, remove that row from the results file manually before relaunching.

Was this article helpful?

0 out of 0 found this helpful