> ## Documentation Index
> Fetch the complete documentation index at: https://velt-mintlify-e6426361.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update document disabled state (v2)

> Enable or disable a document's collaboration features such as comments and presence using the Velt v2 REST API to freeze or reopen activity per resource.

Use this API to enable or disable both read and write access for all users.

<Info> Let's say your customer's trial or subscription has ended and you want to disable their access to the Velt data, you could use this to diable access to specific documents.</Info>

# Endpoint

`https://api.velt.dev/v2/organizations/documents/access/disablestate/update`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="organizationId" type="string" required>
      Organization ID
    </ParamField>

    <ParamField body="documentIds" type="string[]" required>
      Array of Document IDs
    </ParamField>

    <ParamField body="disabled" type="boolean" default="false" required>
      Whether to disable read and write access to the specified documents. Allowed values: `true`, `false`
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentIds": ["yourDocumentId"],
    "disabled": true
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Updated disable state for documents successfully.",
    "data": {
      "yourDocumentId": {
        "success": true,
        "disabled": true,
        "message": "Document disabled state updated."
      }
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Updated disable state for documents successfully.",
      "data": {
        "yourDocumentId": {
          "success": true,
          "disabled": true,
          "message": "Document disabled state updated."
        }
      }
    }
  }
  ```
</ResponseExample>
