curl -X PATCH "https://api-integration.ollang.com/integration/project/60b8d6f1e1b9b1d8c6c0d8e3/docs/60b8d6f1e1b9b1d8c6c0d8f5" \
-H "X-Api-Key: $OLLANG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
"name": "Episode 5 slang notes v2"
}'
const projectId = "60b8d6f1e1b9b1d8c6c0d8e3";
const docId = "60b8d6f1e1b9b1d8c6c0d8f5";
const response = await fetch(
`https://api-integration.ollang.com/integration/project/${projectId}/docs/${docId}`,
{
method: "PATCH",
headers: {
"X-Api-Key": process.env.OLLANG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
name: "Episode 5 slang notes v2",
}),
},
);
const doc = await response.json();
console.log("Updated document:", doc.name);
import os
import requests
project_id = "60b8d6f1e1b9b1d8c6c0d8e3"
doc_id = "60b8d6f1e1b9b1d8c6c0d8f5"
response = requests.patch(
f"https://api-integration.ollang.com/integration/project/{project_id}/docs/{doc_id}",
headers={
"X-Api-Key": os.environ["OLLANG_API_KEY"],
"Content-Type": "application/json",
},
json={
"url": "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
"name": "Episode 5 slang notes v2",
},
)
doc = response.json()
print("Updated document:", doc["name"])
$projectId = '60b8d6f1e1b9b1d8c6c0d8e3';
$docId = '60b8d6f1e1b9b1d8c6c0d8f5';
$payload = json_encode([
'url' => 'https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...',
'name' => 'Episode 5 slang notes v2',
]);
$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 => 'PATCH',
CURLOPT_POSTFIELDS => $payload,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: ' . getenv('OLLANG_API_KEY'),
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
$doc = json_decode($response, true);
curl_close($curl);
echo "Updated document: " . $doc['name'];
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
projectID := "60b8d6f1e1b9b1d8c6c0d8e3"
docID := "60b8d6f1e1b9b1d8c6c0d8f5"
url := "https://api-integration.ollang.com/integration/project/" + projectID + "/docs/" + docID
payload, _ := json.Marshal(map[string]interface{}{
"url": "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
"name": "Episode 5 slang notes v2",
})
req, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(payload))
req.Header.Set("X-Api-Key", os.Getenv("OLLANG_API_KEY"))
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var doc map[string]interface{}
json.Unmarshal(body, &doc)
fmt.Println("Updated document:", doc["name"])
}
String projectId = "60b8d6f1e1b9b1d8c6c0d8e3";
String docId = "60b8d6f1e1b9b1d8c6c0d8f5";
JSONObject payload = new JSONObject()
.put("url", "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...")
.put("name", "Episode 5 slang notes v2");
HttpResponse<String> response = Unirest
.patch("https://api-integration.ollang.com/integration/project/" + projectId + "/docs/" + docId)
.header("X-Api-Key", System.getenv("OLLANG_API_KEY"))
.header("Content-Type", "application/json")
.body(payload.toString())
.asString();
JSONObject doc = new JSONObject(response.getBody());
System.out.println("Updated document: " + doc.getString("name"));
{
"id": "60b8d6f1e1b9b1d8c6c0d8f5",
"name": "Episode 5 slang notes v2.pdf",
"type": "guideline",
"url": "https://ollang-docs.s3.eu-central-1.amazonaws.com/60b8d6f1e1b9b1d8c6c0d8e5/episode-5-slang-notes-v2.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Signature=...",
"size": 97340,
"sourceLanguage": "en",
"projectId": "60b8d6f1e1b9b1d8c6c0d8e3",
"parentDocId": null,
"clientId": "60b8d6f1e1b9b1d8c6c0d8e5",
"createdAt": "2026-10-21T08:02:51.104Z",
"updatedAt": "2026-10-21T09:40:12.630Z"
}
{
"statusCode": 400,
"message": "This document is inherited from the project folder. Manage it through the folder document endpoints, or delete it from the project to stop applying it here.",
"error": "Bad Request"
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}
{
"statusCode": 403,
"message": "You don't have permission to perform this action. Please contact your account admin.",
"error": "Forbidden"
}
{
"statusCode": 404,
"message": "Document not found",
"error": "Not Found"
}
Ollang API Reference
Update Project Document
Rename a project document, change its language, or replace its content
PATCH
/
integration
/
project
/
{projectId}
/
docs
/
{docId}
curl -X PATCH "https://api-integration.ollang.com/integration/project/60b8d6f1e1b9b1d8c6c0d8e3/docs/60b8d6f1e1b9b1d8c6c0d8f5" \
-H "X-Api-Key: $OLLANG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
"name": "Episode 5 slang notes v2"
}'
const projectId = "60b8d6f1e1b9b1d8c6c0d8e3";
const docId = "60b8d6f1e1b9b1d8c6c0d8f5";
const response = await fetch(
`https://api-integration.ollang.com/integration/project/${projectId}/docs/${docId}`,
{
method: "PATCH",
headers: {
"X-Api-Key": process.env.OLLANG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
name: "Episode 5 slang notes v2",
}),
},
);
const doc = await response.json();
console.log("Updated document:", doc.name);
import os
import requests
project_id = "60b8d6f1e1b9b1d8c6c0d8e3"
doc_id = "60b8d6f1e1b9b1d8c6c0d8f5"
response = requests.patch(
f"https://api-integration.ollang.com/integration/project/{project_id}/docs/{doc_id}",
headers={
"X-Api-Key": os.environ["OLLANG_API_KEY"],
"Content-Type": "application/json",
},
json={
"url": "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
"name": "Episode 5 slang notes v2",
},
)
doc = response.json()
print("Updated document:", doc["name"])
$projectId = '60b8d6f1e1b9b1d8c6c0d8e3';
$docId = '60b8d6f1e1b9b1d8c6c0d8f5';
$payload = json_encode([
'url' => 'https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...',
'name' => 'Episode 5 slang notes v2',
]);
$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 => 'PATCH',
CURLOPT_POSTFIELDS => $payload,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: ' . getenv('OLLANG_API_KEY'),
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
$doc = json_decode($response, true);
curl_close($curl);
echo "Updated document: " . $doc['name'];
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
projectID := "60b8d6f1e1b9b1d8c6c0d8e3"
docID := "60b8d6f1e1b9b1d8c6c0d8f5"
url := "https://api-integration.ollang.com/integration/project/" + projectID + "/docs/" + docID
payload, _ := json.Marshal(map[string]interface{}{
"url": "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
"name": "Episode 5 slang notes v2",
})
req, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(payload))
req.Header.Set("X-Api-Key", os.Getenv("OLLANG_API_KEY"))
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var doc map[string]interface{}
json.Unmarshal(body, &doc)
fmt.Println("Updated document:", doc["name"])
}
String projectId = "60b8d6f1e1b9b1d8c6c0d8e3";
String docId = "60b8d6f1e1b9b1d8c6c0d8f5";
JSONObject payload = new JSONObject()
.put("url", "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...")
.put("name", "Episode 5 slang notes v2");
HttpResponse<String> response = Unirest
.patch("https://api-integration.ollang.com/integration/project/" + projectId + "/docs/" + docId)
.header("X-Api-Key", System.getenv("OLLANG_API_KEY"))
.header("Content-Type", "application/json")
.body(payload.toString())
.asString();
JSONObject doc = new JSONObject(response.getBody());
System.out.println("Updated document: " + doc.getString("name"));
{
"id": "60b8d6f1e1b9b1d8c6c0d8f5",
"name": "Episode 5 slang notes v2.pdf",
"type": "guideline",
"url": "https://ollang-docs.s3.eu-central-1.amazonaws.com/60b8d6f1e1b9b1d8c6c0d8e5/episode-5-slang-notes-v2.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Signature=...",
"size": 97340,
"sourceLanguage": "en",
"projectId": "60b8d6f1e1b9b1d8c6c0d8e3",
"parentDocId": null,
"clientId": "60b8d6f1e1b9b1d8c6c0d8e5",
"createdAt": "2026-10-21T08:02:51.104Z",
"updatedAt": "2026-10-21T09:40:12.630Z"
}
{
"statusCode": 400,
"message": "This document is inherited from the project folder. Manage it through the folder document endpoints, or delete it from the project to stop applying it here.",
"error": "Bad Request"
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}
{
"statusCode": 403,
"message": "You don't have permission to perform this action. Please contact your account admin.",
"error": "Forbidden"
}
{
"statusCode": 404,
"message": "Document not found",
"error": "Not Found"
}
Updates a document attached to a project. Send any combination of
name, language, and url; fields you leave out are unchanged. Sending url replaces the document’s content, while the document keeps its ID.
Only documents attached to the project itself can be updated. A folder document listed for the project (its folderId is set) returns 400: change it through the folder document endpoints, or remove it from this project.
Orders created before the update keep the guidance they were already
processed with. The update affects work that runs after it.
curl -X PATCH "https://api-integration.ollang.com/integration/project/60b8d6f1e1b9b1d8c6c0d8e3/docs/60b8d6f1e1b9b1d8c6c0d8f5" \
-H "X-Api-Key: $OLLANG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
"name": "Episode 5 slang notes v2"
}'
const projectId = "60b8d6f1e1b9b1d8c6c0d8e3";
const docId = "60b8d6f1e1b9b1d8c6c0d8f5";
const response = await fetch(
`https://api-integration.ollang.com/integration/project/${projectId}/docs/${docId}`,
{
method: "PATCH",
headers: {
"X-Api-Key": process.env.OLLANG_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
name: "Episode 5 slang notes v2",
}),
},
);
const doc = await response.json();
console.log("Updated document:", doc.name);
import os
import requests
project_id = "60b8d6f1e1b9b1d8c6c0d8e3"
doc_id = "60b8d6f1e1b9b1d8c6c0d8f5"
response = requests.patch(
f"https://api-integration.ollang.com/integration/project/{project_id}/docs/{doc_id}",
headers={
"X-Api-Key": os.environ["OLLANG_API_KEY"],
"Content-Type": "application/json",
},
json={
"url": "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
"name": "Episode 5 slang notes v2",
},
)
doc = response.json()
print("Updated document:", doc["name"])
$projectId = '60b8d6f1e1b9b1d8c6c0d8e3';
$docId = '60b8d6f1e1b9b1d8c6c0d8f5';
$payload = json_encode([
'url' => 'https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...',
'name' => 'Episode 5 slang notes v2',
]);
$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 => 'PATCH',
CURLOPT_POSTFIELDS => $payload,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: ' . getenv('OLLANG_API_KEY'),
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
$doc = json_decode($response, true);
curl_close($curl);
echo "Updated document: " . $doc['name'];
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
projectID := "60b8d6f1e1b9b1d8c6c0d8e3"
docID := "60b8d6f1e1b9b1d8c6c0d8f5"
url := "https://api-integration.ollang.com/integration/project/" + projectID + "/docs/" + docID
payload, _ := json.Marshal(map[string]interface{}{
"url": "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...",
"name": "Episode 5 slang notes v2",
})
req, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(payload))
req.Header.Set("X-Api-Key", os.Getenv("OLLANG_API_KEY"))
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var doc map[string]interface{}
json.Unmarshal(body, &doc)
fmt.Println("Updated document:", doc["name"])
}
String projectId = "60b8d6f1e1b9b1d8c6c0d8e3";
String docId = "60b8d6f1e1b9b1d8c6c0d8f5";
JSONObject payload = new JSONObject()
.put("url", "https://your-bucket.s3.amazonaws.com/episode-5-slang-notes-v2.pdf?X-Amz-Signature=...")
.put("name", "Episode 5 slang notes v2");
HttpResponse<String> response = Unirest
.patch("https://api-integration.ollang.com/integration/project/" + projectId + "/docs/" + docId)
.header("X-Api-Key", System.getenv("OLLANG_API_KEY"))
.header("Content-Type", "application/json")
.body(payload.toString())
.asString();
JSONObject doc = new JSONObject(response.getBody());
System.out.println("Updated document: " + doc.getString("name"));
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
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
string
required
The unique identifier of the project the document belongs to.
string
required
The unique identifier of the project document. Retrieve document IDs with
List Project Documents.
Body Parameters
Send at least one ofurl, name, or language. An empty body returns 400.
string
Replaces the document’s content. A URL Ollang can read the new file from, such
as a pre-signed S3 URL, with the same rules as Attach Project
Document:
http or
https, a public address, no redirect, and 50 MB or smaller. Ollang stores
its own copy. Unless you also send name, the document keeps its name with
the new file’s extension (notes.pdf becomes notes.docx).string
New display name of the document. The file’s extension is appended when the
name does not already end with it.
number
Size of the new file in bytes. Only used together with
url, and
informational: Ollang records the size of the file it actually fetched.string
New BCP-47 language tag of the document (e.g.
de).Response
Returns the updated project document, in the same shape as List Project Documents.{
"id": "60b8d6f1e1b9b1d8c6c0d8f5",
"name": "Episode 5 slang notes v2.pdf",
"type": "guideline",
"url": "https://ollang-docs.s3.eu-central-1.amazonaws.com/60b8d6f1e1b9b1d8c6c0d8e5/episode-5-slang-notes-v2.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Signature=...",
"size": 97340,
"sourceLanguage": "en",
"projectId": "60b8d6f1e1b9b1d8c6c0d8e3",
"parentDocId": null,
"clientId": "60b8d6f1e1b9b1d8c6c0d8e5",
"createdAt": "2026-10-21T08:02:51.104Z",
"updatedAt": "2026-10-21T09:40:12.630Z"
}
{
"statusCode": 400,
"message": "This document is inherited from the project folder. Manage it through the folder document endpoints, or delete it from the project to stop applying it here.",
"error": "Bad Request"
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}
{
"statusCode": 403,
"message": "You don't have permission to perform this action. Please contact your account admin.",
"error": "Forbidden"
}
{
"statusCode": 404,
"message": "Document not found",
"error": "Not Found"
}
Was this page helpful?