---
title: "Subscribe to usage product"
method: POST
path: "/subscriptions/{subscriptionId}/usages/{id}"
tags: ["Subscriptions"]
---

# Subscribe to usage product

`POST /subscriptions/{subscriptionId}/usages/{id}`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/subscriptions/{subscriptionId}/usages/{id}`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Subscribes the account's usage subscription to a usage product. The subscription is processed asynchronously.
            
Important considerations:
* If the account has no usage subscription yet, one is created as part of processing the request
* A default payment method can optionally be supplied; it must already exist for the customer
* Without one, a payment method added for the usage subscription before it existed is used

## Path parameters

- `subscriptionId` string, required
- `id` string, uuid, required

## Request body

- SubscribeUsageRequest
  - `defaultPaymentMethodId` string, uuid, nullable: Public id of the payment method to set as the default for the usage subscription.

## Response `202`

When request is accepted. Returns a 'Link' object to the subscription.

- Link
  - `id` string, nullable
  - `href` string, nullable
  - `relation` string, nullable
  - `method` string, nullable

## Other responses

- `400`: When the request is invalid.
- `404`: When the usage product or the supplied payment method does not exist.

---

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