---
title: "Create subscriptions for KLARA tenants."
method: POST
path: "/core/latest/subscriptions"
tags: ["Subscription"]
---

# Create subscriptions for KLARA tenants.

`POST /core/latest/subscriptions`

## Request

- Base URL: `https://api.klara.ch`
- URL: `https://api.klara.ch/core/latest/subscriptions`
- Auth: one of:
  - API key in header `X-API-KEY`
  - HTTP bearer

A KLARA user might have multiple subscriptions. Each subscription will enable a set of feature inside KLARA platform. This endpoint allows to create subscriptions for a KLARA tenant. <p>Each subscription is subjective to its own terms and conditions. Please ask your KLARA contacts or see more details using the KLARA webclient.</p>

## Query parameters

- `marketing-code` string[]

## Response `201`

Subscription created successfully

- Subscription[]
  - `product` object, required: The product to be subscribed. Identifier code for each product-should be unique across all products.
    - `code` string, required: Identifier code for each product-should be unique across all products
    - `name` string, required: The name of the product
  - `marketingCodes` string[], required: Marketing code to identify which product will be subscribed.
  - `pricePlan` 'SINGLE' | 'VOLUME' | 'MONTHLY' | 'QUARTERLY' | 'YEARLY' | 'FREE' | 'PAY_PER_USE': Specify how the subscription is paid. The full set of accepted values is the PricePlan schema. <br><ul><li> SINGLE: Pay once for the whole subscription period. </li><li> VOLUME: Pay once for the whole subscription period and pay for each volume. </li><li> MONTHLY: Pay monthly for the subscription period. </li><li> QUARTERLY: Pay quarterly for the subscription period. </li><li> YEARLY: Pay yearly for the subscription period. </li><li> FREE: Free subscription. </li><li> PAY_PER_USE: Pay for each usage. </li></ul>
  - `price` number: The price of this subscription at this moment
  - `subscriptionFrom` string, date-time: Specify when the subscription will start effectively. By default, the start date is today
  - `subscriptionUntil` string, date-time: Specify when the subscription will end effectively after unsubscribe. This value will be calculated by service itself.
  - `renewalDate` string, date: Indicates the date that subscription will automatically renewed for another period if no cancellation is made before this date.

## Other responses

- `400`: Invalid subscription data. <strong>Note:</strong> for historical reasons this operation reports errors in the OAuth <code>error</code>/<code>error_description</code> shape rather than the <code>ErrorMessage</code> shape used elsewhere in the business API.<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `401`: Invalid credentials<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `403`: The user has been disabled<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `429`: API rate limit exceeded<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `500`: Something went wrong when creating subscriptions for the company. <strong>Note:</strong> for historical reasons this operation reports errors in the OAuth <code>error</code>/<code>error_description</code> shape rather than the <code>ErrorMessage</code> shape used elsewhere in the business API.<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.

---

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