# Run campaign

Start a new borrower campaign run and save results.
The behavior of the campaign run is controlled by configured settings on
the campaign object and via the associated `BulkSender` and `ContextExporter` objects.
By default when the campaign runs, it executes the Redash query referenced in the
`redashQueryUrl` and feeds the query results as input to the campaign run.
Optionally, you can override this by specifing a `queryResultsOverride` field
as input.

Endpoint: POST /campaigns/{borrowerCampaignId}/runs
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `borrowerCampaignId` (string, required)

## Request fields (application/json):

  - `queryResultsOverride` (array)
    Instead of running the Redash query specified in the Campaign object at `queryRedashUrl`
you can overide that query by providing a query results override.
Instead of the query being run and its results being used as campaign input, the data provided here
is fed into the campaign as input.
    Example: [{"borrowerId":1,"loanId":101},{"borrowerId":2,"loanId":102},{"borrowerId":3,"loanId":103}]

## Response 200 fields (application/json):

  - `availableFiles` (array)
    The list of files currently available for download via this campaign run's `.../download` endpoint.

  - `borrowerCampaignId` (string)
    The ID of the borrower campaign to which this campaign run belongs.

  - `status` (string)
    The status of a campaign run
    Enum: "failed", "success", "processing", "initializing"

