# Campaigns

This object allows you to create custom Campaigns. A Campaign is characterized by a set of rules, defined
as a SQL query created in Redash and associated with the Campaign. A Campaign can be triggered at predefined
intervals. For example, a Campaign can be triggered every day to add borrowers who are 30 days past due. Campaigns
can also be manually triggered.
When a Campaign is triggered by schedule or manually, a query is executed against the lender's replica data and
returns a list of person IDs. The output is sent to the configured Contact Exporter to be written as a configurable
CSV file with contact information required by auto dialers and other systems.

 - [GET /campaigns](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers.campaign_get_all.md): Get a list of all campaigns.
 - [POST /campaigns](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers.campaign_create.md): Create a new campaign by associating a Redash query that returns a single column containing borrower IDs labeled "id". The campaign can also be scheduled.
 - [GET /campaigns/{borrowerCampaignId}](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers.campaign_get.md): Get a campaign by ID.
 - [PUT /campaigns/{borrowerCampaignId}](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers.campaign_update.md): Update a campaign by ID.
 - [GET /campaigns/{borrowerCampaignId}/runs](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers_runs.campaign_run_list.md): Get a list of campaign runs.
 - [POST /campaigns/{borrowerCampaignId}/runs](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers_runs.campaign_run_create.md): 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 `ContextExporte
 - [GET /campaigns/{borrowerCampaignId}/runs/{borrowerCampaignRunId}](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers_runs.campaign_run_read.md): Get campaign run data by ID.
 - [PUT /campaigns/{borrowerCampaignId}/runs/{borrowerCampaignRunId}](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers_runs.campaign_run_update.md): Update campaign run data.
 - [GET /campaigns/{borrowerCampaignId}/runs/{borrowerCampaignRunId}/download](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers_runs.campaign_run_download.md): Download files generated by a campaign run.
 - [GET /companies/{companyId}/campaigns/{borrowerCampaignId}/runs](https://docs.peachfinance.com/api-docs/api-public/campaigns/peach.people.campaigns.handlers_runs.internal_campaign_run_list.md): Get a list of campaign runs.
