Dynamic guide optimized for AI tools with project-specific endpoints
All string constants follow this pattern: area.section.string
public.home.welcome:
public = area (specify in API)home = section (specify in API)welcome = string identifier (use as key in API)"key": "welcome", not "key": "public.home.welcome"
"Welcome to our website!" with public.home.welcome in your HTML/JavaScript
admin - Admin pagespublic - Public pagesbrandcategorycontactdashboarddepartmentfeaturesgeneralinventoryloanlocationloginmailmenuotherpaymentplanprofileregisterreportsettingssupplierstagstitleaboutcontactfeaturesgeneralhomeloginmailmenuotherpaymentplanregistertitlewelcome, savebtn, edittextUse these endpoints specifically designed for AI tools with simplified authentication:
Your AI can use these endpoints for different operations:
POST /api/v1/projects/96/strings/ai β
AI-optimized operationsGET /api/v1/projects/96/translations β
Get both languages at oncePOST /api/v1/projects/96/translations/unified β
Unified translation updatesPOST /api/v1/projects/96/strings:find-similar β
Find similar stringsGET /api/v1/projects/96/strings β
List stringsπ‘ RECOMMENDED: Use POST /api/v1/projects/96/strings/ai for AI operations, but other endpoints are also valid!
"action": "info" to get the project structure (areas and sections) before creating strings!
Start by getting information about your project:
curl -X POST "https://la.deltascripts.com/api/v1/projects/96/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "info"
}'
{
"success": true,
"project_id": 96,
"project_name": "InventarListen",
"available_areas": ["admin", "public"],
"total_strings": 1748,
"api_endpoints": {
"find_similar": "POST https://la.deltascripts.com/api/v1/projects/96/strings/ai",
"create_string": "POST https://la.deltascripts.com/api/v1/projects/96/strings/ai",
"list_strings": "POST https://la.deltascripts.com/api/v1/projects/96/strings/ai"
}
}
π― PRIMARY METHOD: Get both English and Norwegian translations for your project. This helps you see what's already available before creating new strings. No authentication required for AI!
curl -X GET "https://la.deltascripts.com/api/v1/projects/96/translations?languages=en,no"
curl -X GET "https://la.deltascripts.com/api/v1/projects/96/translations?languages=en,no&area=admin"
curl -X GET "https://la.deltascripts.com/api/v1/projects/96/translations?languages=en,no&area=admin§ion=dashboard"
{
"success": true,
"project_id": 96,
"languages": ["en", "no"],
"area": "admin",
"section": "all",
"translations": [
{
"string_id": 123,
"key": "welcome",
"area": "admin",
"section": "dashboard",
"status": "active",
"base_text": "Welcome to the admin panel",
"translations": {
"en": {
"text": "Welcome to the admin panel",
"state": "approved",
"updated_at": "2025-01-27 10:30:00"
},
"no": {
"text": "Velkommen til admin-panelet",
"state": "approved",
"updated_at": "2025-01-27 10:30:00"
}
}
}
],
"statistics": {
"total_strings": 25,
"total_translations": 50,
"coverage_percentage": 100.0,
"by_language": {
"en": 25,
"no": 25
}
}
}
translations table and treated equally. English is no longer treated as a "base language" - both languages have the same status and can be updated independently.
Check for existing strings before creating new ones. Always specify the area to avoid confusion:
curl -X POST "https://la.deltascripts.com/api/v1/projects/96/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "find_similar",
"text": "Welcome to our website!",
"area": "public",
"limit": 10
}'
{
"success": true,
"search_text": "Welcome to our website!",
"search_area": "public",
"total_found": 3,
"results": {
"exact_matches": [
{
"id": 123,
"full_key": "public.home.welcome",
"base_text": "Welcome to our website!",
"area_name": "public",
"section_name": "home",
"match_type": "exact_match",
"similarity_score": 100
}
],
"partial_matches": []
},
"recommendations": {
"exact_match_found": "Use existing string instead of creating duplicate",
"suggested_action": "use_existing"
},
"suggested_alternatives": [
{
"action": "use_existing",
"string_id": 123,
"full_key": "public.home.welcome",
"base_text": "Welcome to our website!",
"api_endpoints": {
"view_string": "GET https://la.deltascripts.com/api/v1/projects/96/strings/123"
}
}
]
}
Create strings with intelligent feedback and duplicate detection:
"action": "create_with_translations" to create strings! Both English and Norwegian translations are required and will be stored in the translations table.
base_text field must contain the English text, not the Norwegian translation!
"base_text": "Welcome to our website!"
"base_text": "Velkommen til vΓ₯rt nettsted!"
key:
"key": "welcome" (for public.home.welcome)
"key": "public.home.welcome"
area + section + key
public.home.welcome, admin.dashboard.savebtn
welcome, savebtn
"Welcome to our website!" with public.home.welcome in your HTML/JavaScript
curl -X POST "https://la.deltascripts.com/api/v1/projects/96/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "create_with_translations",
"area": "public",
"section": "home",
"base_text": "Welcome to our website!",
"norwegian_text": "Velkommen til vΓ₯rt nettsted!",
"suggested_key": "welcome"
}'
{
"success": true,
"message": "String and Norwegian translation created successfully",
"data": {
"id": 123,
"full_key": "public.home.welcome",
"base_text": "Welcome to our website!",
"norwegian_text": "Velkommen til vΓ₯rt nettsted!",
"area": "public",
"section": "home",
"status": "active",
"created_at": "2025-01-27 10:30:00"
},
"translations": {
"english": "Welcome to our website!",
"norwegian": "Velkommen til vΓ₯rt nettsted!"
},
"api_endpoints": {
"view_string": "GET https://la.deltascripts.com/api/v1/projects/96/strings/123",
"update_string": "PUT https://la.deltascripts.com/api/v1/projects/96/strings/123",
"delete_string": "DELETE https://la.deltascripts.com/api/v1/projects/96/strings/123"
}
}
{
"success": false,
"error": "String key already exists",
"duplicate_info": {
"id": 123,
"full_key": "public.home.welcome",
"existing_text": "Welcome to our website!",
"status": "active"
},
"suggestions": {
"use_existing": "The string already exists with ID 123",
"update_existing": "Use PUT /api/v1/projects/96/strings/123 to update the existing string"
},
"api_endpoints": {
"update_existing": "PUT https://la.deltascripts.com/api/v1/projects/96/strings/123",
"view_existing": "GET https://la.deltascripts.com/api/v1/projects/96/strings/123"
}
}
After creating a string with English base_text, add Norwegian translations:
base_textcurl -X POST "https://la.deltascripts.com/api/v1/projects/96/translations/unified" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"translations": [
{
"key": "welcome",
"lang": "no",
"text": "Velkommen til vΓ₯rt nettsted!"
}
]
}'
{
"success": true,
"message": "Unified update completed",
"data": {
"strings_updated": [],
"translations_updated": [
{
"key": "welcome",
"lang": "no",
"text": "Velkommen til vΓ₯rt nettsted!",
"status": "created"
}
],
"errors": [],
"warnings": []
}
}
Get detailed statistics about strings distribution across areas and sections:
curl -X POST "https://la.deltascripts.com/api/v1/projects/96/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "stats"
}'
{
"success": true,
"project_id": 96,
"summary": {
"total_strings": 150,
"total_areas": 3,
"total_sections": 12
},
"statistics": {
"by_area": [
{
"area_name": "admin",
"string_count": 45
},
{
"area_name": "member",
"string_count": 67
},
{
"area_name": "public",
"string_count": 38
}
],
"by_section": {
"admin": [
{
"section_name": "dashboard",
"string_count": 25
},
{
"section_name": "settings",
"string_count": 20
}
],
"public": [
{
"section_name": "home",
"string_count": 20
},
{
"section_name": "login",
"string_count": 18
}
]
},
"by_status": [
{
"status": "active",
"count": 140
},
{
"status": "draft",
"count": 10
}
],
"status_by_area": {
"admin": [
{
"status": "active",
"count": 40
},
{
"status": "draft",
"count": 5
}
],
"public": [
{
"status": "active",
"count": 35
},
{
"status": "draft",
"count": 3
}
]
},
"status_by_section": {
"admin": {
"dashboard": [
{
"status": "active",
"count": 25
},
{
"status": "draft",
"count": 2
}
],
"settings": [
{
"status": "active",
"count": 15
},
{
"status": "draft",
"count": 3
}
]
},
"public": {
"home": [
{
"status": "active",
"count": 20
}
],
"login": [
{
"status": "active",
"count": 15
},
{
"status": "draft",
"count": 3
}
]
}
},
"recent_activity": [
{
"date": "2025-01-27",
"created_count": 5
},
{
"date": "2025-01-26",
"created_count": 3
}
]
}
}
Get all strings in your project or filter by area/section:
curl -X POST "https://la.deltascripts.com/api/v1/projects/96/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "list"
}'
curl -X POST "https://la.deltascripts.com/api/v1/projects/96/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "list",
"area": "public",
"section": "home"
}'
success fieldIf your AI needs to create the missing key admin.general.settings, here's exactly how to do it:
curl -X POST "https://la.deltascripts.com/api/v1/projects/96/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "find_similar",
"text": "Settings",
"area": "admin",
"section": "general"
}'
curl -X POST "https://la.deltascripts.com/api/v1/projects/96/strings/ai" \
-H "Content-Type: application/json" \
-d '{
"action": "create_with_translations",
"area": "admin",
"section": "general",
"base_text": "Settings",
"norwegian_text": "Innstillinger",
"suggested_key": "settings"
}'
{
"success": true,
"message": "String and Norwegian translation created successfully",
"data": {
"id": 1234,
"full_key": "admin.general.settings",
"base_text": "Settings",
"norwegian_text": "Innstillinger",
"area": "admin",
"section": "general",
"status": "active",
"created_at": "2025-01-27 10:30:00"
}
}
You can also use these endpoints for different operations:
POST /api/v1/projects/96/translations/unified - β
Unified translation updatesGET /api/v1/projects/96/translations - β
List all translationsPUT /api/v1/projects/96/areas/admin - β
Update area settingsAvailable sections: brand, category, contact and 20 more
{
"action": "find_similar",
"text": "Welcome to our admin page",
"area": "admin"
}
{
"action": "create_with_translations",
"area": "admin",
"section": "brand",
"base_text": "Welcome to our admin area",
"norwegian_text": "Velkommen til vΓ₯rt admin omrΓ₯de"
}
This will create a string with full key: admin.brand.welcome
Available sections: about, contact, features and 10 more
{
"action": "find_similar",
"text": "Welcome to our public page",
"area": "public"
}
{
"action": "create_with_translations",
"area": "public",
"section": "about",
"base_text": "Welcome to our public area",
"norwegian_text": "Velkommen til vΓ₯rt public omrΓ₯de"
}
This will create a string with full key: public.about.welcome
| Action | Endpoint | Purpose |
|---|---|---|
| Get Project Info | POST /api/v1/projects/96/strings/ai |
Get project details and available areas |
| Find Similar Strings | POST /api/v1/projects/96/strings/ai |
Check for existing strings (area-specific) |
| Create String (MANDATORY) | POST /api/v1/projects/96/strings/ai |
Create new string with both English and Norwegian translations |
| Get Statistics | POST /api/v1/projects/96/strings/ai |
Get detailed statistics by area/section |
| List Strings | POST /api/v1/projects/96/strings/ai |
Get all strings or filter by area/section |
"action": "info" to get project details"action": "find_similar" before creating new stringsarea parameter to avoid confusionhttps://la.deltascripts.com/api/v1/projects/96/strings/ai
Your AI reports getting "Not Found" or 404 errors when trying to create keys.
Recommended endpoint for AI operations:
POST https://la.deltascripts.com/api/v1/projects/96/strings/ai
{
"action": "create_with_translations",
"area": "admin",
"section": "general",
"base_text": "Your English Text",
"norwegian_text": "Din norske tekst",
"suggested_key": "yourkey"
}
"action": "create_with_translations"area and sectionbase_text (English) and norwegian_text/translations/unified are also available for different use cases