> ## 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.

# Pause Contract

# Pause Contract

Submits a request to pause (freeze) a plan contract for a specified number of billing cycles. While paused, the plan's recurring charges are suspended. Additional services such as bookings may still generate charges during the pause period.

<Note>
  Before calling this endpoint, retrieve pause eligibility and options via `GET /api/public/billing/coworkerContracts/{contractId}/pause/meta`. Always
  present and obtain acceptance of the pause terms and conditions before submitting.
</Note>

## Authentication

This endpoint requires an authenticated customer session.

## Path Parameters

<ParamField path="contractId" type="number" required>
  The unique identifier of the contract to pause.
</ParamField>

## Request Body

<ParamField body="PauseCycles" type="number" required>
  The number of billing cycles to pause the contract for. Must be at least `1`. The available options are returned by the pause metadata endpoint as
  `PauseUntilOptions`.
</ParamField>

## Response

A successful response returns an empty body or a generic confirmation. No typed response object is defined for this endpoint.

## Example Request

```json theme={null}
{
  "PauseCycles": 2
}
```

## Usage in Portal

Called when the customer confirms the pause action in the pause modal.

* File: `src/views/user/plans/useMyPlansData.ts`
* Used by: `src/views/user/plans/components/PauseContractModal.tsx`

### Typical integration pattern

```ts theme={null}
// From src/api/endpoints.ts
// endpoints.billing.contracts.pause = (contractId: number) => ({
//   url: `/api/public/billing/coworkerContracts/v2/${contractId}/pause`,
// })

// Usage
const pauseContract = async (contractId: number, pauseCycles: number) => {
  return httpClient.put(endpoints.billing.contracts.pause(contractId).url, { PauseCycles: pauseCycles })
}
```

## Related Endpoints

* `GET /api/public/billing/coworkerContracts/{contractId}/pause/meta` – Get pause eligibility and options
* `GET /api/public/billing/coworkerContracts/pause/bookings` – Preview bookings affected by the pause
* `PUT /api/public/billing/coworkerContracts/v2/{contractId}/resume` – Resume a paused contract

## Error Responses

<ResponseField name="400 Bad Request" type="error">
  The contract cannot be paused (e.g., already paused, limit reached, or the plan does not support pausing). The response body contains an error code.
</ResponseField>

<ResponseField name="401 Unauthorized" type="error">
  The current user is not authenticated or does not have access to this contract.
</ResponseField>

<ResponseField name="404 Not Found" type="error">
  Contract with the specified ID does not exist.
</ResponseField>
