Every agent run creates a job. Jobs are asynchronous, you submit parameters, get a job ID back, then poll until results are ready.
Job Lifecycle
| Status | Description |
|---|
queued | Job is waiting to be processed |
running | Agent is actively collecting data |
completed | Finished, results are available |
failed | Error occurred, check the error field |
cancelled | Cancelled by you, nothing charged |
Job results expire after 7 days. Download your data before the expires_at timestamp.
Quick Example
# Start a job
curl -X POST https://api.mindcase.co/api/v1/agents/instagram/profiles/run \
-H "Authorization: Bearer mk_live_abc123def456" \
-H "Content-Type: application/json" \
-d '{"params": {"usernames": ["nike"]}}'
# → {"job_id": "abc123", "status": "queued"}
# Poll status
curl https://api.mindcase.co/api/v1/jobs/abc123 \
-H "Authorization: Bearer mk_live_abc123def456"
# Get results when completed
curl https://api.mindcase.co/api/v1/jobs/abc123/results \
-H "Authorization: Bearer mk_live_abc123def456"
# Cancel if needed
curl -X DELETE https://api.mindcase.co/api/v1/jobs/abc123 \
-H "Authorization: Bearer mk_live_abc123def456"