> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.crowdchange.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Campaigns

> Retrieve a paginated list of CrowdChange campaigns where the authenticated user is registered, including role, goal, and amount raised per campaign.

## Query parameters

<ParamField query="token" type="string" required>
  User's access token.
</ParamField>

<ParamField query="text" type="string">
  Search term.
</ParamField>

<ParamField query="page" type="integer">
  Page number. Default: `1`
</ParamField>

<ParamField query="limit" type="integer">
  Number of results to return. Default: `10`
</ParamField>

<ParamField query="sort" type="string">
  Key to sort by. Allowed values: `name`, `amount_raised`, `amount_goal`
</ParamField>

<ParamField query="direction" type="string">
  Direction of sorting. Allowed values: `asc`, `desc`
</ParamField>

<ParamField query="lang" type="string">
  API's locale. Allowed values: `en`, `fr`
</ParamField>

## Response

Returns an array of objects with the following fields.

<ResponseField name="id" type="integer">
  Campaign ID.
</ResponseField>

<ResponseField name="name" type="string">
  Campaign name.
</ResponseField>

<ResponseField name="amount_goal" type="number">
  Goal amount.
</ResponseField>

<ResponseField name="amount_goal_formatted" type="string">
  Formatted goal amount of the campaign, includes currency symbol.
</ResponseField>

<ResponseField name="amount_raised" type="number">
  Amount raised by the campaign.
</ResponseField>

<ResponseField name="amount_raised_formatted" type="string">
  Formatted amount raised by the campaign, includes currency symbol.
</ResponseField>

<ResponseField name="goal_type" type="string">
  Campaign goal type.
</ResponseField>

<ResponseField name="n_donors" type="number">
  Number of donors
</ResponseField>

<ResponseField name="n_teams" type="integer">
  Number of teams in the campaign.
</ResponseField>

<ResponseField name="n_pages" type="integer">
  Number of personal pages in the campaign.
</ResponseField>

<ResponseField name="url" type="string">
  URL to campaign.
</ResponseField>

<ResponseField name="image" type="string">
  Campaign image ID.
</ResponseField>

<ResponseField name="language" type="string">
  Campaign language. Allowed values: `en`, `fr`
</ResponseField>

<ResponseField name="is_hidden" type="boolean">
  True if campaign is hidden, otherwise false.
</ResponseField>

<ResponseField name="closed_at" type="string">
  Campaign closed at
</ResponseField>

<ResponseField name="user" type="object">
  <Expandable title="properties">
    <ResponseField name="name" type="string">
      Campaign owner's name
    </ResponseField>

    <ResponseField name="first_name" type="string">
      Campaign owner's first name
    </ResponseField>

    <ResponseField name="last_name" type="string">
      Campaign owner's last name
    </ResponseField>

    <ResponseField name="title" type="string">
      Campaign owner's title
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="organization" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="integer">
      Campaign organization's ID
    </ResponseField>

    <ResponseField name="name" type="string">
      Campaign organization's name
    </ResponseField>

    <ResponseField name="custom_id" type="string">
      Campaign organization's Custom ID
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="images" type="object">
  <Expandable title="properties">
    <ResponseField name="original" type="string">
      URL to original campaign's image.
    </ResponseField>
  </Expandable>
</ResponseField>

**Other responses**

| Status | Description |
| ------ | ----------- |
| `400`  | Bad Request |
| `403`  | Forbidden   |

<ResponseExample>
  ```json theme={null}
  [
    {
      "id": 1,
      "name": "Campaign",
      "amount_goal": 1000,
      "amount_goal_formatted": "$1,000",
      "amount_raised": 550,
      "amount_raised_formatted": "$550",
      "n_donors": 10,
      "url": "https://demo.crowdchange.dev/2",
      "language": "en",
      "is_hidden": false,
      "closed_at": "2022-03-01 00:00:00",
      "user": {
        "name": "John Snow",
        "first_name": "John",
        "last_name": "Snow",
        "title": "Mr."
      },
      "organization": {
        "id": 1,
        "name": "Crowdchange",
        "custom_id": "CrowdchangeID"
      },
      "images": {
        "original": "https://img.crowdchange.co/files/abc.png?tr=w-[width],h-[height]"
      }
    }
  ]
  ```
</ResponseExample>
