Launch a campaign
POST/campaign/:id/launch
Queues a run of the saved campaign: a campaign run in status PENDING, whose run_config holds the spec resolved with the agent as target. With executor: cloud, HackAgent's cloud worker claims and executes it, and its LLM gateway calls are charged to the organization's credits. With executor: local, the response's command (hackagent run <id>) executes it on your machine. The launch runs the preflight checks first (see GET /campaign/{id}/preflight) and queues nothing when one fails (400 with problems). Follow the run with GET /run/{id}/summary.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 429
Created
Refused, nothing queued: problems lists the failed preflight checks, spec the errors of a saved spec that no longer validates; an invalid body answers field errors instead.
Missing, invalid, expired or revoked credential, or a credential this endpoint does not accept.
The credential may not do this (for example a caller without an organization). Also refused when the installation's license has no runs left this month (code: license_run_limit) or is not valid (code: license_read_only).
Not found: no such object in the caller's organization.
Rate limited: retry after the number of seconds in the Retry-After header.