This page documents the available API endpoints, their purpose, input, and output.
New to the API? Check out our guides:
Quick Tips:
New Translation Fetching API:
Key Features:
Monitoring:
Tests are here: https://la.deltascripts.com/testing
BASE: https://la.deltascripts.com
| Method | Path | Description | Auth | Input | Output |
|---|---|---|---|---|---|
| POST | /api/v1/auth/login | Login using username or email and password. | – | {
"username\/email": "string",
"password": "string"
} | {
"token": "string",
"user": "object",
"expires_at": "datetime"
} |
| POST | /api/v1/customers | Create a new customer (company). | Bearer token (admin) | {
"name": "string"
} | {
"id": "int",
"name": "string"
} |
| POST | /api/v1/projects | Create a new project under a customer. | Bearer token (admin) | {
"customer_id": "int",
"name": "string",
"default_lang": "string"
} | {
"id": "int",
"name": "string",
"default_lang": "string"
} |
| POST | /api/v1/users | Create a new user account. | Bearer token (admin) | {
"username": "string",
"email": "string",
"name": "string",
"password": "string"
} | {
"id": "int",
"username": "string",
"email": "string",
"is_active": "int"
} |
| PUT | /api/v1/users/{id}/password | Change a user password (self or admin). | Bearer token | {
"old_password (optional)": "string",
"new_password": "string"
} | {
"ok": "true",
"message": "Password updated"
} |
| GET | /api/v1/projects/{id}/areas | 📋 List all areas in a project. | Bearer token (viewer) | [] | [
{
"id": "int",
"name": "string",
"project_id": "int"
},
"..."
] |
| POST | /api/v1/projects/{id}/areas | ➕ Create an area (e.g. admin, public, member, mail). | Bearer token (admin) | {
"name": "string"
} | {
"id": "int",
"name": "string"
} |
| PUT | /api/v1/projects/{id}/areas/{area} | ✏️ Update an area name (admin, public, member, mail only). | Bearer token (admin) | {
"name": "string"
} | {
"id": "int",
"name": "string"
} |
| DELETE | /api/v1/projects/{id}/areas/{area} | 🗑️ Delete an area and all its sections (only if area contains no strings). | Bearer token (admin) | [] | [] |
| GET | /api/v1/projects/{id}/areas/{area}/sections | 📋 List all sections in an area. | Bearer token (viewer) | [] | [
{
"id": "int",
"name": "string",
"area_id": "int"
},
"..."
] |
| POST | /api/v1/projects/{id}/areas/{area}/sections | ➕ Create a section inside an area. | Bearer token (admin) | {
"name": "string"
} | {
"id": "int",
"name": "string"
} |
| PUT | /api/v1/projects/{id}/areas/{area}/sections/{section} | ✏️ Update a section name. | Bearer token (admin) | {
"name": "string"
} | {
"id": "int",
"name": "string"
} |
| DELETE | /api/v1/projects/{id}/areas/{area}/sections/{section} | 🗑️ Delete a section (only if section contains no strings). | Bearer token (admin) | [] | [] |
| GET | /api/v1/projects/{id}/strings:suggest | Get suggestions for valid constant names based on text content. | Bearer token (project access) | {
"text (query, opt)": "string",
"area (query, opt)": "string",
"section (query, opt)": "string",
"limit (query, opt)": "int"
} | {
"suggestions": [
{
"constant": "string",
"full_key": "string|null",
"length": "int"
},
"..."
],
"total": "int",
"rules": {
"max_length": "int",
"allowed_chars": "string",
"format": "string"
}
} |
| POST | /api/v1/projects/{id}/strings:propose | Propose a new string in a project. | Bearer token | {
"area": "string",
"section": "string",
"key": "string",
"base_text": "string"
} | {
"id": "int",
"key": "string",
"base_text": "string",
"status": "active"
} |
| POST | /api/v1/projects/{id}/validate/strings | 🔍 NEW: Advanced validation for string keys with duplicate detection. Validates naming conventions, detects duplicates, and provides suggestions. | Bearer token (read) | {
"strings": [
{
"key": "string",
"base_text": "string"
},
"..."
]
} | {
"success": "true",
"data": {
"valid": "array",
"invalid": "array",
"duplicates": "array",
"existing_keys": "array",
"suggestions": "array"
},
"meta": {
"validated_by": "string",
"validated_at": "timestamp",
"summary": "object"
}
} |
| POST | /api/v1/projects/{id}/validate/translations | 🔍 NEW: Validate translations for conflicts and missing strings. Checks for existing translations and provides warnings. | Bearer token (read) | {
"translations": [
{
"key": "string",
"lang": "string",
"text": "string"
},
"..."
]
} | {
"success": "true",
"data": {
"valid": "array",
"invalid": "array",
"missing_strings": "array",
"existing_translations": "array"
},
"meta": {
"validated_by": "string",
"validated_at": "timestamp",
"summary": "object"
}
} |
| POST | /api/v1/projects/{id}/translations/unified | 🚀 NEW: Unified endpoint for updating both strings and translations in one request. Now includes advanced validation and auto-fix capabilities. Use validate_only=true for validation only, auto_fix=true for automatic fixes. | Bearer token (write) | {
"strings": [
{
"key": "string",
"base_text": "string"
},
"..."
],
"translations": [
{
"key": "string",
"lang": "string",
"text": "string"
},
"..."
],
"validate_only": "boolean",
"auto_fix": "boolean"
} | {
"success": "true",
"data": {
"strings_updated": "array",
"translations_updated": "array",
"errors": "array",
"warnings": "array",
"auto_fixes": "array"
},
"meta": {
"updated_by": "string",
"updated_at": "timestamp",
"summary": "object"
}
} |
| GET | /api/v1/projects/{id}/translations/status?lang=xx | 📊 NEW: Get translation status overview for a language, including completion statistics and area breakdown. | Bearer token (read) | [] | {
"success": "true",
"data": {
"language": "string",
"statistics": "object",
"area_breakdown": "array",
"completion_percentage": "float"
}
} |
| POST | /api/v1/projects/{id}/translations/bulk-reject | 🚫 NEW: Bulk reject multiple translations by setting their state to 'rejected'. Requires write permission. | Bearer token (write) | {
"translations": [
{
"key": "string",
"lang": "string",
"reason (opt)": "string"
},
"..."
]
} | {
"success": "true",
"data": {
"rejected": "array",
"errors": "array",
"warnings": "array"
},
"meta": {
"rejected_by": "string",
"rejected_at": "timestamp",
"summary": "object"
}
} |
| POST | /api/v1/projects/{id}/translations/bulk-approve | ✅ NEW: Bulk approve multiple translations by setting their state to 'approved'. Requires write permission. | Bearer token (write) | {
"translations": [
{
"key": "string",
"lang": "string",
"reason (opt)": "string"
},
"..."
]
} | {
"success": "true",
"data": {
"approved": "array",
"errors": "array",
"warnings": "array"
},
"meta": {
"approved_by": "string",
"approved_at": "timestamp",
"summary": "object"
}
} |
| POST | /api/v1/projects/{id}/translations/bulk-move | 🔄 NEW: Bulk move translations to different state, area, or section. Can move to any state (new, draft, approved, rejected) and/or different areas/sections. Requires write permission. | Bearer token (write) | {
"translations": [
{
"key": "string",
"lang": "string",
"reason (opt)": "string"
},
"..."
],
"target_state (opt)": "new|draft|approved|rejected",
"target_area (opt)": "public|member|admin",
"target_section (opt)": "string"
} | {
"success": "true",
"data": {
"moved": "array",
"errors": "array",
"warnings": "array"
},
"meta": {
"moved_by": "string",
"moved_at": "timestamp",
"target_state": "string",
"target_area": "string",
"target_section": "string",
"summary": "object"
}
} |
| POST | /api/v1/projects/{id}/translations/bulk-delete | 🗑️ NEW: Bulk permanently delete entire strings and all their translations in all languages. This action cannot be undone. Requires admin permission. | Bearer token (admin) | {
"translations": [
{
"key": "string",
"reason (opt)": "string"
},
"..."
]
} | {
"success": "true",
"data": {
"deleted": "array",
"errors": "array",
"warnings": "array"
},
"meta": {
"deleted_by": "string",
"deleted_at": "timestamp",
"summary": "object"
}
} |
| POST | /api/v1/projects/{id}/translations:upsert | Insert or update a translation (legacy endpoint). | Bearer token | {
"key": "string",
"lang": "string",
"text": "string"
} | {
"success": "true",
"data": {
"key": "string",
"lang": "string",
"text": "string",
"state": "draft",
"string_id": "int",
"base_text": "string"
},
"meta": {
"updated_by": "string",
"updated_at": "timestamp"
}
} |
| POST | /api/v1/projects/{id}/translations:approve | Approve one or more translations. | Bearer token (admin/reviewer) | {
"keys": "array",
"lang": "string"
} | {
"success": "true",
"data": {
"approved_count": "int",
"approved_translations": "array",
"summary": "object"
},
"meta": {
"approved_by": "string",
"approved_at": "timestamp"
}
} |
| GET | /api/v1/projects/{id}/areas/{area}/version?lang=xx | Get the current version number of a given area/language. | Bearer token | [] | {
"version": "int",
"checksum": "string|null"
} |
| GET | /api/v1/projects/{id}/areas/{area}/sections/{section}/bundle?lang=xx&since_version=N | Fetch translation bundle for a section since a given version. | Bearer token | [] | {
"meta": "object",
"strings": "object"
} |
| GET | /api/v1/projects/{id}/strings | Get all strings for a project with optional filtering and translations. Supports multiple values for areas, sections, statuses, and translation states (comma-separated). | Bearer token (project access) | {
"lang (query, opt)": "string",
"include_translations (query, opt)": "0|1",
"area (query, opt)": "string|array",
"section (query, opt)": "string|array",
"status (query, opt)": "active|deprecated|all|array",
"translation_state (query, opt)": "new|draft|approved|rejected|missing|all|array"
} | [
{
"id": "int",
"key": "string",
"base_text": "string",
"status": "string",
"area": "string",
"section": "string",
"created_at": "timestamp",
"updated_at": "timestamp",
"translation (opt)": {
"text": "string",
"state": "string"
}
},
"..."
] |
| GET | /api/v1/projects/{id}/strings/lookup?keys=...&lang=xx | Look up specific strings by their keys. | Bearer token (project access) | {
"keys (query)": "string",
"lang (query)": "string"
} | [
{
"key": "string",
"base_text": "string",
"translation": "string|null"
},
"..."
] |
| GET | /api/v1/projects/{id}/translations/{language}/{area} | 🌐 NEW: Optimal translation fetching API with intelligent caching. Designed for AI/frontend consumption. Returns approved translations for specific language/area with cache key support. Use cache_key parameter for HTTP 304 responses. Include log_read=true&client_id=xxx for usage tracking. All timestamps are returned in Norwegian time (Europe/Oslo timezone). | No authentication required | {
"language": "string",
"area": "string",
"cache_key (query, opt)": "string",
"force_refresh (query, opt)": "boolean",
"log_read (query, opt)": "boolean",
"client_id (query, opt)": "string"
} | {
"success": "true",
"project": "object",
"language": "string",
"area": "string",
"translations": "array",
"statistics": "object",
"cache_info": "object"
} |
| PUT | /api/v1/projects/{id}/strings/{key} | Update the base text (English source text) of a single string. The {key} parameter should be the string key (e.g., 'login_welcome'), not the full area.section.key path. | Bearer token (admin) | {
"base_text": "string"
} | {
"success": "true",
"message": "string",
"string": {
"id": "int",
"key": "string",
"base_text": "string",
"updated_at": "timestamp"
}
} |
| POST | /api/v1/projects/{id}/strings:update | Bulk update the base text (English source text) of multiple strings. The 'key' in each update should be the string key (e.g., 'login_welcome'), not the full area.section.key path. | Bearer token (admin) | {
"updates": [
{
"key": "string",
"base_text": "string"
},
"..."
]
} | {
"success": "true",
"updated": "int",
"errors": [
"string"
],
"results": [
{
"key": "string",
"success": "true",
"old_base_text": "string",
"new_base_text": "string"
},
"..."
]
} |
| DELETE | /api/v1/projects/{id}/strings/{stringId} | 🗑️ NEW: Permanently delete a string and all its translations. This action cannot be undone. Requires project admin access. | Bearer token (project admin) | [] | {
"success": "true",
"message": "string",
"data": {
"deleted_string": {
"id": "int",
"key": "string",
"base_text": "string",
"area": "string",
"section": "string"
},
"translations_deleted": "int",
"deleted_by": "string",
"deleted_at": "timestamp"
}
} |
| GET | /api/v1/customers | List customers. | Bearer (admin) | [] | [
{
"id": "int",
"name": "string",
"created_at": "timestamp"
},
"..."
] |
| GET | /api/v1/customers/{id} | Get a customer. | Bearer (admin) | [] | {
"id": "int",
"name": "string",
"created_at": "timestamp"
} |
| PUT | /api/v1/customers/{id} | Rename a customer. | Bearer (admin) | {
"name": "string"
} | {
"ok": "true",
"id": "int",
"name": "string"
} |
| DELETE | /api/v1/customers/{id} | Delete a customer. | Bearer (admin) | [] | [] |
| GET | /api/v1/customers/{id}/members | List members of a customer. | Bearer (admin) | [] | [
{
"id": "int",
"role": "string",
"user_id": "int",
"username": "string",
"email": "string",
"name": "string"
},
"..."
] |
| POST | /api/v1/customers/{id}/members | Add/update a customer member role. | Bearer (admin) | {
"user_id": "int",
"role": "admin|editor|reviewer|viewer"
} | {
"ok": "true"
} |
| DELETE | /api/v1/customers/{id}/members/{userId} | Remove a member from a customer. | Bearer (admin) | [] | [] |
| GET | /api/v1/users | List users (optionally filter by customer_id). | Bearer (admin) | {
"customer_id (query, optional)": "int"
} | [
{
"id": "int",
"email": "string",
"username": "string",
"name": "string",
"is_active": "int",
"created_at": "timestamp"
},
"..."
] |
| GET | /api/v1/users/{id} | Get a single user. | Bearer (admin) | [] | {
"id": "int",
"email": "string",
"username": "string",
"name": "string",
"is_active": "int",
"created_at": "timestamp"
} |
| POST | /api/v1/users | Create a user. | Bearer (admin) | {
"username": "string",
"email": "string",
"name": "string",
"password": "string"
} | {
"id": "int",
"username": "string",
"email": "string",
"name": "string",
"is_active": "int"
} |
| PUT | /api/v1/users/{id} | Update user profile fields. | Bearer (admin) | {
"email (opt)": "string",
"username (opt)": "string",
"name (opt)": "string",
"is_active (opt)": "0|1"
} | {
"ok": "true",
"id": "int"
} |
| DELETE | /api/v1/users/{id} | Delete a user. | Bearer (admin) | [] | [] |
| PUT | /api/v1/users/{id}/password | Change password (self or admin). | Bearer | {
"old_password (optional)": "string",
"new_password": "string"
} | {
"ok": "true",
"message": "Password updated"
} |
| GET | /api/v1/projects | List projects the user has access to (optionally filter by customer_id). | Bearer token (any authenticated user) | {
"customer_id (query, optional)": "int"
} | [
{
"id": "int",
"customer_id": "int",
"name": "string",
"default_lang": "string",
"created_at": "timestamp"
},
"..."
] |
| GET | /api/v1/projects/{id} | Get project details. Now includes translation read statistics and download status for monitoring AI/frontend usage. All timestamps are returned in Norwegian time (Europe/Oslo timezone). | Bearer token (project access) | [] | {
"id": "int",
"customer_id": "int",
"name": "string",
"default_lang": "string",
"created_at": "timestamp",
"translation_reads": "object"
} |
| POST | /api/v1/projects | 🚀 Create a project with default areas and sections. Any authenticated user can create projects and will automatically be assigned as admin. Creates default areas (admin, public, member) with common sections. | Bearer token (any authenticated user) | {
"customer_id": "int",
"name": "string",
"default_lang (opt)": "string"
} | {
"id": "int",
"name": "string",
"default_lang": "string"
} |
| PUT | /api/v1/projects/{id} | Update a project (requires project admin access). | Bearer token (project admin) | {
"name (opt)": "string",
"default_lang (opt)": "string"
} | {
"ok": "true",
"id": "int",
"name": "string|null",
"default_lang": "string|null"
} |
| DELETE | /api/v1/projects/{id} | Delete a project (requires project admin access). | Bearer token (project admin) | [] | [] |
| GET | /api/v1/projects/{id}/members | List project members (requires project admin access). | Bearer token (project admin) | [] | [
{
"id": "int",
"role": "string",
"user_id": "int",
"username": "string",
"email": "string",
"name": "string"
},
"..."
] |
| POST | /api/v1/projects/{id}/members | Add or update a project member role (requires project admin access). | Bearer token (project admin) | {
"user_id": "int",
"role": "admin|editor|reviewer|viewer"
} | {
"ok": "true"
} |
| DELETE | /api/v1/projects/{id}/members/{userId} | Remove a project member (requires project admin access). | Bearer token (project admin) | [] | [] |
| GET | /api/profile | Get current user profile information. | Bearer token | [] | {
"id": "int",
"email": "string",
"name": "string",
"created_at": "timestamp"
} |
| PUT | /api/profile | Update current user profile (name, email). | Bearer token | {
"name (opt)": "string",
"email (opt)": "string"
} | {
"ok": "true",
"user": "object"
} |
| PUT | /api/password | Change current user password. | Bearer token | {
"old_password": "string",
"new_password": "string"
} | {
"ok": "true",
"message": "Password updated"
} |
| GET | /api/v1/stats/overview | Get overview statistics across all user-accessible projects. | Bearer token | [] | {
"totalProjects": "int",
"totalStrings": "int",
"totalTranslations": "int",
"projects": [
{
"id": "int",
"name": "string",
"strings": "int",
"translations": "int"
},
"..."
]
} |
| GET | /api/v1/projects/{id}/stats | Get comprehensive project statistics including translation progress by language and area. | Bearer token (project access) | [] | {
"totalStrings": "int",
"lastModified": "datetime",
"languages": [
{
"code": "string",
"name": "string",
"progress": "int",
"lastModified": "datetime"
},
"..."
],
"areas": [
{
"name": "string",
"lastModified": "datetime",
"sections": [
{
"name": "string",
"lastModified": "datetime",
"languages": [
{
"code": "string",
"progress": "int",
"translatedStrings": "int",
"lastModified": "datetime"
},
"..."
]
}
]
}
]
} |
| GET | /api/v1/settings | List all system settings (with optional category filter). | Bearer token (admin) | {
"category (query, opt)": "string",
"include_sensitive (query, opt)": "0|1"
} | [
{
"id": "int",
"setting_key": "string",
"setting_value": "string",
"setting_type": "string",
"category": "string",
"description": "string",
"is_sensitive": "int",
"created_at": "timestamp",
"updated_at": "timestamp"
},
"..."
] |
| GET | /api/v1/settings/categories | List all setting categories. | Bearer token (admin) | [] | [
"string",
"..."
] |
| GET | /api/v1/settings/{key} | Get a specific setting by key. | Bearer token (admin) | [] | {
"id": "int",
"setting_key": "string",
"setting_value": "string",
"setting_type": "string",
"category": "string",
"description": "string",
"is_sensitive": "int",
"created_at": "timestamp",
"updated_at": "timestamp"
} |
| POST | /api/v1/settings | Create a new system setting. | Bearer token (admin) | {
"key": "string",
"value": "string",
"type (opt)": "string|int|bool|json",
"category (opt)": "string",
"description (opt)": "string",
"is_sensitive (opt)": "0|1"
} | {
"id": "int",
"key": "string",
"value": "string",
"type": "string",
"category": "string",
"description": "string",
"is_sensitive": "int"
} |
| PUT | /api/v1/settings/{key} | Update an existing system setting. | Bearer token (admin) | {
"value (opt)": "string",
"type (opt)": "string|int|bool|json",
"category (opt)": "string",
"description (opt)": "string",
"is_sensitive (opt)": "0|1"
} | {
"ok": "true",
"key": "string"
} |
| DELETE | /api/v1/settings/{key} | Delete a system setting. | Bearer token (admin) | [] | [] |
| POST | /api/v1/backup | Create a full database backup. | Bearer token (any authenticated user) | [] | {
"success": "bool",
"message": "string",
"backup": "object"
} |
| GET | /api/v1/backup | List available backup files with timestamp, size, and path. All timestamps are in Norwegian time (Europe/Oslo timezone). | Bearer token (any authenticated user) | [] | {
"backups": [
{
"filename": "string",
"filepath": "string",
"filesize": "int",
"filesize_formatted": "string",
"created_at": "datetime (Norwegian time)",
"modified_at": "datetime (Norwegian time)"
},
"..."
],
"total": "int",
"backup_directory": "string"
} |
| POST | /api/v1/backup/restore | Restore database from backup file. | Bearer token (superadmin) | {
"filename": "string"
} | {
"success": "bool",
"message": "string",
"restore": "object"
} |
| DELETE | /api/v1/backup/{filename} | Delete a backup file. | Bearer token (superadmin) | [] | {
"success": "bool",
"message": "string",
"deleted": "object"
} |
| GET | /api/v1/backup/status | Get backup system status and statistics. | Bearer token (any authenticated user) | [] | {
"system_status": "object",
"backup_stats": "object"
} |
| POST | /api/v1/backup/cleanup | Manually trigger cleanup of old backup files. | Bearer token (admin) | [] | {
"success": "bool",
"message": "string",
"cleanup_stats": "object"
} |
| POST | /api/v1/projects/{id}/backup | Create a project-specific backup containing all areas, sections, strings, and translations for the project. | Bearer token (project admin) | [] | {
"success": "bool",
"message": "string",
"backup": "object"
} |
| GET | /api/v1/projects/{id}/audit | Get project audit log with filtering and pagination. Tracks all project actions including backups, string changes, user management, etc. | Bearer token (project read access) | [] | {
"logs": "array",
"pagination": "object",
"filters": "object",
"summary": "object"
} |
| GET | /api/v1/projects/{id}/audit/stats | Get comprehensive audit log statistics including action breakdown, user activity, and recent trends. | Bearer token (project read access) | [] | {
"overall_stats": "object",
"action_breakdown": "array",
"entity_breakdown": "array",
"recent_activity": "array",
"top_users": "array"
} |
| GET | /api/v1/projects/{id}/audit/filters | Get available filter options for audit log (actions, entities, users). | Bearer token (project read access) | [] | {
"available_actions": "array",
"available_entities": "array",
"available_users": "array"
} |
| GET | /api/v1/customers/{id}/audit | Get customer audit log with filtering and pagination. Users can see all logs for their customer with optional project filtering. | Bearer token (customer member) | {
"project_id (query, opt)": "int",
"action (query, opt)": "string",
"entity (query, opt)": "string",
"user_id (query, opt)": "int",
"date_from (query, opt)": "string",
"date_to (query, opt)": "string"
} | {
"logs": "array",
"pagination": "object",
"filters": "object",
"summary": "object"
} |
| GET | /api/v1/customers/{id}/audit/stats | Get comprehensive customer audit log statistics including project breakdown, user activity, and recent trends. | Bearer token (customer member) | [] | {
"overall_stats": "object",
"action_breakdown": "array",
"entity_breakdown": "array",
"recent_activity": "array",
"top_users": "array",
"project_breakdown": "array"
} |
| GET | /api/v1/customers/{id}/audit/filters | Get available filter options for customer audit log (actions, entities, users, projects). | Bearer token (customer member) | [] | {
"available_actions": "array",
"available_entities": "array",
"available_users": "array",
"available_projects": "array"
} |
| GET | /api/v1/projects/{id}/backup | List project backup files with metadata, size, and creation details. All timestamps are in Norwegian time (Europe/Oslo timezone). | Bearer token (project read access) | [] | {
"backups": [
{
"filename": "string",
"filepath": "string",
"filesize": "int",
"filesize_formatted": "string",
"created_at": "datetime (Norwegian time)",
"modified_at": "datetime (Norwegian time)",
"metadata": "object"
},
"..."
],
"total": "int",
"project_id": "int",
"backup_directory": "string"
} |
| POST | /api/v1/projects/{id}/backup/restore | Restore project data from a backup file. This will replace all existing project data. | Bearer token (project admin) | {
"filename": "string"
} | {
"success": "bool",
"message": "string",
"restore_summary": "object"
} |
| DELETE | /api/v1/projects/{id}/backup/{filename} | Delete a project backup file. | Bearer token (project admin) | [] | {
"success": "bool",
"message": "string",
"deleted_file": "string"
} |
| GET | /api/v1/projects/{id}/backup/status | Get project backup system status and statistics. | Bearer token (project read access) | [] | {
"system_status": "object",
"backup_stats": "object"
} |