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

# Remove Folder Document

> Detach a guideline, glossary, or character list from a folder and from the projects it was applied to

Removes a folder-level document from a folder. The copies that were applied to projects inside the folder are removed with it, so no project keeps a guideline the folder no longer has.

<Warning>
  Orders created before the removal keep the guidance they were already
  processed with. The removal affects work that runs after it.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://api-integration.ollang.com/integration/folder/60b8d6f1e1b9b1d8c6c0d8e1/docs/60b8d6f1e1b9b1d8c6c0d8f1" \
    -H "X-Api-Key: <your-api-key>"
  ```

  ```javascript JavaScript theme={null}
  const folderId = "60b8d6f1e1b9b1d8c6c0d8e1";
  const docId = "60b8d6f1e1b9b1d8c6c0d8f1";

  await fetch(
    `https://api-integration.ollang.com/integration/folder/${folderId}/docs/${docId}`,
    {
      method: "DELETE",
      headers: {
        "X-Api-Key": "<your-api-key>",
      },
    },
  );
  ```

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

  folder_id = "60b8d6f1e1b9b1d8c6c0d8e1"
  doc_id = "60b8d6f1e1b9b1d8c6c0d8f1"

  requests.delete(
      f"https://api-integration.ollang.com/integration/folder/{folder_id}/docs/{doc_id}",
      headers={"X-Api-Key": "<your-api-key>"},
  )
  ```

  ```php PHP theme={null}
  $folderId = '60b8d6f1e1b9b1d8c6c0d8e1';
  $docId = '60b8d6f1e1b9b1d8c6c0d8f1';

  $curl = curl_init();

  curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api-integration.ollang.com/integration/folder/{$folderId}/docs/{$docId}",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'DELETE',
      CURLOPT_HTTPHEADER => array(
          'X-Api-Key: <your-api-key>'
      ),
  ));

  curl_exec($curl);
  curl_close($curl);
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
  )

  func main() {
      folderID := "60b8d6f1e1b9b1d8c6c0d8e1"
      docID := "60b8d6f1e1b9b1d8c6c0d8f1"
      url := "https://api-integration.ollang.com/integration/folder/" + folderID + "/docs/" + docID

      req, _ := http.NewRequest("DELETE", url, nil)
      req.Header.Set("X-Api-Key", "<your-api-key>")

      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
  }
  ```

  ```java Java theme={null}
  String folderId = "60b8d6f1e1b9b1d8c6c0d8e1";
  String docId = "60b8d6f1e1b9b1d8c6c0d8f1";

  Unirest
    .delete("https://api-integration.ollang.com/integration/folder/" + folderId + "/docs/" + docId)
    .header("X-Api-Key", "<your-api-key>")
    .asString();
  ```
</RequestExample>

## Authorizations

This endpoint requires API key authentication. Include your API key in the request header:

* **Header name**: `X-Api-Key`
* **Header value**: Your API key from the Ollang dashboard
* **Format**: `X-Api-Key: your-api-key-here`

The API key user needs write access to the folder. Keys without a folder-write role receive a `403`.

## Path Parameters

<ParamField path="folderId" type="string" required>
  The unique identifier of the folder the document belongs to.
</ParamField>

<ParamField path="docId" type="string" required>
  The unique identifier of the folder document. Retrieve document IDs with [List
  Folder Documents](/apis/ollang-api-reference/list-folder-documents).
</ParamField>

## Response

Returns an empty body on success.

<ResponseExample>
  ```json 200 theme={null}
  {}
  ```

  ```json 401 theme={null}
  {
    "error": "Unauthorized",
    "message": "Invalid or missing API key",
    "code": "UNAUTHORIZED"
  }
  ```

  ```json 403 theme={null}
  {
    "statusCode": 403,
    "message": "You do not have permission to modify this folder",
    "error": "Forbidden"
  }
  ```

  ```json 404 theme={null}
  {
    "statusCode": 404,
    "message": "Folder document not found",
    "error": "Not Found"
  }
  ```
</ResponseExample>
