The Communications Vault is a centralised library of message templates scoped per company. Templates are organised by category (e.g.,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.
BIENVENIDA, CHECKIN_TARDIO, INCIDENCIA) and by language. Two AI-powered endpoints let you improve the wording of existing content or generate translated versions — using either the platform’s shared AI quota or your own API key (BYOK).
All endpoints require
Authorization: Bearer <token>. POST, PUT, and DELETE requests also require the X-CSRF-Token header.GET /api/vault/plantillas
Lists all active templates belonging to the authenticated user’s company. Supports optional filtering by category and language. Auth required: Yes | Role: anyQuery Parameters
Filter by category. One of:
BIENVENIDA, INSTRUCCIONES, RECORDATORIO, CHECKIN_TARDIO, CHECKOUT, INCIDENCIA, GENERAL.Filter by language code. One of:
es, en, fr, de, it, pt.Response
trueArray of template objects.
Example
POST /api/vault/plantillas
Creates a new communication template. HTML and script injection are stripped by the server before persisting. Auth required: Yes | Role: anyRequest
Template display name. 1–200 characters.
Template body text. Must not be empty.
Language code. One of:
es, en, fr, de, it, pt. Defaults to es.Category slug. One of:
BIENVENIDA, INSTRUCCIONES, RECORDATORIO, CHECKIN_TARDIO, CHECKOUT, INCIDENCIA, GENERAL. Pass null for uncategorised.Response
201 Created
trueThe newly created template object.
Example
PUT /api/vault/plantillas/<id>
Replaces the content of an existing template. Bothnombre and contenido are required — this is a full replacement, not a partial patch.
Auth required: Yes | Role: any
Path Parameters
UUID of the template to update.
Request
New display name. 1–200 characters.
New body text. Must not be empty.
Language code. One of:
es, en, fr, de, it, pt.Category slug or
null to remove the category.Response
trueThe updated template object.
Example
DELETE /api/vault/plantillas/<id>
Soft-deletes a template. The record is marked as inactive and no longer appears in list responses, but it is not permanently removed. Auth required: Yes | Role: anyPath Parameters
UUID of the template to deactivate.
Response
200 OK — {"ok": true}
404 Not Found — template not found or belongs to another company.
Example
POST /api/vault/plantillas/<id>/mejoras
Sends the template content to the AI service and returns an improved version. The template is not automatically updated — the caller decides whether to apply the suggestion via a subsequentPUT.
Auth required: Yes | Role: any
The AI service uses either the platform’s shared quota (subject to daily/weekly limits) or the company’s own API key configured in Perfil → IA. If limits are exceeded the endpoint returns
429.Path Parameters
UUID of the template to improve.
Request
The text to improve. Must not be empty. Does not need to match the stored template body — you can pass a draft.
Language of the content. One of:
es, en, fr, de, it, pt.Desired tone for the rewrite. One of:
clasico, cercano, entusiasta, minimalista. Pass null for a neutral improvement.Response
trueThe AI-improved version of the text.
AI Error Responses
| Status | Error | Meaning |
|---|---|---|
429 | LIMIT_DAILY | Daily shared AI quota exhausted. Configure your own API key. |
429 | LIMIT_WEEKLY | Weekly shared AI quota exhausted. |
429 | RATE_LIMIT_SYSTEM | Upstream AI provider is rate-limiting the platform. Retry in a few minutes. |
429 | RATE_LIMIT_BYOK | Your own AI provider rejected the request. Retry in a few minutes. |
504 | timeout | The AI service took too long to respond. |
502 | unexpected | Unexpected error contacting the AI service. |
Example
POST /api/vault/plantillas/<id>/traducciones
Translates the provided template content into the target language using the AI service. The original template is not modified. Auth required: Yes | Role: anyPath Parameters
UUID of the template to translate.
Request
The source text to translate. Must not be empty.
Target language code. One of:
es, en, fr, de, it, pt.Response
trueThe translated text in the target language.
AI Error Responses
| Status | Error | Meaning |
|---|---|---|
429 | LIMIT_DAILY | Daily shared AI quota exhausted. Configure your own API key. |
429 | LIMIT_WEEKLY | Weekly shared AI quota exhausted. |
429 | RATE_LIMIT_SYSTEM | Upstream AI provider is rate-limiting the platform. Retry in a few minutes. |
429 | RATE_LIMIT_BYOK | Your own AI provider rejected the request. Retry in a few minutes. |
504 | timeout | The AI service took too long to respond. |
502 | unexpected | Unexpected error contacting the AI service. |
Example
GET /api/ai/uso
Returns the current AI usage counters for the company — useful for displaying quota consumption in the UI. Auth required: Yes | Role: anyResponse
trueNumber of AI calls made today.
Daily call limit.
null if using BYOK with no limit.Number of AI calls made this week.
Weekly call limit.
null if using BYOK."sistema" (shared quota) or "byok" (own API key).Example
GET /api/ai/config
Returns the AI integration configuration for the company. The API key is masked — only the first 4 and last 4 characters are shown. Auth required: Yes | Role: adminResponse
trueAI configuration summary.
Example
GET /api/admin/system-prompts/<nombre>
Reads a stored AI system prompt by name. Used to inspect the prompt text currently in use for a given AI operation. Auth required: No JWT — IP allowlist only (internal infrastructure endpoint)Role: n/a
Path Parameters
Name identifier of the system prompt (e.g.,
mejorar, traducir).Response
trueName of the system prompt.
Current system prompt text.
404 Not Found — no system prompt exists with the given name.
PUT /api/admin/system-prompts/<nombre>
Creates or replaces an AI system prompt. After saving, the in-memory cache for the affected prompt is invalidated immediately so all subsequent AI calls use the updated text. Auth required: No JWT — IP allowlist only (internal infrastructure endpoint)Role: n/a
Path Parameters
Name identifier of the system prompt to upsert.
Request
New system prompt text. Must not be empty.
Response
200 OK — {"ok": true}
422 Unprocessable Entity — contenido is missing or empty.
