---
title: "$client->limits"
description: "Every method in this namespace: its signature, its parameters, what it returns and an example."
url: "https://nextmail.sh/docs/php/reference/limits"
area: "PHP"
category: "Reference"
---

# $client->limits

Every method in this namespace: its signature, its parameters, what it returns and an example.

## Methods

The daily and monthly sends of this workspace and its plan, how many it has used and when each count starts again, and the API requests a minute it may make.

### `limits->get`

Read the limits of the workspace

```php
get(?string $apiKey = null): array
```

Returns the plan of the workspace, the emails it has sent today and this month with the limit of each and when it resets, and the API requests a minute it may make.

Emails are counted as recipients. On the free plan the count covers every free workspace of the owner together. A limit is `null` when nothing caps it, which is the daily limit of a paid plan. `resetsAt` is the next midnight in UTC for the day and the first instant of the next month in UTC for the month. A send that would take the workspace past either limit is a 429 `send_quota_exceeded`. The count is read before the send, so two sends at the same moment can both pass and go over by what the second one carries. `apiRequestsPerMinute` counts every API key and app of the workspace together.

Scopes: `settings:read`.

**Parameters**

- `apiKey` (`string`): Overrides the client's API key for this call only.

**Returns**

An array with `object` set to `limits`, `plan` (an array with `id` and `name`), `sends` (an array with `day` and `month`, each an array with `limit`, `used` and `resetsAt`) and `apiRequestsPerMinute`.

**Example**

```php
$limits = $client->limits->get();

echo $limits['sends']['day']['used'], ' of ', $limits['sends']['day']['limit'] ?? 'unlimited', ' sends today', PHP_EOL;
echo $limits['sends']['month']['used'], ' of ', $limits['sends']['month']['limit'] ?? 'unlimited', ' sends this month', PHP_EOL;
echo $limits['apiRequestsPerMinute'], ' API requests a minute', PHP_EOL;
```

Also available in: API [`GET /limits`](https://nextmail.sh/docs/api/reference/limits#get-limits); TypeScript [`limits.get()`](https://nextmail.sh/docs/sdk/reference/limits#get); Python [`limits.get()`](https://nextmail.sh/docs/python/reference/limits#get); Ruby [`limits.get`](https://nextmail.sh/docs/ruby/reference/limits#get); Go [`Limits.Get`](https://nextmail.sh/docs/go/reference/limits#get); Java [`limits().get`](https://nextmail.sh/docs/java/reference/limits#get); C# [`Limits.GetAsync`](https://nextmail.sh/docs/csharp/reference/limits#get); CLI [`nextmail limits get`](https://nextmail.sh/docs/cli/reference/limits#limits-get).
