> ## 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.

# Delete key metrics

> Delete the key-metric values booked through the API for some users.

Key metrics belong to an [internal project](/product/organizations-and-projects#internal-projects). On a revenue-linked project, use the [Revenue API](/api/management/set-revenue) instead.

## Parameters

Passed in the query string.

<ParamField query="user_names" type="list[string]" required>
  Delete all these users' API-booked key metrics.
</ParamField>

<ParamField query="month_start, month_end" type="&#x22;YYYY-MM&#x22;">
  Narrow the delete to this inclusive month range. Omit both to delete every API-booked value of the named users.
</ParamField>

PS: CSV uploads are managed by their own source and cannot be deleted via this route

<RequestExample>
  ```python Python theme={null}
  import weflayr

  client = weflayr.client()  # reads WEFLAYR_API_KEY

  client.delete_key_metrics(user_names=["u_123", "u_456"])
  ```

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

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

  await weflayr.api.deleteKeyMetrics({
    client,
    throwOnError: true,
    query: { userNames: ['u_123', 'u_456'] },
  });
  ```

  ```bash cURL theme={null}
  curl -X DELETE "https://app.weflayr.com/api/key-metrics/?user_names=u_123&user_names=u_456" \
    -H "Authorization: Bearer $WEFLAYR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {"ok": true, "rows_deleted": 2}
  ```
</ResponseExample>


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