Bot flows
Flujos conversacionales secuenciales con pasos, variables y test-run.
Base path:
/organizations/:orgId/bot/flows·9 endpoints·Source: mosend-wb-backend/src/modules/flows/flows.controller.ts/organizations/:orgId/bot/flows bearer
Lista los flujos del bot de la org (filtrable por número).
Path params
orgIdstringrequerido
Query params
phoneNumberIdstring
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/bot/flows' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
}
],
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/bot/flows/:id bearer
Obtiene el detalle de un flujo del bot.
Path params
orgIdstringrequeridoidstringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/bot/flows/00000000-0000-0000-0000-000000000000' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/bot/flows bearer
Crea un flujo del bot.
Path params
orgIdstringrequerido
Body
CreateFlowDtoparámetro: dtoRespuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/bot/flows' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"name": "Onboarding nuevo cliente","steps": []}'Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Onboarding nuevo cliente",
"steps": []
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/bot/flows/:id bearer
Actualiza un flujo del bot (config y/o su JSON).
Path params
orgIdstringrequeridoidstringrequerido
Body
UpdateFlowDtoparámetro: dtoRespuestas
- 200
curl -X PATCH 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/bot/flows/00000000-0000-0000-0000-000000000000' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"name": "Onboarding nuevo cliente","steps": []}'Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Onboarding nuevo cliente",
"steps": []
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/bot/flows/:id/publish bearer
Publica el flujo para que quede activo.
Path params
orgIdstringrequeridoidstringrequerido
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/bot/flows/00000000-0000-0000-0000-000000000000/publish' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/bot/flows/:id/unpublish bearer
Despublica el flujo (lo desactiva).
Path params
orgIdstringrequeridoidstringrequerido
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/bot/flows/00000000-0000-0000-0000-000000000000/unpublish' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/bot/flows/:id/duplicate bearer
Duplica un flujo existente.
Path params
orgIdstringrequeridoidstringrequerido
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/bot/flows/00000000-0000-0000-0000-000000000000/duplicate' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/bot/flows/:id bearer
Elimina un flujo del bot.
Path params
orgIdstringrequeridoidstringrequerido
Respuestas
- 204
curl -X DELETE 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/bot/flows/00000000-0000-0000-0000-000000000000' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/bot/flows/:id/test-run bearer
Ejecuta el flujo en sandbox y devuelve el trace de pasos.
Path params
orgIdstringrequeridoidstringrequerido
Body
TestRunDtoparámetro: dtoRespuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/bot/flows/00000000-0000-0000-0000-000000000000/test-run' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"name": "string","description": "string"}'Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}