unpublishBot
Remove a published Typebot chatbot from availability using a JSON-based interface. Specify the bot ID to unpublish, ensuring control over active chatbot deployments.
Instructions
Despublica un Typebot existente
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| botId | Yes |
Implementation Reference
- src/tools/bots.ts:158-168 (handler)The handler function that executes the unpublishBot tool logic by authenticating, validating botId, and posting to the Typebot API unpublish endpoint.export async function unpublishBot(args: UnpublishBotArgs) { ensureAuth(); const { botId } = args; if (!botId) throw new Error('unpublishBot: falta botId'); const response = await axios.post( `https://app.typebot.io/api/v1/typebots/${botId}/unpublish`, {} ); return response.data; }
- src/tools/bots.ts:154-156 (schema)TypeScript interface defining the input arguments for the unpublishBot function.export interface UnpublishBotArgs { botId: string; }
- src/index.ts:74-78 (registration)Registration of the unpublishBot tool in the MCP server's toolsMap, including function reference, description, and Zod input schema.['unpublishBot', { func: unpublishBot, description: 'Despublica un Typebot existente', schema: z.object({ botId: z.string().min(1, "El campo 'botId' es obligatorio.") }), }],
- src/index.ts:77-77 (schema)Zod schema used for input validation of unpublishBot tool in the MCP registration.schema: z.object({ botId: z.string().min(1, "El campo 'botId' es obligatorio.") }),