Sub-APIs (v1) → escape hatches del transporte (v2)
En v1 el bot exponía 5 sub-APIs tipadas de WhatsApp: bot.groups,
bot.profile, bot.privacy, bot.chats, bot.presence. En v2 fueron
eliminadas del core: @botmesh/core es agnóstico de transporte, y la
gestión de grupos/privacidad/perfil es específica de WhatsApp — no existe
con la misma forma en Telegram o Discord.
Para todo lo demás — crear grupos, links de invitación, ajustes de
privacidad, archivar/fijar/silenciar chats — accede al socket crudo desde
el provider de Baileys. provider.socket lo devuelve tipado como unknown
(los tipos de Baileys no forman parte de la API de @botmesh/baileys);
socketOf(provider) de @botmesh/baileys/internal lo devuelve tipado como
el socket de la versión de Baileys instalada (sin garantía semver). Importar
/internal arrastra los .d.ts de Baileys, que no compilan con
skipLibCheck: false: mantén "skipLibCheck": true en un proyecto que lo
use (la entrada principal no lo necesita):
import { Bot } from '@botmesh/core'import { BaileysProvider } from '@botmesh/baileys'import { socketOf } from '@botmesh/baileys/internal'const provider = new BaileysProvider({ session: 'mi-bot' })const bot = new Bot({ provider })bot.on('ready', async () => { const sock = socketOf(provider) // el socket crudo de Baileys 7, tipado if (!sock) return // Equivalente de bot.groups.create(...) de v1: const group = await sock.groupCreate('Mi grupo', ['573001234567@s.whatsapp.net']) // bot.profile.setName(...) de v1: await sock.updateProfileName('Mi Bot') // bot.privacy.setLastSeen(...) de v1: await sock.updateLastSeenPrivacy('all') // bot.groups.inviteLink(...) de v1: const code = await sock.groupInviteCode(group.id)})await bot.start()
El código específico de transporte se queda específicoTodo lo que escribas contra provider.socket solo funciona con
@botmesh/baileys (y solo contra una conexión real de WhatsApp — no con el
MockProvider que usa createTestBot()). Protégelo detrás de
provider.id === 'baileys' si tu código puede correr en otros transportes.
Ver la documentación de Baileys
para la API completa del socket (groupCreate, groupMetadata,
groupParticipantsUpdate, updateProfilePicture, chatModify, …).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"botmesh","description":"A transport-agnostic TypeScript framework for messaging bots: WhatsApp (Baileys or the Cloud API), Telegram, Discord and more behind one IProvider.","colors":{"primary":"#3451B2","light":"#A8B1FF","dark":"#3451B2"},"logo":{"light":"https://mintcdn.com/afaya/32LyKbpS8BIF3Yl-/logo/light.svg?fit=max\u0026auto=format\u0026n=32LyKbpS8BIF3Yl-\u0026q=85\u0026s=5a9c4db10ba52bbd645a009cc009e31e","dark":"https://mintcdn.com/afaya/32LyKbpS8BIF3Yl-/logo/dark.svg?fit=max\u0026auto=format\u0026n=32LyKbpS8BIF3Yl-\u0026q=85\u0026s=be155346190b752c815b6d06f1134702"},"favicon":"https://mintcdn.com/afaya/32LyKbpS8BIF3Yl-/favicon.svg?fit=max\u0026auto=format\u0026n=32LyKbpS8BIF3Yl-\u0026q=85\u0026s=abe4b13c733adb336381bebc0220d3e5","navbar":{"links":[{"href":"https://www.npmjs.com/package/@botmesh/core","label":"npm"}],"primary":{"type":"github","href":"https://github.com/andresayac/botmesh"}},"footer":{"socials":{"github":"https://github.com/andresayac/botmesh"},"links":[{"header":"Project","items":[{"label":"GitHub","href":"https://github.com/andresayac/botmesh"},{"label":"npm","href":"https://www.npmjs.com/package/@botmesh/core"},{"label":"MIT License","href":"https://github.com/andresayac/botmesh/blob/main/LICENSE"},{"label":"Changelog","href":"https://github.com/andresayac/botmesh/blob/main/CHANGELOG.md"}]}]},"search":{"prompt":"Search the botmesh docs…"},"seo":{"indexing":"navigable"},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"es","footer":{"socials":{"github":"https://github.com/andresayac/botmesh"},"links":[{"header":"Proyecto","items":[{"label":"GitHub","href":"https://github.com/andresayac/botmesh"},{"label":"npm","href":"https://www.npmjs.com/package/@botmesh/core"},{"label":"Licencia MIT","href":"https://github.com/andresayac/botmesh/blob/main/LICENSE"},{"label":"Changelog","href":"https://github.com/andresayac/botmesh/blob/main/CHANGELOG.md"}]}]},"href":"es"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"afaya","hasAudioNarration":false,"actualSubdomain":"afaya","customDomains":["botmesh.afaya.com.co"],"gitSource":{"type":"github","owner":"andresayac","repo":"botmesh-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6ae0b3e80b849c49dba39507"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae0b3f8dc8e261a8bb682ee","collectionId":"af19fec4-32c9-4ad1-b8a5-5db01ce875d1","liveDeploymentHistoryId":"6ae0b3f8dc8e261a8bb682ee","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae0b3fe0b849c49dba39747","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"en","tag":"API reference","count":541},{"language":"en","tag":"@botmesh/core","count":373},{"language":"en","tag":"@botmesh/core/testing","count":93},{"language":"en","tag":"@botmesh/core/spi","count":75},{"language":"en","tag":"Guide","count":53},{"language":"es","tag":"Guía","count":53},{"language":"en","tag":"Golden transcripts","count":41},{"language":"en","tag":"Durability","count":35},{"language":"en","tag":"Flows","count":34},{"language":"en","tag":"Messages \u0026 context","count":32},{"language":"en","tag":"Forms","count":30},{"language":"es","tag":"Ejemplos","count":29},{"language":"es","tag":"Características","count":25},{"language":"es","tag":"Avanzado","count":19},{"language":"es","tag":"Intermedio","count":9},{"language":"es","tag":"Principiante","count":8},{"language":"es","tag":"Desarrollo y tests","count":8},{"language":"es","tag":"IA","count":6},{"language":"es","tag":"Primeros pasos","count":6},{"language":"es","tag":"Resumen","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"es/guide/sub-apis","slug":"/es/guide/sub-apis","pageMetadata":{"title":"Sub-APIs (v1) → escape hatches del transporte (v2)","sidebarTitle":"Sub-APIs","description":null,"href":"/es/guide/sub-apis"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`En v1 el bot exponía 5 sub-APIs tipadas de WhatsApp: `,_jsx(_components.code,{children:`bot.groups`}),`,\n`,_jsx(_components.code,{children:`bot.profile`}),`, `,_jsx(_components.code,{children:`bot.privacy`}),`, `,_jsx(_components.code,{children:`bot.chats`}),`, `,_jsx(_components.code,{children:`bot.presence`}),`. `,_jsx(_components.strong,{children:`En v2 fueron\neliminadas del core`}),`: `,_jsx(_components.code,{children:`@botmesh/core`}),` es agnóstico de transporte, y la\ngestión de grupos/privacidad/perfil es específica de WhatsApp — no existe\ncon la misma forma en Telegram o Discord.`]}),`\n`,_jsx(Heading,{level:`2`,id:`qué-las-reemplaza`,children:`Qué las reemplaza`}),`\n`,_jsx(_components.p,{children:`Dos capas, según lo que necesites:`}),`\n`,_jsx(Heading,{level:`3`,id:`1-capacidades-normalizadas-en-todos-los-providers`,children:`1. Capacidades normalizadas en todos los providers`}),`\n`,_jsx(_components.p,{children:`Las operaciones comunes sobrevivieron en el contrato compartido — detecta\nla capacidad, nunca asumas:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ctx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`markRead`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// provider.markRead(refs)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ctx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`typing`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// provider.typing(chatId, state)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ctx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`delete`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// provider.deleteMessage(ref)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'group'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// cambios de participantes (add/remove/promote/demote)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'presence'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// actualizaciones de presencia de contactos`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'status'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// recibos de entrega/lectura`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Cada provider publica `,_jsx(_components.code,{children:`provider.capabilities`}),` (`,_jsx(_components.code,{children:`groups`}),`, `,_jsx(_components.code,{children:`presence`}),`,\n`,_jsx(_components.code,{children:`edit`}),`, `,_jsx(_components.code,{children:`typing`}),`, …) para que puedas ramificar según lo que el\ntransporte soporta.`]}),`\n`,_jsx(Heading,{level:`3`,id:`2-el-socket-nativo-del-transporte-solo-baileys`,children:`2. El socket nativo del transporte (solo Baileys)`}),`\n`,_jsxs(_components.p,{children:[`Para todo lo demás — crear grupos, links de invitación, ajustes de\nprivacidad, archivar/fijar/silenciar chats — accede al socket crudo desde\nel provider de Baileys. `,_jsx(_components.code,{children:`provider.socket`}),` lo devuelve tipado como `,_jsx(_components.code,{children:`unknown`}),`\n(los tipos de Baileys no forman parte de la API de `,_jsx(_components.code,{children:`@botmesh/baileys`}),`);\n`,_jsx(_components.code,{children:`socketOf(provider)`}),` de `,_jsx(_components.code,{children:`@botmesh/baileys/internal`}),` lo devuelve tipado como\nel socket de la versión de Baileys instalada (sin garantía semver). Importar\n`,_jsx(_components.code,{children:`/internal`}),` arrastra los `,_jsx(_components.code,{children:`.d.ts`}),` de Baileys, que no compilan con\n`,_jsx(_components.code,{children:`skipLibCheck: false`}),`: mantén `,_jsx(_components.code,{children:`\"skipLibCheck\": true`}),` en un proyecto que lo\nuse (la entrada principal no lo necesita):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@botmesh/core'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BaileysProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@botmesh/baileys'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`socketOf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@botmesh/baileys/internal'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` provider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` BaileysProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'mi-bot'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` bot`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Bot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ready'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sock`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` socketOf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// el socket crudo de Baileys 7, tipado`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Equivalente de bot.groups.create(...) de v1:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` group`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`groupCreate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Mi grupo'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'573001234567@s.whatsapp.net'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // bot.profile.setName(...) de v1:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateProfileName`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Mi Bot'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // bot.privacy.setLastSeen(...) de v1:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateLastSeenPrivacy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'all'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // bot.groups.inviteLink(...) de v1:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`groupInviteCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`group`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`start`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`El código específico de transporte se queda específico`})}),_jsxs(_components.p,{children:[`Todo lo que escribas contra `,_jsx(_components.code,{children:`provider.socket`}),` solo funciona con\n`,_jsx(_components.code,{children:`@botmesh/baileys`}),` (y solo contra una conexión real de WhatsApp — no con el\n`,_jsx(_components.code,{children:`MockProvider`}),` que usa `,_jsx(_components.code,{children:`createTestBot()`}),`). Protégelo detrás de\n`,_jsx(_components.code,{children:`provider.id === 'baileys'`}),` si tu código puede correr en otros transportes.`]})]}),`\n`,_jsxs(_components.p,{children:[`Ver la `,_jsx(_components.a,{href:`https://github.com/WhiskeySockets/Baileys`,children:`documentación de Baileys`}),`\npara la API completa del socket (`,_jsx(_components.code,{children:`groupCreate`}),`, `,_jsx(_components.code,{children:`groupMetadata`}),`,\n`,_jsx(_components.code,{children:`groupParticipantsUpdate`}),`, `,_jsx(_components.code,{children:`updateProfilePicture`}),`, `,_jsx(_components.code,{children:`chatModify`}),`, …).`]}),`\n`,_jsx(Heading,{level:`2`,id:`siguientes-pasos`,children:`Siguientes pasos`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/es/guide/deploy`,children:`Despliegue`}),` — configuración de producción`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api/core`,children:`Referencia de API`}),` — documentación técnica completa`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Sub-APIs (v1) → escape hatches del transporte (v2)","sidebarTitle":"Sub-APIs","description":null,"href":"/es/guide/sub-apis"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Qué las reemplaza","slug":"qué-las-reemplaza","depth":2,"children":[{"title":"1. Capacidades normalizadas en todos los providers","slug":"1-capacidades-normalizadas-en-todos-los-providers","depth":3,"children":[]},{"title":"2. El socket nativo del transporte (solo Baileys)","slug":"2-el-socket-nativo-del-transporte-solo-baileys","depth":3,"children":[]}]},{"title":"Siguientes pasos","slug":"siguientes-pasos","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"afaya","siteName":"botmesh","title":"Sub-APIs (v1) → escape hatches del transporte (v2) - botmesh","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/guide/sub-apis","matchLevel":1},"es":{"href":"/es/guide/sub-apis","matchLevel":0}}},"lastModified":"2026-10-27T14:26:08.373Z","originalFileLocation":"es/guide/sub-apis.mdx","locale":"es"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"botmesh\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Sub-APIs (v1) → escape hatches del transporte (v2) - botmesh\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"botmesh\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://botmesh.afaya.com.co/es/guide/sub-apis\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://afaya.mintlify.app/_mintlify/api/og/v2?division=Avanzado\u0026amp;title=Sub-APIs+%28v1%29+%E2%86%92+escape+hatches+del+transporte+%28v2%29\u0026amp;theme=dea9f3ba838ba9e4866bef64\u0026amp;signature=47d849bc6dcbc5623fc9f7de924fa25c8f5b5c841896fd9c3f5ae13a139d6e0e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Sub-APIs (v1) → escape hatches del transporte (v2) - botmesh\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://afaya.mintlify.app/_mintlify/api/og/v2?division=Avanzado\u0026amp;title=Sub-APIs+%28v1%29+%E2%86%92+escape+hatches+del+transporte+%28v2%29\u0026amp;theme=dea9f3ba838ba9e4866bef64\u0026amp;signature=47d849bc6dcbc5623fc9f7de924fa25c8f5b5c841896fd9c3f5ae13a139d6e0e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/afaya/omilwj1Ifh1eDwt5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"botmesh\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3451B2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://botmesh.afaya.com.co/es/guide/sub-apis\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/es/guide/sub-apis.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://botmesh.afaya.com.co/es/guide/sub-apis\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://botmesh.afaya.com.co/guide/sub-apis\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://botmesh.afaya.com.co/guide/sub-apis\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://botmesh.afaya.com.co/#organization\",\"name\":\"botmesh\",\"url\":\"https://botmesh.afaya.com.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/afaya/32LyKbpS8BIF3Yl-/logo/light.svg?fit=max\u0026auto=format\u0026n=32LyKbpS8BIF3Yl-\u0026q=85\u0026s=5a9c4db10ba52bbd645a009cc009e31e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://botmesh.afaya.com.co#website\",\"name\":\"botmesh\",\"url\":\"https://botmesh.afaya.com.co\",\"publisher\":{\"@id\":\"https://botmesh.afaya.com.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://botmesh.afaya.com.co/es/guide/sub-apis#webpage\",\"url\":\"https://botmesh.afaya.com.co/es/guide/sub-apis\",\"name\":\"Sub-APIs (v1) → escape hatches del transporte (v2)\",\"dateModified\":\"2026-10-27T14:26:08.373Z\",\"isPartOf\":{\"@id\":\"https://botmesh.afaya.com.co#website\"},\"breadcrumb\":{\"@id\":\"https://botmesh.afaya.com.co/es/guide/sub-apis#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://botmesh.afaya.com.co/es/guide/sub-apis#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"botmesh\",\"item\":\"https://botmesh.afaya.com.co\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sub-APIs (v1) → escape hatches del transporte (v2)\",\"item\":\"https://botmesh.afaya.com.co/es/guide/sub-apis\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://botmesh.afaya.com.co/es/guide/sub-apis#article\",\"headline\":\"Sub-APIs (v1) → escape hatches del transporte (v2)\",\"name\":\"Sub-APIs (v1) → escape hatches del transporte (v2)\",\"url\":\"https://botmesh.afaya.com.co/es/guide/sub-apis\",\"mainEntityOfPage\":{\"@id\":\"https://botmesh.afaya.com.co/es/guide/sub-apis#webpage\"},\"dateModified\":\"2026-10-27T14:26:08.373Z\",\"publisher\":{\"@id\":\"https://botmesh.afaya.com.co/#organization\"},\"isPartOf\":{\"@id\":\"https://botmesh.afaya.com.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"botmesh\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"botmesh","nav":{"global":null,"languages":[{"language":"en","default":true,"pages":[{"title":"en","href":"/guide/sub-apis"}]},{"language":"es","footer":{"socials":{"github":"https://github.com/andresayac/botmesh"},"links":[{"header":"Proyecto","items":[{"label":"GitHub","href":"https://github.com/andresayac/botmesh"},{"label":"npm","href":"https://www.npmjs.com/package/@botmesh/core"},{"label":"Licencia MIT","href":"https://github.com/andresayac/botmesh/blob/main/LICENSE"},{"label":"Changelog","href":"https://github.com/andresayac/botmesh/blob/main/CHANGELOG.md"}]}]},"tabs":[{"tab":"Guía","icon":"book-open","groups":[{"group":"Primeros pasos","pages":[{"title":"botmesh","sidebarTitle":"Inicio","mode":"wide","href":"/es"},{"title":"Inicio rápido","href":"/es/guide/getting-started"},{"title":"Tu primer bot","href":"/es/guide/first-bot"},{"title":"Conceptos básicos","href":"/es/guide/concepts"},{"title":"Referencia de configuración","href":"/es/guide/configuration"},{"title":"Canales (providers)","sidebarTitle":"Canales","href":"/es/guide/channels"}]},{"group":"Características","pages":[{"title":"Mensajes y media","href":"/es/guide/messages"},{"title":"Flujos conversacionales","href":"/es/guide/flows"},{"title":"Triggers especiales: WELCOME, tipos de mensaje y CALL","sidebarTitle":"Triggers especiales","href":"/es/guide/triggers"},{"title":"Formularios (WhatsApp Flows)","href":"/es/guide/forms"},{"title":"Datos persistentes por usuario (`ctx.user`)","sidebarTitle":"Datos por usuario","href":"/es/guide/user-data"},{"title":"Internacionalización (i18n)","href":"/es/guide/i18n"},{"title":"Handoff humano y listas de acceso","sidebarTitle":"Handoff y listas de acceso","href":"/es/guide/handoff"},{"title":"Hooks (middleware)","href":"/es/guide/hooks"},{"title":"Plugins","href":"/es/guide/plugins"},{"title":"Plugin de IA","href":"/es/guide/ai"},{"title":"Herramientas de IA (tool calling)","sidebarTitle":"Herramientas de IA","href":"/es/guide/ai-tools"},{"title":"Memoria y RAG","href":"/es/guide/ai-memory-rag"},{"title":"Respuestas en streaming (`ctx.stream`)","sidebarTitle":"Respuestas en streaming","href":"/es/guide/streaming"},{"title":"Voz (`@botmesh/voice`)","sidebarTitle":"Voz (STT/TTS)","href":"/es/guide/voice"},{"title":"Integraciones","href":"/es/guide/integrations"},{"title":"Inyección de dependencias","href":"/es/guide/di"},{"title":"Scheduler","href":"/es/guide/scheduler"},{"title":"Rate Limiting (Anti-Ban)","sidebarTitle":"Rate limiting (anti-ban)","href":"/es/guide/rate-limiting"},{"title":"Store persistente","href":"/es/guide/store"},{"title":"Control plane","href":"/es/guide/control-plane"},{"title":"Servidor de webhooks (`@botmesh/server`)","sidebarTitle":"Servidor de webhooks","href":"/es/guide/server"},{"title":"Ventana de 24 h y costos (Cloud API)","sidebarTitle":"Ventana de 24 h de WhatsApp","href":"/es/guide/session-window"},{"title":"Operación: métricas, eventos, inbox y entregas","sidebarTitle":"Operación","href":"/es/guide/operations"},{"title":"Trazas (OpenTelemetry)","href":"/es/guide/tracing"},{"title":"Procesamiento durable de mensajes","sidebarTitle":"Procesamiento durable","href":"/es/guide/durability"}]},{"group":"Desarrollo y tests","pages":[{"title":"Simulador en la terminal (`botmesh dev`)","sidebarTitle":"Simulador en la terminal","href":"/es/guide/dev-simulator"},{"title":"Sandbox de plataformas","href":"/es/guide/sandbox"},{"title":"Testing","href":"/es/guide/testing"},{"title":"Inspeccionar y validar flujos","href":"/es/guide/flow-tools"},{"title":"Esquema JSON de flujos","href":"/es/guide/flow-schema"},{"title":"Servidor MCP","href":"/es/guide/mcp"},{"title":"Transcripciones doradas","href":"/es/guide/golden-transcripts"},{"title":"Plugin de ESLint","description":null,"href":"/es/guide/eslint"}]},{"group":"Avanzado","pages":[{"title":"Sub-APIs (v1) → escape hatches del transporte (v2)","sidebarTitle":"Sub-APIs","href":"/es/guide/sub-apis"},{"title":"Pasar a producción","description":"Una lista de comprobación para llevar un bot de \"funciona en mi máquina\" a un despliegue que puedas dejar corriendo. Cada punto enlaza a la página con los detalles. Empieza por Todo bot; las secciones siguientes solo aplican cuando las necesitas.","href":"/es/guide/production"},{"title":"Despliegue","href":"/es/guide/deploy"},{"title":"Varias réplicas","href":"/es/guide/replicas"},{"title":"Arquitectura","href":"/es/guide/architecture"},{"title":"Redis Cluster","href":"/es/guide/redis-cluster"},{"title":"Seguridad","href":"/es/guide/security"},{"title":"Modelo de amenazas","href":"/es/guide/threat-model"},{"title":"Actualizar a estable: checklist y cambios de API","sidebarTitle":"Actualizar a estable: checklist y API","href":"/es/guide/stable-migration"},{"title":"Actualizar a estable: dependencias","href":"/es/guide/migration"},{"title":"Actualizar a estable: cambios de comportamiento","sidebarTitle":"Actualizar a estable: comportamiento","href":"/es/guide/migration-2"},{"title":"Notas de actualización: canales y plugins","href":"/es/guide/upgrade-channels-plugins"},{"title":"Solución de problemas","href":"/es/guide/troubleshooting"},{"title":"Preguntas frecuentes","href":"/es/guide/faq"}]}]},{"tab":"Ejemplos","icon":"chef-hat","pages":[{"title":"Ejemplos","href":"/es/examples"}]},{"tab":"Referencia de la API","icon":"code","href":"/api/core"}]}]},"title":"Sub-APIs (v1) → escape hatches del transporte (v2) - botmesh","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":[],"chunks":[]}