> ## 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 Campaign Teams

> Search teams registered under a CrowdChange campaign by keyword and retrieve a paginated list with captain, goal, and raised totals for each.

## Path parameters

<ParamField path="id" type="integer" required>
  Fundraiser ID.
</ParamField>

## Query parameters

<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: `100`
</ParamField>

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

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

## Response

Returns an array of objects with the following fields.

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

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

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

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

<ResponseField name="url" type="string">
  Full URL to team's page.
</ResponseField>

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

<ResponseField name="fundraiser" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="integer">
      Fundraiser ID
    </ResponseField>

    <ResponseField name="name" type="string">
      Fundraiser name
    </ResponseField>

    <ResponseField name="tags_list" type="any[]">
      Campaign tags.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="user" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="integer">
      Team captain's ID.
    </ResponseField>

    <ResponseField name="name" type="string">
      Team captain's name
    </ResponseField>

    <ResponseField name="first_name" type="string">
      Team captain's first name
    </ResponseField>

    <ResponseField name="last_name" type="string">
      Team captain's last name
    </ResponseField>

    <ResponseField name="title" type="string">
      Team captain's title
    </ResponseField>

    <ResponseField name="email" type="string">
      Team captain's email
    </ResponseField>
  </Expandable>
</ResponseField>

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

<ResponseField name="n_pages" type="integer">
  Number of pages.
</ResponseField>

<ResponseField name="created_at" type="string">
  Team creation date.
</ResponseField>

<ResponseField name="custom_data" type="object[]">
  List of custom questions and responses.

  <Expandable title="properties">
    <ResponseField name="field_id" type="integer">
      Custom field id.
    </ResponseField>

    <ResponseField name="source_id" type="integer">
      If field was copied from Blueprint, this will reference the source field id from blueprint (similar to group id).
    </ResponseField>

    <ResponseField name="name" type="string">
      Custom field label.
    </ResponseField>

    <ResponseField name="content" type="string">
      User's answer to custom field.
    </ResponseField>

    <ResponseField name="field_custom_id" type="string">
      Custom ID.
    </ResponseField>

    <ResponseField name="response_custom_id" type="string">
      Custom ID for the response (multiple choice questions).
    </ResponseField>
  </Expandable>
</ResponseField>

**Other responses**

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

<ResponseExample>
  ```json theme={null}
  [
    {
      "id": 1,
      "name": "Team A",
      "amount_goal": 1000,
      "amount_raised": 550,
      "url": "https://demo.crowdchange.dev/1/team/2",
      "language": "en",
      "fundraiser": {
        "id": 101,
        "name": "Gala Night",
        "tags_list": [
          "tag1",
          "tag2"
        ]
      },
      "user": {
        "id": 1,
        "name": "John Snow",
        "first_name": "John",
        "last_name": "Snow",
        "title": "Mr.",
        "email": "john@crowdchange.co"
      },
      "n_donors": 100,
      "n_pages": 50,
      "created_at": "2022-01-01 16:00:03",
      "custom_data": [
        {
          "field_id": 1001,
          "source_id": 11,
          "name": "Phone Number",
          "content": "555-123-4567",
          "field_custom_id": "ABC-123",
          "response_custom_id": "ABC-123"
        }
      ]
    }
  ]
  ```
</ResponseExample>
