## Record service usage (tenant:settings:write)

`POST /api/trade/v1/usage`

Module: Trade · operationId: `recordUsage` · Tag: Usage · Auth: access token (`Authorization: Bearer <accessToken>`)

Publishes a `trade.usage.recorded` event for billing consumers; nothing else is stored.

### Request body

`application/json` (required)

- `quantity` (number, required): Must not be 0.
- `serviceKey` (string, required): Billing key of the service.
- `unit` (string)

Example:

```json
{
  "quantity": 250,
  "serviceKey": "backup-storage",
  "unit": "GB"
}
```

### Responses

- **200** Recorded (`application/json`)
- **400** Error (`application/json`)
- **401** No valid session or bearer token (no body).

Fields of the 200 answer:

- `status` (string, required): Outcome of the request.

Example 200 answer:

```json
{
  "status": "recorded"
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/trade/v1/usage' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"quantity":250,"serviceKey":"backup-storage","unit":"GB"}'
```
