---
title: "Create a new set of credits."
method: POST
path: "/api/v2/organizations/{orgSlug}/credits"
tags: ["Credits"]
---

# Create a new set of credits.

`POST /api/v2/organizations/{orgSlug}/credits`

Create a new set of credits. 

 Required scopes: `flex.space.credits.create`

## Path parameters

- `orgSlug` string, required

## Request body

- AddCreditsDto
  - `count` number, required — The number of credits granted.
  - `validFor` 'rates' | 'resourceTypes' | 'all' — The type of the credits and what they're valid for.
  - `resourceTypes` string[] — The resource types for which the credits are applied.
  - `company` string — The _id of the company with which the credits are associated.
  - `member` string — The _id of the member with which the credits are associated.
  - `resourceRates` string[] — An array that contains the _ids of the resource rates for which the credits will be valid. If left empty the credits will be valid for all rates.
  - `intervalLength` 'month' | 'once' — Determines the recurrence of the credits. Can be either "month" or "once". If unspecified the set of credits issued will be set as "once".
  - `startDate` string — The start date of the monthly recurring credits. Should be used only for credits with "intervalLength" set to "month".
  - `endDate` string — The end date of the monthly recurring credits. Should be used only for credits with "intervalLength" set to "month".

## Response `201`

- CreditsResultDto
  - `_id` string — The _id of the set of credits.
  - `company` string — The _id of the company with which the set of credits are associated.
  - `member` string — The _id of the member with which the set of credits are associated.
  - `fee` string — The _id of the one-off fee with which the set of credits are associated.
  - `membership` string — The _id of the membership with which the set of credits are associated.
  - `intervalLength` 'month' | 'once' — Determines the recurrence of the credits. Can be either "month" or "once". If unspecified the set of credits issued will be set as "once".
  - `startDate` string — The start date of the monthly recurring credits. Should be used only for the set of credits with "intervalLength" set to "month".
  - `endDate` string — The end date of the monthly recurring credits.
  - `validFrom` string — The start date from which the credits are valid.
  - `validTo` string — The end date for which the credits are valid. Can be set for both monthly recurring are once credits.
  - `validFor` 'rates' | 'resourceTypes' | 'all' — The type of the credits and what they're valid for.
  - `resourceTypes` string[] — The resource types for which the credits is applied.
  - `bookings` CreditBookingsResultDto[] — An array of bookings for which the credits are used.
    - `count` number — The number of bookings the set of credits is applied for.
    - `booking` string — The _id of the booking for which the credits are used.
    - `occurrenceDate` string — The occurrence date of the booking.
  - `parent` string — The parent set of credits of the current set of credits.
  - `resourceRates` string[] — An array that contains the _ids of the resource rates for which the credits will be valid. If left empty the credits will be valid for all rates.
  - `count` number — The number of credits granted.
  - `usedCount` number — The number of credits used.

---

[API](https://skmtc.net/officernd/apis/authentication-api.md) · [All operations](https://skmtc.net/officernd/apis/authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/officernd/authentication-api/versions/6bcd33dc648e/schema)
