# Create a documentation entry

> Source: https://truto.one/docs/api-reference/admin/documentation/create/

`POST /documentation`

Resource: **Documentation**

Create a documentation entry. For `type: tool_name`, `content` must be a unique MCP tool name (lowercase letters, numbers and underscores, at most 64 characters). Sending empty content or the default name changes nothing and stores no entry.

## Request body

- **`integration_id`** _(string)_
- **`environment_integration_id`** _(string)_
- **`unified_model_id`** _(string)_
- **`environment_unified_model_id`** _(string)_
- **`type`** _(string)_
  Entry type. Per-method entries for MCP tools use `description`, `tool_name`, `query_schema`, `body_schema`, and `response_schema`. Integration-wide entries include `readme`, `oauth_*`, and `note`.
  Allowed: `readme`, `note`, `end_user_guide`, `description`, `tool_name`, `query_schema`, `body_schema`, `response_schema`, `oauth_documentation_link`, `oauth_app_requires_verification`, `oauth_note`
- **`content`** _(string)_
- **`resource`** _(string)_
- **`method`** _(string)_
- **`authentication_method`** _(string)_

## Response body

_One of:_
- **object**
  - **`id`** _(string)_
    The entry's ID.
  - **`entity_id`** _(string)_
    The ID of the integration, environment integration, unified model or environment unified model the entry belongs to.
  - **`entity_type`** _(string)_
    What `entity_id` points to.
    Allowed: `integration`, `unified_model`, `environment_integration`, `environment_unified_model`
  - **`type`** _(string)_
    Entry type. Per-method entries for MCP tools use `description`, `tool_name`, `query_schema`, `body_schema`, and `response_schema`. Integration-wide entries include `readme`, `oauth_*`, and `note`.
    Allowed: `readme`, `note`, `end_user_guide`, `description`, `tool_name`, `query_schema`, `body_schema`, `response_schema`, `oauth_documentation_link`, `oauth_app_requires_verification`, `oauth_note`
  - **`content`** _(string)_
    Entry content. For `tool_name`, a custom MCP tool name (lowercase letters, numbers and underscores, at most 64 characters). For `description`, plain text. For `*_schema` types, a YAML-encoded schema.
  - **`resource`** _(string)_
    The resource a per-method entry describes.
  - **`method`** _(string)_
    The method a per-method entry describes.
  - **`authentication_method`** _(string)_
    Set when the entry applies to one authentication method only.
  - **`integration_name`** _(string)_
    The integration the entry belongs to.
  - **`created_at`** _(string)_
    When the entry was created.
  - **`updated_at`** _(string)_
    When the entry was last updated.

## Code examples

### curl

```bash
curl -X POST 'https://api.truto.one/documentation' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "integration_id": "your_integration_id",
  "environment_integration_id": "your_environment_integration_id",
  "unified_model_id": "your_unified_model_id",
  "environment_unified_model_id": "your_environment_unified_model_id",
  "type": "readme",
  "content": "your_content",
  "resource": "your_resource",
  "method": "your_method",
  "authentication_method": "your_authentication_method"
}'
```

### JavaScript

```javascript
const body = {
  "integration_id": "your_integration_id",
  "environment_integration_id": "your_environment_integration_id",
  "unified_model_id": "your_unified_model_id",
  "environment_unified_model_id": "your_environment_unified_model_id",
  "type": "readme",
  "content": "your_content",
  "resource": "your_resource",
  "method": "your_method",
  "authentication_method": "your_authentication_method"
};

const response = await fetch('https://api.truto.one/documentation', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/documentation"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "integration_id": "your_integration_id",
    "environment_integration_id": "your_environment_integration_id",
    "unified_model_id": "your_unified_model_id",
    "environment_unified_model_id": "your_environment_unified_model_id",
    "type": "readme",
    "content": "your_content",
    "resource": "your_resource",
    "method": "your_method",
    "authentication_method": "your_authentication_method"
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())
```
