Available in VPC
Replace a previously uploaded document with a new one.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
PUT | /api/v1/svc/{serviceId}/doc/{docId} |
Request headers
For information about the headers common to all RAG APIs, see RAG request headers.
Request path parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
serviceId |
String | Required | Service's unique identifier |
docId |
String | Required | Document's unique identifier |
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
orgid |
String | Optional | Original document's unique identifier |
title |
String | Optional | Document title |
file_name |
String | Optional | File name |
body |
String | Required | Document body |
url |
String | Optional | Website URL |
created_at |
String | Optional | Creation date and time
|
extra |
Object | Optional | Additional information
|
Request example
The request example is as follows:
curl --location --request PUT 'https://kr-pub-gateway.rag.naverncp.com/api/v1/svc/{serviceId}/doc/12345' \
--header 'Authorization: Bearer {apiKey}' \
--header 'Content-Type: application/json' \
--data '{
"id": "12345",
"orgid": "naver:media-ai-understanding.txt",
"title": "Media AI Understanding",
"file_name": "media-ai-understanding.txt",
"body": "Where's that scene? Media AI, your video editing savior\n\nIf you've ever edited a video, you've probably experienced it: wasting time looking for a specific scene among dozens of hours of footage. NAVER Cloud's Media AI improves the efficiency of your video production process. Simply upload your footage and the AI will automatically analyze the people and actions in the scene, and even organize the script.\n\nSay, \"Find all the shots of the main character running\", and it will find all the shots of a specific person running in a flash, so you can take a break from editing and focus on your creative work. You can also associate meta information with your editing tools to complete your video editing tasks efficiently.",
"url": "www.naver.com",
"created_at": "2025-06-09T19:45:11+00:00",
"extra": {
"bucket": "naver",
"key": "media-ai-understanding.txt",
"last_modified": "2025-06-09T20:45:11+00:00",
"size": 1024
}
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
status |
Object | - | API processing result |
status.code |
Integer | - | API response status code |
status.message |
String | - | API response status message |
result |
Object | - | Document processing result |
result.inserted |
Array | - | Created file ID (always null ) |
result.deleted |
Array | - | Deleted file ID (always null ) |
result.updated |
Array | - | Edited file ID |
Response status codes
For information about the HTTP status codes common to all RAG APIs, see RAG response status codes.
Response example
The response example is as follows:
{
"status": {
"code": 200,
"message": ""
},
"result": {
"inserted": null,
"deleted": null,
"updated": [
"12345"
]
}
}