---
agentTools:
  projectIndex: https://developers.pipefy.com/llms.txt
---

# Update Organization Report

Update an existing organization report configuration

## Before You Begin

🔗 **Use the [GraphQL Playground](https://app.pipefy.com/graphiql)** to execute the mutations in this guide.

➡️ **New to GraphQL?** Learn how to navigate the Playground with our **[Playground Basics Guide](https://developers.pipefy.com/reference/exploring-the-playground)**.

## Prerequisites

1. **Authentication**: Use a [Service Account token](https://developers.pipefy.com/reference/service-accounts) (Personal Access Tokens are deprecated).
2. **Permissions**: Ensure your token has the necessary permissions to update the specific report.
3. **Report ID**: Identify the Organization Report you want to update.

## Step 1: Find The Report ID

1. **Via Pipefy UI:**

   1. Open the Organization Report in your browser.
   2. The URL will include the Report ID: `https://app.pipefy.com/organizations/123/reports/987654321`.
   3. **Report ID = `987654321`** (the number after `/reports/`).

2. **Via GraphQL Query:**
   1. Use the `organizationReports` query to list all reports and find the specific report ID you need.
   2. [How to get organization reports.](https://developers.pipefy.com/reference/get-organization-reports)

## Step 2: Update Organization Report

Execute the `updateOrganizationReport` mutation:

```graphql
mutation {
  updateOrganizationReport(
    input: {
      id: 456789123
      name: "Updated Sales Pipeline Report"
      color: red
      fields: ["title", "status", "assignee", "due_date", "priority", "value"]
      pipeIds: [987654321, 987654322]
      filter: {
        operator: or
        queries: [
          { field: "status", operator: contains, value: ["in_progress", "review", "done"] }
          { field: "priority", operator: eq, value: "high" }
        ]
      }
    }
  ) {
    organizationReport {
      id
      name
      cardCount
      color
      lastUpdatedAt
      fields
      filter
      repos {
        id
        name
      }
    }
  }
}
```

### Response Example

```json
{
  "data": {
    "updateOrganizationReport": {
      "organizationReport": {
        "id": "456789123",
        "name": "Updated Sales Pipeline Report",
        "cardCount": 890,
        "color": "#FF6B6B",
        "lastUpdatedAt": "2024-03-13T16:45:00Z",
        "fields": ["title", "status", "assignee", "due_date", "priority", "value"],
        "filter": {
          "operator": "or",
          "queries": [
            {
              "field": "status",
              "operator": "contains",
              "value": ["in_progress", "review", "done"]
            },
            {
              "field": "priority",
              "operator": "eq",
              "value": "high"
            }
          ]
        },
        "repos": [
          {
            "id": "987654321",
            "name": "Sales Pipeline"
          },
          {
            "id": "987654322",
            "name": "Lead Management"
          }
        ]
      }
    }
  }
}
```

## Arguments Explained

### Required Arguments

* `id`: ID - The report ID to update

### Optional Arguments

* `name`: The new display name for the report
* `color`: The report's color (enum values: red, blue, green, etc.)
* `fields`: Array of field names to display as columns in the report
* `pipeIds`: Array of pipe IDs to include in the report
* `filter`: Complex filter object to limit which cards appear in the report

### Filter Structure

The `filter` argument supports complex filtering with the following structure:

```graphql
filter: {
  operator: and | or
  queries: [
    {
      field: String      # Field name to filter on
      operator: String   # Filter operator (eq, not_eq, contains, etc.)
      value: Any         # Filter value(s)
    }
  ]
  groups: [              # Nested filter groups
    {
      operator: and | or
      queries: [...]
    }
  ]
}
```

## Partial Updates

You can update only specific fields without affecting others:

### Update Name Only

```graphql
mutation {
  updateOrganizationReport(input: { id: 456789123, name: "New Report Name" }) {
    organizationReport {
      id
      name
      lastUpdatedAt
    }
  }
}
```

### Update Color Only

```graphql
mutation {
  updateOrganizationReport(input: { id: 456789123, color: blue }) {
    organizationReport {
      id
      color
      lastUpdatedAt
    }
  }
}
```

### Update Fields Only

```graphql
mutation {
  updateOrganizationReport(input: { id: 456789123, fields: ["title", "status", "assignee"] }) {
    organizationReport {
      id
      fields
      lastUpdatedAt
    }
  }
}
```

## Notes

* **Partial Updates**: Only include the fields you want to change - other fields remain unchanged