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

# Update Disabled State for Documents

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/v1/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>
