> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weflayr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Call the management API

> Read your costs and margin, and push revenue, key metrics and customer tags, from Python or Node.js.

The SDK's client calls every [management route](/api/management/get-costs), authenticated with a key that has the **Management** scope in [API keys](/product/api-keys).

<CodeGroup>
  ```python Python theme={null}
  import weflayr
  from weflayr.openapi.models import CostsInput

  client = weflayr.client()  # reads WEFLAYR_API_KEY

  costs = client.get_costs(body=CostsInput.from_dict({"date_from": "2026-06-01", "group_by": "feature"}))
  ```

  ```js Node.js theme={null}
  const weflayr = require('weflayr');

  const client = weflayr.client(); // reads WEFLAYR_API_KEY

  const { data } = await weflayr.api.getCosts({
    client,
    throwOnError: true,
    body: { dateFrom: '2026-06-01', groupBy: 'feature' },
  });
  ```
</CodeGroup>

In Python, each route is a method of the client, and its request body is built from the models in `weflayr.openapi.models`. In Node.js, each route is a function of `weflayr.api` taking the client, with camelCase keys; it returns `{ data, error }`, or throws on an error with `throwOnError: true`.

## Routes

| Route | Python | Node.js |
| - | - | - |
| **Dashboard data** | | |
| [Get costs](/api/management/get-costs) | `get_costs` | `getCosts` |
| [Get margin](/api/management/get-margin) (revenue-linked projects) | `get_margin` | `getMargin` |
| [Get performance](/api/management/get-performance) (internal projects) | `get_performance` | `getPerformance` |
| **Revenue** (revenue-linked projects) | | |
| [Set revenue](/api/management/set-revenue) | `set_revenue` | `setRevenue` |
| [Get revenue](/api/management/get-revenue) | `get_revenue` | `getRevenue` |
| [Delete revenue](/api/management/delete-revenue) | `delete_revenue` | `deleteRevenue` |
| **Key metrics** (internal projects) | | |
| [Set key metrics](/api/management/set-key-metrics) | `set_key_metrics` | `setKeyMetrics` |
| [Get key metrics](/api/management/get-key-metrics) | `get_key_metrics` | `getKeyMetrics` |
| [Delete key metrics](/api/management/delete-key-metrics) | `delete_key_metrics` | `deleteKeyMetrics` |
| **Customer tags** | | |
| [Set customer tags](/api/management/set-customer-tags) | `set_customers_tags` | `setCustomersTags` |
| [Get customer tags](/api/management/get-customer-tags) | `get_customers_tags` | `getCustomersTags` |
| [Delete customer tags](/api/management/delete-customer-tags) | `delete_customers_tags` | `deleteCustomersTags` |
| **Project** | | |
| [Get project](/api/management/get-project) | `get_project` | `getProject` |
| [Get tags](/api/management/get-tags) | `get_tags` | `getTags` |
| [Get models](/api/management/get-models) | `get_models` | `getModels` |
| [Get providers](/api/management/get-providers) | `get_providers` | `getProviders` |
| [Get customers](/api/management/get-customers) | `get_customers` | `getCustomers` |
| [Get features](/api/management/get-features) | `get_features` | `getFeatures` |

Each route's page lists its fields and an example answer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.