# See your mail storage use

`GET https://api.mailmasker.org/api/v1/mail/usage`

How much space your mail takes, and your mailbox's limit, in bytes.

- Who can use it: Any signed-in account
- Area: Mail
- Answers 200 OK when it works
- Page: https://developer.mailmasker.org/mail-usage

`used_bytes` is how much your mail takes up and `limit_bytes` is the most your mailbox may hold, the same numbers myaccount's dashboard shows.

## Good to know

- Both are 0 when no size limit is set for your mailbox.

## Examples

cURL:

```bash
curl -s 'https://api.mailmasker.org/api/v1/mail/usage' \
  -H "Authorization: Bearer $TOKEN"
```

Perl:

```perl
use Mojo::Base -strict;
use Mojo::UserAgent;

my $ua  = Mojo::UserAgent->new;
my $res = $ua->get('https://api.mailmasker.org/api/v1/mail/usage',
    { Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
```

homelab-cli:

There is no homelab-cli command for this yet.

## Response

200 OK:

```json
{ "used_bytes": 734003200, "limit_bytes": 10737418240 }
```
