---
title: "Sets the monthly offline-download allowance (MiB) on an identity (subscription plans / SDK licence). Idempotent by `reason`."
method: POST
path: "/admin/identities/{email}/download-allowance"
tags: ["admin"]
---

# Sets the monthly offline-download allowance (MiB) on an identity (subscription plans / SDK licence). Idempotent by \`reason\`.

`POST /admin/identities/{email}/download-allowance`

## Request

- Base URL: `https://api.mapmap.ai`
- URL: `https://api.mapmap.ai/admin/identities/{email}/download-allowance`
- Auth: HTTP bearer

## Path parameters

- `email` string, required

## Request body

- SetDownloadAllowanceRequest: Body for `POST /admin/identities/{email}/download-allowance`.
  - `mib` integer, required: New monthly offline-download allowance for the identity, in MiB (>= 0). Plans raise it; cancellation resets it to the free eval default.
  - `reason` string, required: Idempotency reason, e.g. `stripe-sub:sub_…:1750000000`. Repeating a reason is a no-op returning the recorded allowance.

## Response `200`

Allowance applied (or unchanged, when the reason was replayed)

- DownloadAllowanceResponse: Response for `POST /admin/identities/{email}/download-allowance`.
  - `download_allowance_mib` integer, required: The download allowance now recorded for this reason, in MiB.
  - `duplicate` boolean, required: `true` when the reason had already been applied (idempotent replay; nothing changed).
  - `email` string, required: Canonical (lowercased) identity email.

## Other responses

- `400`: Invalid mib or reason
- `401`: Missing or wrong admin token
- `404`: Unknown identity email

---

[API](https://skmtc.dev/mapmap/apis/sn-gateway.md) · [All operations](https://skmtc.dev/mapmap/apis/sn-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/mapmap/apis/sn-gateway/revisions/2293be8b4c38?raw)
