---
title: "Get namespace usage"
method: GET
path: "/v1/namespaces/{id}/usage"
tags: ["Namespaces"]
---

# Get namespace usage

`GET /v1/namespaces/{id}/usage`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/namespaces/{id}/usage`
- Auth: API key in header `x-api-key`

Counts the messages the namespace sent and received in the window that count toward usage, by channel, with the same statuses as `GET /v1/organizations/usage`. A message counts toward the namespace it was sent or received in: that of the sender, mailbox, or key it used. The organization is billed for every namespace; read this to charge your own customer.

## Path parameters

- `id` string, required

## Query parameters

- `after` string, nullable
- `before` string, nullable

## Response `200`

NamespaceUsage

- NamespaceUsage
  - `namespaceId` string, required
  - `periodStart` string, required
  - `periodEnd` string, required
  - `emailCount` number, required
  - `totalMessages` number, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

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