Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sdurutr436/stay-sidekick/llms.txt

Use this file to discover all available pages before exploring further.

The Communications Vault is a per-company library of pre-written message templates, organized by category and language, designed to standardize guest communications and reduce the time your team spends composing messages from scratch. Every module in Stay Sidekick that involves sending a message to a guest — such as Late Check-in Notifications — draws its templates from the Vault. This means your team writes a message once, refines it over time, and reuses it consistently across the whole operation.

Template structure

Each template stored in the plantillas_vault table has the following fields:
FieldDescription
idUUID, auto-generated
nombreShort descriptive title for the template (up to 200 characters)
contenidoFull message body. Supports dynamic placeholders: {NOMBRE}, {APARTAMENTO}, {HORA_LLEGADA}, {IDIOMA}, {PROTOCOLO_CHECKIN}
idiomaLanguage code. Accepted values: es, en, fr, de, it, pt
categoriaSemantic category in uppercase (see table below). Optional.
activaBoolean. false for soft-deleted templates (history is preserved)
created_at / updated_atUTC timestamps, managed automatically
Available categories:
CategoryPurpose
BIENVENIDAWelcome messages sent on or before arrival
INSTRUCCIONESCheck-in instructions, access codes, house rules
RECORDATORIOPre-arrival or pre-departure reminders
CHECKIN_TARDIOLate arrival notifications (used by the Late Check-ins module)
CHECKOUTCheck-out instructions and farewell messages
INCIDENCIAIncident or issue communications
GENERALUncategorized or multi-purpose messages
Soft-delete (activa = false) preserves the full template history. Deleted templates no longer appear in listings but remain in the database and are not removed from the audit trail.

CRUD operations

List all active templates (optionally filter by category and/or language):
curl "http://localhost/api/vault/plantillas?categoria=CHECKIN_TARDIO&idioma=es" \
  -H "Authorization: Bearer $TOKEN"
{
  "ok": true,
  "plantillas": [
    {
      "id": "a1b2c3...",
      "nombre": "Llegada tardía — instrucciones acceso",
      "contenido": "Hola {NOMBRE}, tu apartamento {APARTAMENTO} está listo...",
      "idioma": "es",
      "categoria": "CHECKIN_TARDIO",
      "activa": true
    }
  ]
}
Both categoria and idioma are optional query parameters. Omit them to list all active templates. Create a new template:
curl -X POST http://localhost/api/vault/plantillas \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Bienvenida estándar EN",
    "contenido": "Hello {NOMBRE}, welcome to {APARTAMENTO}! Check-in instructions: {PROTOCOLO_CHECKIN}",
    "idioma": "en",
    "categoria": "BIENVENIDA"
  }'
{
  "ok": true,
  "plantilla": {
    "id": "b2c3d4...",
    "nombre": "Bienvenida estándar EN",
    "contenido": "Hello {NOMBRE}, welcome to {APARTAMENTO}!...",
    "idioma": "en",
    "categoria": "BIENVENIDA",
    "activa": true
  }
}
idioma defaults to es if omitted. categoria is optional. Update a template:
curl -X PUT http://localhost/api/vault/plantillas/<id> \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Bienvenida estándar EN (v2)",
    "contenido": "Hello {NOMBRE}, welcome to {APARTAMENTO}! Your check-in details: {PROTOCOLO_CHECKIN}",
    "idioma": "en",
    "categoria": "BIENVENIDA"
  }'
Both nombre and contenido are required on updates. idioma and categoria are optional. Soft-delete a template:
curl -X DELETE http://localhost/api/vault/plantillas/<id> \
  -H "Authorization: Bearer $TOKEN"
{ "ok": true }
The template is marked activa = false and disappears from all listings. It is not physically removed from the database.

AI assistance

Each template can be improved or translated using the built-in AI assistant. Both actions operate on the message content you provide in the request body — they do not automatically overwrite the stored template. Review the AI-generated result first, then decide whether to save it with a PUT request.
The AI assistant is entirely optional. Templates work fully without it — you can create, edit, and use templates in the Vault without ever calling an AI endpoint.
Improve / rewrite a template: Send the current content, the language it is written in, and an optional tone. The AI returns a refined version of the message.
curl -X POST http://localhost/api/vault/plantillas/<id>/mejoras \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contenido": "Hola, llegas tarde. Las instrucciones son las siguientes.",
    "idioma": "es",
    "tono": "cercano"
  }'
{
  "ok": true,
  "contenido": "¡Hola {NOMBRE}! Nos alegramos de que estés de camino. Como llegas pasadas las {HORA_LLEGADA}, aquí tienes todo lo que necesitas para acceder: {PROTOCOLO_CHECKIN}. ¡Que disfrutes la estancia!"
}
Available tono values: clasico, cercano, entusiasta, minimalista. Omit tono to let the AI choose the most appropriate style. Translate a template to another language:
curl -X POST http://localhost/api/vault/plantillas/<id>/traducciones \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contenido": "Hola {NOMBRE}, bienvenido/a a {APARTAMENTO}.",
    "idioma_destino": "en"
  }'
{
  "ok": true,
  "contenido": "Hello {NOMBRE}, welcome to {APARTAMENTO}."
}
Available idioma_destino values: es, en, fr, de, it, pt. Placeholders like {NOMBRE} and {APARTAMENTO} are preserved as-is by the AI.

AI usage and limits

View daily and weekly usage counters for your company:
curl http://localhost/api/ai/uso \
  -H "Authorization: Bearer $TOKEN"
{
  "ok": true,
  "uso_hoy": 4,
  "limite_diario": 10,
  "uso_semana": 18,
  "limite_semanal": 50
}
View the current AI provider configuration (admin only, API key masked):
curl http://localhost/api/ai/config \
  -H "Authorization: Bearer $TOKEN"
{
  "ok": true,
  "data": {
    "configurado": true,
    "proveedor": "gemini",
    "modelo": "gemini-2.0-flash",
    "api_key_masked": "AIza****...****xQ9z"
  }
}
When configurado is false, the company is using the shared free-tier AI pool. The api_key_masked field is always obscured — the plain-text key is never returned by the API.
Daily and weekly rate limits apply to the shared free-tier AI pool. Once your company reaches its limit, AI requests return 429 Too Many Requests until the counter resets. To bypass these limits entirely, configure your own API key in Perfil → Integraciones → IA (Bring Your Own Key).

AI providers

Stay Sidekick routes all AI requests through LiteLLM, which provides a unified interface to multiple providers. The active provider is set by the AI_DEFAULT_PROVIDER environment variable for the shared system tier, and can be overridden per company via the BYOK (Bring Your Own Key) settings in the profile section.
Providerproveedor valueExample models
Google Geminigeminigemini-2.0-flash
OpenAIopenaigpt-4o, gpt-4o-mini
Anthropic Claudeclaudeclaude-3-5-sonnet
When a company sets its own API key, that key is encrypted with Fernet symmetric encryption before being stored in the database. The system-level AI_DEFAULT_PROVIDER setting has no effect for companies using BYOK.
If you frequently hit rate limits on the free tier, setting your own API key is the recommended path. A Gemini free tier API key from Google AI Studio is typically sufficient for small operations and has no cost for moderate usage.

Build docs developers (and LLMs) love