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

# Organization Usage Stats

## Before You Begin

🔗 **Use the [GraphQL Playground](https://app.pipefy.com/graphiql)** to execute the queries 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.

3. **Organization ID**: Identify the Organization where the card will be created.

## Step 1: Find Your Organization ID

### 1. Via Pipefy UI

* Open the Organization in your browser.
* The URL will include the Organization ID: <https://app.pipefy.com/organizations/123456789>.
* Organization ID = 123456789 (the number after /organizations/).

### 2. Via GraphQL Query

* Check on our [Get resource IDs page](https://developers.pipefy.com/reference/get-resource-ids).

## Step 2: Get the information

We obtained our list of organizations from the previous query. Now, let's say we want information about "Test Organization." Since its ID is **"123"**, we'll use that in our request.

```json
{
  "data": {
    "organization": {
      "pipesCount": 11,
      "membersCount": 2,
      "membersCountByRole": [
        {
          "name": "normal",
          "memberCount": 16
        },
        {
          "name": "admin",
          "memberCount": 2
        },
        {
          "name": "external_guest",
          "memberCount": 4
        },
        {
          "name": "super_admin",
          "memberCount": 1
        },
        {
          "name": "company_guest",
          "memberCount": 21
        }
      ],
      "pipes": [
        {
          "id": "47",
          "name": "[P2P] Purchasing Process",
          "cards_count": 98,
          "users_count": 16
        },
        {
          "id": "53",
          "name": "[P2P] Accounts Payable",
          "cards_count": 36,
          "users_count": 11
        },
        {
          "id": "54",
          "name": "[P2P] Vendor Registration",
          "cards_count": 61,
          "users_count": 9
        },
        {
          "id": "55",
          "name": "[P2P] Contract Management",
          "cards_count": 17,
          "users_count": 5
        }
      ]
    }
  }
}
```

This query provides a quick and effective way to retrieve key organization metrics, such as the number of pipes, members, and their roles, directly from Pipefy's GraphQL API.