---
updatedAt: 2026-04-21T05:36:45.000Z
agentTools:
  projectIndex: https://developer.officernd.com/llms.txt
---

# Update an existing set of credits.

Update an existing set of credits. 

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

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/api/v2/organizations/{orgSlug}/credits/{creditsId}": {
      "put": {
        "description": "Update an existing set of credits. \n\n Required scopes: `flex.space.credits.update`",
        "operationId": "CreditsController_updateItem_api/v2",
        "parameters": [
          {
            "name": "creditsId",
            "required": true,
            "in": "path",
            "description": "Id of the credits.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgSlug",
            "required": true,
            "in": "path",
            "description": "organization slug",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Credits data to update.",
          "content": {
            "application/json": {
              "schema": {
                "example": {
                  "count": 5
                },
                "$ref": "#/components/schemas/UpdateCreditsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditsResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "flex.space.credits.update"
            ]
          }
        ],
        "summary": "Update an existing set of credits.",
        "tags": [
          "Credits"
        ]
      }
    }
  },
  "info": {
    "title": "Space API",
    "description": "",
    "version": "2.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://app.officernd.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://identity.officernd.com/auth/token",
            "scopes": {}
          },
          "authorizationCode": {
            "authorizationUrl": "https://identity.officernd.com/auth/authorize",
            "tokenUrl": "https://identity.officernd.com/auth/token",
            "scopes": {}
          }
        }
      }
    },
    "schemas": {
      "CreditIntervalLength": {
        "type": "string",
        "enum": [
          "month",
          "once"
        ],
        "description": "Determines the recurrence of the credits. \n            Can be either \"month\" or \"once\". If unspecified the set of credits issued will be set as \"once\"."
      },
      "CreditValidFor": {
        "type": "string",
        "enum": [
          "rates",
          "resourceTypes",
          "all"
        ],
        "description": "The type of the credits and what they're valid for."
      },
      "CreditBookingsResultDto": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number",
            "description": "The number of bookings the set of credits is applied for.",
            "example": 2
          },
          "booking": {
            "type": "string",
            "description": "The _id of the booking for which the credits are used.",
            "example": "603dfbc260f4054084125d30"
          },
          "occurrenceDate": {
            "type": "string",
            "description": "The occurrence date of the booking.",
            "example": "2024-01-01T00:00:00Z"
          }
        }
      },
      "CreditsResultDto": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "The _id of the set of credits.",
            "example": "603dfbc260f4054084125d30"
          },
          "company": {
            "type": "string",
            "description": "The _id of the company with which the set of credits are associated.",
            "example": "603dfbc260f4054084125d30"
          },
          "member": {
            "type": "string",
            "description": "The _id of the member with which the set of credits are associated.",
            "example": "603dfbc260f4054084125d33"
          },
          "fee": {
            "type": "string",
            "description": "The _id of the one-off fee with which the set of credits are associated.",
            "example": "603dfbc260f4054084125d33"
          },
          "membership": {
            "type": "string",
            "description": "The _id of the membership with which the set of credits are associated.",
            "example": "603dfbc260f4054084125d33"
          },
          "intervalLength": {
            "description": "Determines the recurrence of the credits. \n            Can be either \"month\" or \"once\". If unspecified the set of credits issued will be set as \"once\".",
            "example": "month",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreditIntervalLength"
              }
            ]
          },
          "startDate": {
            "type": "string",
            "description": "The start date of the monthly recurring credits.             Should be used only for the set of credits with \"intervalLength\" set to \"month\".",
            "example": "2024-01-01T00:00:00Z"
          },
          "endDate": {
            "type": "string",
            "description": "The end date of the monthly recurring credits.",
            "example": "2024-01-01T00:00:00Z"
          },
          "validFrom": {
            "type": "string",
            "description": "The start date from which the credits are valid.",
            "example": "2024-01-01T00:00:00Z"
          },
          "validTo": {
            "type": "string",
            "description": "The end date for which the credits are valid.             Can be set for both monthly recurring are once credits.",
            "example": "2024-01-01T00:00:00Z"
          },
          "validFor": {
            "description": "The type of the credits and what they're valid for.",
            "example": "all",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreditValidFor"
              }
            ]
          },
          "resourceTypes": {
            "description": "The resource types for which the credits is applied.",
            "example": [
              "603dfbc260f4054084125d30"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bookings": {
            "description": "An array of bookings for which the credits are used.",
            "example": [
              {
                "count": 2,
                "booking": "603dfbc260f4054084125d30",
                "occurrenceDate": "2024-01-01T00:00:00Z"
              }
            ],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditBookingsResultDto"
            }
          },
          "parent": {
            "type": "string",
            "description": "The parent set of credits of the current set of credits.",
            "example": "603dfbc260f4054084125d30"
          },
          "resourceRates": {
            "description": "An array that contains the _ids of the resource rates for which the credits will be valid. \n            If left empty the credits will be valid for all rates.",
            "example": [
              "603dfbc260f4054084125d30"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "count": {
            "type": "number",
            "description": "The number of credits granted.",
            "example": 2
          },
          "usedCount": {
            "type": "number",
            "description": "The number of credits used.",
            "example": 1
          }
        }
      },
      "UpdateCreditsDto": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number",
            "description": "The number of credits granted.",
            "example": 5
          }
        }
      }
    }
  }
}
```