curl -X PATCH "https://api-integration.ollang.com/integration/custom-instructions/507f1f77bcf86cd799439011" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"value": "Use informal tone for marketing copy only.",
"active": true
}'
const instructionId = "507f1f77bcf86cd799439011";
const response = await fetch(
`https://api-integration.ollang.com/integration/custom-instructions/${instructionId}`,
{
method: "PATCH",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
value: "Use informal tone for marketing copy only.",
active: true,
}),
}
);
const updated = await response.json();
import requests
instruction_id = "507f1f77bcf86cd799439011"
data = {
"value": "Use informal tone for marketing copy only.",
"active": True,
}
headers = {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
}
response = requests.patch(
f"https://api-integration.ollang.com/integration/custom-instructions/{instruction_id}",
headers=headers,
json=data,
)
updated = response.json()
{
"id": "507f1f77bcf86cd799439011",
"key": "tone_and_register",
"value": "Use informal tone for marketing copy only.",
"active": true,
"description": "Instructions for maintaining appropriate tone and register",
"scopeRefId": "507f1f77bcf86cd799439012",
"createdAt": "2023-10-05T12:34:56.789Z",
"updatedAt": "2023-10-06T09:15:00.000Z"
}
{
"error": "Not Found",
"message": "Custom instruction not found"
}
{
"code": -4,
"error": "UnauthorizedException",
"message": "API Key is missing",
"errorData": "UnauthorizedException"
}
Memories and instructions
Update Custom Instruction
Update an existing custom translation instruction
PATCH
/
integration
/
custom-instructions
/
{instructionId}
curl -X PATCH "https://api-integration.ollang.com/integration/custom-instructions/507f1f77bcf86cd799439011" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"value": "Use informal tone for marketing copy only.",
"active": true
}'
const instructionId = "507f1f77bcf86cd799439011";
const response = await fetch(
`https://api-integration.ollang.com/integration/custom-instructions/${instructionId}`,
{
method: "PATCH",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
value: "Use informal tone for marketing copy only.",
active: true,
}),
}
);
const updated = await response.json();
import requests
instruction_id = "507f1f77bcf86cd799439011"
data = {
"value": "Use informal tone for marketing copy only.",
"active": True,
}
headers = {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
}
response = requests.patch(
f"https://api-integration.ollang.com/integration/custom-instructions/{instruction_id}",
headers=headers,
json=data,
)
updated = response.json()
{
"id": "507f1f77bcf86cd799439011",
"key": "tone_and_register",
"value": "Use informal tone for marketing copy only.",
"active": true,
"description": "Instructions for maintaining appropriate tone and register",
"scopeRefId": "507f1f77bcf86cd799439012",
"createdAt": "2023-10-05T12:34:56.789Z",
"updatedAt": "2023-10-06T09:15:00.000Z"
}
{
"error": "Not Found",
"message": "Custom instruction not found"
}
{
"code": -4,
"error": "UnauthorizedException",
"message": "API Key is missing",
"errorData": "UnauthorizedException"
}
Update any combination of fields on a custom instruction. Send only the properties you want to change.
curl -X PATCH "https://api-integration.ollang.com/integration/custom-instructions/507f1f77bcf86cd799439011" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"value": "Use informal tone for marketing copy only.",
"active": true
}'
const instructionId = "507f1f77bcf86cd799439011";
const response = await fetch(
`https://api-integration.ollang.com/integration/custom-instructions/${instructionId}`,
{
method: "PATCH",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
value: "Use informal tone for marketing copy only.",
active: true,
}),
}
);
const updated = await response.json();
import requests
instruction_id = "507f1f77bcf86cd799439011"
data = {
"value": "Use informal tone for marketing copy only.",
"active": True,
}
headers = {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
}
response = requests.patch(
f"https://api-integration.ollang.com/integration/custom-instructions/{instruction_id}",
headers=headers,
json=data,
)
updated = response.json()
Authorizations
This endpoint requires API key authentication.- Header name:
X-Api-Key - Header value: Your API key from the Ollang dashboard
Path Parameters
The custom instruction’s unique identifier (from List Custom Instructions or create response).
Body Parameters
All fields are optional; include at least one.Response
Returns the updated custom instruction object (same shape as List Custom Instructions).{
"id": "507f1f77bcf86cd799439011",
"key": "tone_and_register",
"value": "Use informal tone for marketing copy only.",
"active": true,
"description": "Instructions for maintaining appropriate tone and register",
"scopeRefId": "507f1f77bcf86cd799439012",
"createdAt": "2023-10-05T12:34:56.789Z",
"updatedAt": "2023-10-06T09:15:00.000Z"
}
{
"error": "Not Found",
"message": "Custom instruction not found"
}
{
"code": -4,
"error": "UnauthorizedException",
"message": "API Key is missing",
"errorData": "UnauthorizedException"
}
Was this page helpful?