> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create ContractPausedPeriod

> Create a new ContractPausedPeriod record.

A **ContractPausedPeriod** represents a freeze period applied to a customer's plan contract (`CoworkerContract`). Plan freezing lets admins — and optionally customers — suspend a contract for one or more billing cycles without cancelling it.

Freeze dates are always aligned to billing cycle boundaries: `PauseFrom` is always the first day of the customer's next billing cycle, and `PauseUntil` is always the first day of the billing cycle when the plan is due to restart.

While a contract is frozen:

* No charges are generated for the contract for the duration of the freeze.
* The customer's status reverts to **Contact** if they have no other active contract.
* No member rates or benefits from the frozen contract apply during the freeze.
* Invoices are still generated on the usual billing day for any purchases (bookings, products) linked to the contract.

Admins can freeze contracts from the customer's account, via teams, or in bulk from Finance > Contracts. Whether customers can freeze their own plans from the Members Portal is controlled by the `AllowContractFreezing` setting on the plan (`Tariff`).

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`ContractPausedPeriod-Create`** role.
</Note>

## Request Body

### Required Fields

<ParamField body="CoworkerContractId" type="integer" required>
  ID of the customer contract being frozen.
</ParamField>

<ParamField body="PauseFrom" type="string" required>
  UTC date when the freeze starts. Always falls on the first day of a billing cycle.
</ParamField>

<ParamField body="PauseUntil" type="string" required>
  UTC date when the freeze ends. Always falls on the first day of the billing cycle when the plan is due to restart.
</ParamField>

### Optional Fields

<ParamField body="Notes" type="string">
  Optional notes or reason for this freeze period.
</ParamField>

<ParamField body="PauseFromLocal" type="string">
  Location-timezone equivalent of PauseFrom.
</ParamField>

<ParamField body="PauseUntilLocal" type="string">
  Location-timezone equivalent of PauseUntil.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST \
    "https://spaces.nexudus.com/api/billing/contractpausedperiods" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "CoworkerContractId": 0,
      "PauseFrom": "2025-01-15T10:30:00Z",
      "PauseUntil": "2025-01-15T10:30:00Z"
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/contractpausedperiods',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        CoworkerContractId: 0,
        PauseFrom: '2025-01-15T10:30:00Z',
        PauseUntil: '2025-01-15T10:30:00Z'
      })
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://spaces.nexudus.com/api/billing/contractpausedperiods',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN',
          'Content-Type': 'application/json'
      },
      json={
          'CoworkerContractId': 0,
          'PauseFrom': '2025-01-15T10:30:00Z',
          'PauseUntil': '2025-01-15T10:30:00Z'
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="Status" type="integer">
  HTTP status code. `200` on success.
</ResponseField>

<ResponseField name="Message" type="string">
  A human-readable message confirming the creation.
</ResponseField>

<ResponseField name="Value" type="object">
  Contains the `Id` of the newly created record.
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `true` if the contractpausedperiod was created successfully.
</ResponseField>

<ResponseField name="Errors" type="array">
  `null` on success.
</ResponseField>

```json Example Response theme={null}
{
  "Status": 200,
  "Message": "ContractPausedPeriod was successfully created.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}
```

### 400

<ResponseField name="Message" type="string">
  A summary of the validation error(s), in the format `PropertyName: error message`.
</ResponseField>

<ResponseField name="Value" type="any">
  `null` on validation failure.
</ResponseField>

<ResponseField name="Errors" type="object[]">
  Array of validation errors.

  <Expandable>
    <ResponseField name="AttemptedValue" type="any">
      The value that was submitted for the field, or `null` if missing.
    </ResponseField>

    <ResponseField name="Message" type="string">
      The validation error message.
    </ResponseField>

    <ResponseField name="PropertyName" type="string">
      The name of the property that failed validation.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `false` when the request fails validation.
</ResponseField>

```json Example Response theme={null}
{
  "Message": "PauseFrom: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "PauseFrom"
    }
  ],
  "WasSuccessful": false
}
```
