---
title: "Update user's limits by ID"
method: PUT
path: "/v2/users/{userId}/limits"
tags: ["Users/Usage"]
---

# Update user's limits by ID

`PUT /v2/users/{userId}/limits`

## Request

- Base URL: `https://api.apify.com`
- URL: `https://api.apify.com/v2/users/{userId}/limits`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `token`

Updates the same limits as [Update user's limits](/api/v2/users-me-limits-put), for an account given by its ID
or username.

You can only access your own account, or the organization your API token belongs to. API tokens with
limited permissions can't use this endpoint.
For an organization, you also need the permission to manage the organization.

## Path parameters

- `userId` string, required

## Request body

- UpdateLimitsRequest
  - `maxMonthlyUsageUsd` number: If your platform usage in the billing period exceeds the prepaid usage, you will be charged extra. Setting this property you can update your hard limit on monthly platform usage to prevent accidental overage or to limit the extra charges.
  - `dataRetentionDays` integer: Apify securely stores your ten most recent Actor runs indefinitely, ensuring they are always accessible. Unnamed storages and other Actor runs are automatically deleted after the retention period. If you're subscribed, you can change it to keep data for longer or to limit your usage. [Lear more](https://docs.apify.com/storage#data-retention).

## Response `201`

- object

## Other responses

- `400`: Bad request - invalid input parameters or request body.
- `401`: Unauthorized - authentication required or invalid token.
- `403`: Forbidden - insufficient permissions to perform this action.
- `404`: Not found - the requested resource does not exist.
- `405`: Method not allowed.
- `413`: Payload too large - the request body exceeds the size limit.
- `415`: Unsupported media type - the Content-Encoding of the request is not supported.
- `429`: Too many requests - rate limit exceeded.

## Changes

> 25 revisions in range; 1 not diffed.

- **2026-10-27** `ec76185eb934`: 8 info
  - added the optional property `error/data` to the response with the `400` status
  - added the optional property `error/data` to the response with the `401` status
  - added the optional property `error/data` to the response with the `403` status
  - added the optional property `error/data` to the response with the `404` status
  - …4 more
- **2026-10-27** `e52dd2239cee`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apify/apis/apify-api/changes/v2/users/:userId/limits/put.md)

---

[API](https://skmtc.dev/apify/apis/apify-api.md) - [All operations](https://skmtc.dev/apify/apis/apify-api/llms.txt) - [OpenAPI document](https://skmtc.dev/apify/apis/apify-api/revisions/68d2d102e6a2?raw)
