> ## 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 Project Document

> Detach a guideline, glossary, or character list from a single project

Removes a document from a project.

* For a document attached to the project itself, the document is deleted.
* For a folder document listed for the project (its `folderId` is set), the folder document stops applying to **this project only**. The folder keeps the document, and the folder's other projects keep using it. To remove it from every project in the folder, use [Remove Folder Document](/apis/ollang-api-reference/delete-folder-document) instead.

> [!WARNING]
>
> Orders created before the removal keep the guidance they were already
> processed with. The removal affects work that runs after it.

```bash cURL theme={null}
curl -X DELETE "https://api-integration.ollang.com/integration/project/60b8d6f1e1b9b1d8c6c0d8e3/docs/60b8d6f1e1b9b1d8c6c0d8f5" \
  -H "X-Api-Key: $OLLANG_API_KEY"
```

```javascript JavaScript theme={null}
const projectId = "60b8d6f1e1b9b1d8c6c0d8e3";
const docId = "60b8d6f1e1b9b1d8c6c0d8f5";

await fetch(
  `https://api-integration.ollang.com/integration/project/${projectId}/docs/${docId}`,
  {
    method: "DELETE",
    headers: {
      "X-Api-Key": process.env.OLLANG_API_KEY,
    },
  },
);
```

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

project_id = "60b8d6f1e1b9b1d8c6c0d8e3"
doc_id = "60b8d6f1e1b9b1d8c6c0d8f5"

requests.delete(
    f"https://api-integration.ollang.com/integration/project/{project_id}/docs/{doc_id}",
    headers={"X-Api-Key": os.environ["OLLANG_API_KEY"]},
)
```

```php PHP theme={null}
$projectId = '60b8d6f1e1b9b1d8c6c0d8e3';
$docId = '60b8d6f1e1b9b1d8c6c0d8f5';

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api-integration.ollang.com/integration/project/{$projectId}/docs/{$docId}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => array(
        'X-Api-Key: ' . getenv('OLLANG_API_KEY')
    ),
));

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

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

import (
    "net/http"
    "os"
)

func main() {
    projectID := "60b8d6f1e1b9b1d8c6c0d8e3"
    docID := "60b8d6f1e1b9b1d8c6c0d8f5"
    url := "https://api-integration.ollang.com/integration/project/" + projectID + "/docs/" + docID

    req, _ := http.NewRequest("DELETE", url, nil)
    req.Header.Set("X-Api-Key", os.Getenv("OLLANG_API_KEY"))

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

```java Java theme={null}
String projectId = "60b8d6f1e1b9b1d8c6c0d8e3";
String docId = "60b8d6f1e1b9b1d8c6c0d8f5";

Unirest
  .delete("https://api-integration.ollang.com/integration/project/" + projectId + "/docs/" + docId)
  .header("X-Api-Key", System.getenv("OLLANG_API_KEY"))
  .asString();
```

## 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 examples read the key from the `OLLANG_API_KEY` environment variable; set it before running them.

The project must belong to the API key's account; other projects return `404`.

The API key user also needs write access, the same as for folder documents: the
account owner, team-manager or order-creator role, or project manager of the
project's folder. Other keys, such as view-only users, receive a `403`.

## Path Parameters

**projectId** `string` *required*

The unique identifier of the project the document belongs to.

**docId** `string` *required*

The unique identifier of the project document. Retrieve document IDs with
[List Project Documents](/apis/ollang-api-reference/list-project-documents).

## Response

Returns an empty body on success.

```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 don't have permission to perform this action. Please contact your account admin.",
  "error": "Forbidden"
}
```

```json 404 theme={null}
{
  "statusCode": 404,
  "message": "Document not found",
  "error": "Not Found"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.