> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://virtuous.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://virtuous.ferndocs.com/_mcp/server.

# Listcampaigns

GET https://prod-api.raisedonors.com/api/Campaign/list

Reference: https://virtuous.ferndocs.com/reference/raise/campaign/listcampaigns

## Authentication

- `Authorization` header (required) — JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer \{token}"

## Request

### Query parameters

- `Filter` (string, optional)
- `Skip` (integer, optional)
- `Take` (integer, optional)
- `SortBy` (enum, optional) — Field to sort by (case-insensitive). Valid options: avggiftgoal, enddate, id, startdate
  - Allowed values: `avggiftgoal`, `enddate`, `id`, `startdate`
- `Descending` (boolean, optional)
- `IncludeDetails` (boolean, optional)

## Response

### 200

OK

- `items` (list of CampaignModel, optional)
- `total` (integer, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `Campaign_ListCampaignsRequestBadRequestError`
  - ProblemDetails: ProblemDetails
  - HttpValidationProblemDetails: HttpValidationProblemDetails

## Types

### CampaignModel

Represents the detailed view of a campaign returned by create, update, and single-campaign retrieval endpoints.

- `id` (long, optional) — Gets or sets the identifier.
- `name` (string, optional, nullable) — Gets or sets the name.
- `description` (string, optional, nullable) — Gets or sets the description.
- `startDate` (string, optional, nullable) — Gets or sets the start date.
- `endDate` (string, optional, nullable) — Gets or sets the end date.
- `duration` (string, optional, nullable) — Gets or sets the duration.
- `canSync` (boolean, optional) — Gets or sets the can sync.
- `crmKey` (string, optional, nullable) — Gets or sets the crmkey.
- `crmKeyUrls` (map from string to CrmUrlInfo, optional, nullable) — CRM URLs for this campaign grouped by integration type.
- `applySegmentToRecurringGifts` (boolean, optional) — Gets or sets the apply segment to recurring gifts.
- `givingGoal` (double, optional) — The giving goal for the campaign in the organization base currency.
- `givingGoalFormatted` (string, optional, nullable) — The giving goal formatted for display in the organization currency (for example "$10,000.00").
- `hasGivingGoal` (boolean, optional) — Gets or sets the has giving goal.
- `raisedAmount` (string, optional, nullable) — Gets or sets the raised amount.
- `raisedPercentage` (double, optional) — Percentage of the giving goal that has been raised (0–100).
- `totalGiftGoal` (integer, optional) — Gets or sets the total gift goal.
- `hasTotalGiftGoal` (boolean, optional) — Gets or sets the has total gift goal.
- `totalGifts` (integer, optional) — Gets or sets the total gifts.
- `totalGiftsPercentage` (double, optional) — Percentage of the gift count goal that has been reached (0–100).
- `totalDonors` (integer, optional) — Gets or sets the total donors.
- `averageGiftGoal` (double, optional) — The target average gift amount in the organization base currency.
- `averageGiftGoalFormatted` (string, optional, nullable) — The target average gift amount formatted for display (for example "$100.00").
- `averageGiftAmount` (string, optional, nullable) — The actual average gift amount formatted for display.
- `hasAverageGiftGoal` (boolean, optional) — Gets or sets the has average gift goal.
- `totalVisitors` (integer, optional) — Gets or sets the total visitors.
- `conversionRate` (string, optional, nullable) — The conversion rate for the campaign formatted as a percentage string (for example "12.3%").
- `createdDateTime` (string, optional, nullable) — Gets or sets the created date time.
- `modifiedDateTime` (string, optional, nullable) — Gets or sets the modified date time.

### ProblemDetails

- `type` (string, optional, nullable)
- `title` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)

### HttpValidationProblemDetails

- `detail` (string, optional, nullable)
- `errors` (map from string to list of string, optional, nullable)
- `instance` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `title` (string, optional, nullable)
- `type` (string, optional, nullable)

### CrmUrlInfo

- `crmKey` (string, optional, nullable)
- `url` (string, optional, nullable)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "items": [
    {
      "id": 1024,
      "name": "Spring Fundraiser 2024",
      "description": "Annual campaign to support local community projects during spring.",
      "startDate": "2024-03-01T00:00:00Z",
      "endDate": "2024-05-31T23:59:59Z",
      "duration": "3 months",
      "canSync": true,
      "crmKey": "SPRING2024",
      "crmKeyUrls": {
        "Salesforce": {
          "crmKey": "SPRING2024",
          "url": "https://salesforce.example.com/campaigns/SPRING2024"
        },
        "HubSpot": {
          "crmKey": "SPRING2024",
          "url": "https://app.hubspot.com/campaigns/SPRING2024"
        }
      },
      "applySegmentToRecurringGifts": true,
      "givingGoal": 50000,
      "givingGoalFormatted": "$50,000.00",
      "hasGivingGoal": true,
      "raisedAmount": "$32,500.00",
      "raisedPercentage": 65,
      "totalGiftGoal": 250,
      "hasTotalGiftGoal": true,
      "totalGifts": 180,
      "totalGiftsPercentage": 72,
      "totalDonors": 150,
      "averageGiftGoal": 200,
      "averageGiftGoalFormatted": "$200.00",
      "averageGiftAmount": "$180.56",
      "hasAverageGiftGoal": true,
      "totalVisitors": 1200,
      "conversionRate": "15.0%",
      "createdDateTime": "2024-01-15T10:00:00Z",
      "modifiedDateTime": "2024-04-10T16:45:00Z"
    }
  ],
  "total": 1
}
```

**SDK Code**

```python
import requests

url = "https://prod-api.raisedonors.com/api/Campaign/list"

querystring = {"SortBy":"avggiftgoal"}

payload = {}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://prod-api.raisedonors.com/api/Campaign/list?SortBy=avggiftgoal';
const options = {
  method: 'GET',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://prod-api.raisedonors.com/api/Campaign/list?SortBy=avggiftgoal"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://prod-api.raisedonors.com/api/Campaign/list?SortBy=avggiftgoal")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://prod-api.raisedonors.com/api/Campaign/list?SortBy=avggiftgoal")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://prod-api.raisedonors.com/api/Campaign/list?SortBy=avggiftgoal', [
  'body' => '{}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://prod-api.raisedonors.com/api/Campaign/list?SortBy=avggiftgoal");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://prod-api.raisedonors.com/api/Campaign/list?SortBy=avggiftgoal")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```