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

# API Usage Stats Daily

Retrieve the daily usage of API calls for a certain period

### **Before You Begin**

* **GraphQL Playground**:
  🔗 All examples should be run in the [GraphQL Playground](https://app.pipefy.com/graphiql).
  ➡️ New to GraphQL? Review the [Playground Basics Guide](https://developers.pipefy.com/reference/exploring-the-playground).
* **Authentication**:
  🛠️ Use [Service Account tokens](https://developers.pipefy.com/reference/service-accounts) *(Personal Access Tokens are deprecated)*.

### **Prerequisites**

* **Organization access**: You must have a `Super Admin` or `Admin` role on the organization.
* **Organization UUID**: You will need the organization’s UUID to run the query.

***

### **Step 1. Find the Organization UUID**

You need the organization’s UUID to query API usage. Run the query below, replacing `<ORGANIZATION_ID>` with your organization ID:

```graphql
{
  organization(id: "<ORGANIZATION_ID>") {
    uuid
  }
}
```

You can find the organization ID in the URL when viewing the organization in Pipefy: `https://app.pipefy.com/organizations/<ORGANIZATION_ID>`.

### **Step 2. Query daily API usage**

Run the following query with your organization UUID and the desired time period

```graphql
  query apiUsageStatsDaily($organizationUuid: ID!, $period: PeriodFilter!) {
  apiUsageStatsDaily(organizationUuid: $organizationUuid, period: $period) {
    data {
      date
      metric
      __typename
    }
    __typename
  }
}
```

**Input Explanation**:

* **period**: Time window for the stats. Use `current_month`, `last_month`, or `last_3_months`.

**Sample response**:

```json
{
  "data": {
    "apiUsageStatsDaily": {
      "data": [
        {
          "date": "2026-03-05",
          "metric": 7,
          "__typename": "DailyAPIUsageItem"
        },
        {
          "date": "2026-03-04",
          "metric": 5,
          "__typename": "DailyAPIUsageItem"
        },
        {
          "date": "2026-03-03",
          "metric": 4,
          "__typename": "DailyAPIUsageItem"
        },
        {
          "date": "2026-03-02",
          "metric": 11,
          "__typename": "DailyAPIUsageItem"
        },
        {
          "date": "2026-03-01",
          "metric": 5,
          "__typename": "DailyAPIUsageItem"
        }
      ],
      "__typename": "DailyAPIUsage"
    }
  }
}
```

The response returns an array of `data` entries, each with a `date` value and a `metric` (API call count).

***