curl -X POST "https://api-integration.ollang.com/integration/custom-instructions" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"key": "tone_and_register",
"value": "Match the formality level of the source. Business emails should remain professional.",
"description": "Instructions for maintaining appropriate tone and register"
}'
const response = await fetch(
"https://api-integration.ollang.com/integration/custom-instructions",
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
key: "tone_and_register",
value:
"Match the formality level of the source. Business emails should remain professional.",
description: "Instructions for maintaining appropriate tone and register",
}),
}
);
const created = await response.json();
import requests
data = {
"key": "tone_and_register",
"value": "Match the formality level of the source. Business emails should remain professional.",
"description": "Instructions for maintaining appropriate tone and register",
}
headers = {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
}
response = requests.post(
"https://api-integration.ollang.com/integration/custom-instructions",
headers=headers,
json=data,
)
created = response.json()
{
"id": "507f1f77bcf86cd799439011",
"key": "tone_and_register",
"value": "Match the formality level of the source. Business emails should remain professional.",
"active": true,
"description": "Instructions for maintaining appropriate tone and register",
"scopeRefId": "507f1f77bcf86cd799439012",
"createdAt": "2023-10-05T12:34:56.789Z",
"updatedAt": "2023-10-05T12:34:56.789Z"
}
{
"statusCode": 400,
"message": ["key should not be empty"]
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}
Ollang API Reference
Create Custom Instruction
Create a new custom translation instruction for your account
POST
/
integration
/
custom-instructions
curl -X POST "https://api-integration.ollang.com/integration/custom-instructions" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"key": "tone_and_register",
"value": "Match the formality level of the source. Business emails should remain professional.",
"description": "Instructions for maintaining appropriate tone and register"
}'
const response = await fetch(
"https://api-integration.ollang.com/integration/custom-instructions",
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
key: "tone_and_register",
value:
"Match the formality level of the source. Business emails should remain professional.",
description: "Instructions for maintaining appropriate tone and register",
}),
}
);
const created = await response.json();
import requests
data = {
"key": "tone_and_register",
"value": "Match the formality level of the source. Business emails should remain professional.",
"description": "Instructions for maintaining appropriate tone and register",
}
headers = {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
}
response = requests.post(
"https://api-integration.ollang.com/integration/custom-instructions",
headers=headers,
json=data,
)
created = response.json()
{
"id": "507f1f77bcf86cd799439011",
"key": "tone_and_register",
"value": "Match the formality level of the source. Business emails should remain professional.",
"active": true,
"description": "Instructions for maintaining appropriate tone and register",
"scopeRefId": "507f1f77bcf86cd799439012",
"createdAt": "2023-10-05T12:34:56.789Z",
"updatedAt": "2023-10-05T12:34:56.789Z"
}
{
"statusCode": 400,
"message": ["key should not be empty"]
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}
Create a custom instruction string (guideline) that can influence how translations are produced for your projects.
curl -X POST "https://api-integration.ollang.com/integration/custom-instructions" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"key": "tone_and_register",
"value": "Match the formality level of the source. Business emails should remain professional.",
"description": "Instructions for maintaining appropriate tone and register"
}'
const response = await fetch(
"https://api-integration.ollang.com/integration/custom-instructions",
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
key: "tone_and_register",
value:
"Match the formality level of the source. Business emails should remain professional.",
description: "Instructions for maintaining appropriate tone and register",
}),
}
);
const created = await response.json();
import requests
data = {
"key": "tone_and_register",
"value": "Match the formality level of the source. Business emails should remain professional.",
"description": "Instructions for maintaining appropriate tone and register",
}
headers = {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
}
response = requests.post(
"https://api-integration.ollang.com/integration/custom-instructions",
headers=headers,
json=data,
)
created = response.json()
Authorizations
This endpoint requires API key authentication.- Header name:
X-Api-Key - Header value: Your API key from the Ollang dashboard
Body Parameters
Machine-friendly identifier for this instruction (e.g.
tone_and_register).The full instruction text.
Optional longer description of what this instruction controls.
Response
Returns the created custom instruction, includingid, timestamps, and scopeRefId. Same shape as List Custom Instructions.
{
"id": "507f1f77bcf86cd799439011",
"key": "tone_and_register",
"value": "Match the formality level of the source. Business emails should remain professional.",
"active": true,
"description": "Instructions for maintaining appropriate tone and register",
"scopeRefId": "507f1f77bcf86cd799439012",
"createdAt": "2023-10-05T12:34:56.789Z",
"updatedAt": "2023-10-05T12:34:56.789Z"
}
{
"statusCode": 400,
"message": ["key should not be empty"]
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}
Was this page helpful?
⌘I