<!-- The markdown copy of https://oppalerts.com/docs/mcp/campaigns_organizations . All pages: https://oppalerts.com/docs/llms.txt -->

[Documentation](https://oppalerts.com/docs/) / [MCP](https://oppalerts.com/docs/mcp/) / campaigns_organizations

# campaigns_organizations

`POST https://mcp.oppalerts.com/mcp tool: campaigns_organizations`

Lists the organizations of one campaign, each with its relationship, its hosts, its brand names, and its chart color.

## What it does

The tool lists the organizations of one campaign: every organization of the campaign, with its relationship, its hosts, its brand names, and its chart color. The index tools use these relationship values to label result rows. `campaign` is required.

This tool only reads. The change tools [`campaigns_organization_add`](https://oppalerts.com/docs/mcp/campaigns_organization_add), [`campaigns_organization_update`](https://oppalerts.com/docs/mcp/campaigns_organization_update), and [`campaigns_organization_delete`](https://oppalerts.com/docs/mcp/campaigns_organization_delete) change the organizations.

## Connect

```bash
claude mcp add --transport http oppalerts https://mcp.oppalerts.com/mcp
```

The first call opens a browser window for the OppAlerts login. [Connect an AI Agent](https://oppalerts.com/docs/mcp/) has the details.

## Parameters

**`campaign`int, required, 1 to 4294967295**

The campaign id, from [campaigns_list](https://oppalerts.com/docs/mcp/campaigns_list). It must be a campaign of your account.

## Strict Rules

- A field that is not in the list above is refused. The result then has `isError` true, and its text starts with `bad_param`. The error names the field: "<field> is not a field of this tool." The old name of a renamed field is refused in the same way.
- A bad value is refused, and the error names the field. A bad value is a value of the wrong type, a number with a fraction for a whole-number field, a value out of its range, or a value that is not in its list. A required field that you do not send is refused too. The tool never changes a value that you send.
- An error about the format of a call, such as a refused field, names the field. Its message ends with one sentence: "Read the documentation at https://oppalerts.com/docs for the correct format." Every other error has only its own sentence.

## Response fields

**`organizations`list**

One item for each organization of the campaign.

**`organizations[].id`int**

The organization id.

**`organizations[].relationship`string**

The relationship to the brand: `org_owned_brand`, `org_competitor`, `org_partner`, or `org_publisher`.

**`organizations[].hosts`list of strings**

The hosts of the organization.

**`organizations[].brand_names`list of strings**

The brand names of the organization.

**`organizations[].color`int, optional**

The chart color of the organization, as a number. Left out when the organization has no color.

**`organizations[].color_hex`string, optional**

The chart color of the organization, as a hex color, for example `#1f77b4`. Left out when the organization has no color.

## Example

### Call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "campaigns_organizations",
    "arguments": {
      "campaign": 3
    }
  }
}
```

### Response

The response is shown in full.

```json
{
  "organizations": [
    {
      "id": 9,
      "relationship": "org_owned_brand",
      "hosts": [
        "example-hotels.com",
        "example-hotels.co.uk"
      ],
      "brand_names": [
        "Example Hotels",
        "Example Hotel Group"
      ],
      "color": 3,
      "color_hex": "#1f77b4"
    }
  ]
}
```

## Errors

An error returns as a tool result with `isError` true. Its text starts with the error code, except for `daily_limit`, whose text is only the sentence. The HTTP status shown for each code is its API status.

- `bad_param` (HTTP 400 in the API): a field is not a field of this tool, a required field is not sent, or a value has the wrong type or is out of its range. The error names the field.
- `no_campaign` (HTTP 404 in the API): the campaign is not in this account
- `db_error` (HTTP 500 in the API): the data could not be read
- `daily_limit` (HTTP 429 in the API): the account has used all its calls for this tool today. [account_calls_left](https://oppalerts.com/docs/mcp/account_calls_left) shows when the count resets.

This tool has its own daily count. A call through the API or MCP uses one call from this count. A web app page reading the same data does not count. It is not an index search, so it does not use the shared count of the `news_` and `prospects_` tools, and the error `one_at_a_time` does not apply to it.

## Same data in the API

```http
POST /v1/campaigns/organizations HTTP/1.1
Host: api.oppalerts.com
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{"campaign": 3}
```

## Related pages

- [Edit Campaign in the web app](https://oppalerts.com/docs/app/campaign/edit)
- [POST /v1/campaigns/organizations in the API](https://oppalerts.com/docs/api/campaigns_organizations)
- [campaigns_list](https://oppalerts.com/docs/mcp/campaigns_list): the campaigns of the account and their ids
- [campaigns_settings](https://oppalerts.com/docs/mcp/campaigns_settings): the settings of one campaign
- [campaigns_saved_opportunities](https://oppalerts.com/docs/mcp/campaigns_saved_opportunities): the saved opportunities of one campaign
- [Use case: Monitor Competitor Mentions](https://oppalerts.com/docs/how-to/monitor-competitor-mentions)
- [Use case: Monitor New Brand Links](https://oppalerts.com/docs/how-to/monitor-new-brand-links)
