Documentos
Referencia de 20 endpoints generados desde mosend-wb-backend/src/modules/documents/documents.controller.ts.
/organizations/:orgId/documents·20 endpoints·Source: mosend-wb-backend/src/modules/documents/documents.controller.ts/organizations/:orgId/documents/editor/statusIndica si la edición en vivo está disponible.
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/:orgId/documents/editor/status' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/:docId/editor-configConfig firmado para abrir el documento en el editor en vivo de OnlyOffice.
Path params
orgIdstringrequeridodocIdstringrequerido
Query params
modestring
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/00000000-0000-0000-0000-000000000000/editor-config' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
}
],
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/foldersLista las carpetas de la organización.
Path params
orgIdstringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/folders' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
}
],
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/foldersCrea una carpeta.
Path params
orgIdstringrequerido
Body (JSON)
namestringrequeridoparentIdstringvisibilitystringORGPRIVATE
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/folders' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"name": "<name>","parentId": "00000000-0000-0000-0000-000000000000","visibility": "ORG"}'{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/folders/:folderId/visibilityCambia la visibilidad de una carpeta (ORG/PRIVATE).
Path params
orgIdstringrequeridofolderIdstringrequerido
Body (JSON)
visibilitystringrequeridoORGPRIVATE
Respuestas
- 200
curl -X PATCH 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/folders/00000000-0000-0000-0000-000000000000/visibility' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"visibility": "ORG"}'{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/folders/:folderIdRenombra una carpeta.
Path params
orgIdstringrequeridofolderIdstringrequerido
Body (JSON)
namestringrequerido
Respuestas
- 200
curl -X PATCH 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/folders/00000000-0000-0000-0000-000000000000' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"name": "<name>"}'{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/folders/:folderIdBorra una carpeta (sus documentos quedan en la raíz).
Path params
orgIdstringrequeridofolderIdstringrequerido
Respuestas
- 200
curl -X DELETE 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/folders/00000000-0000-0000-0000-000000000000' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documentsLista documentos (carpeta, o búsqueda en toda la org).
Path params
orgIdstringrequerido
Query params
folderIdstringqstringtypestring
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
}
],
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/trashDocumentos en la papelera.
Path params
orgIdstringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/trash' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
}
],
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/storageUso de almacenamiento del plan.
Path params
orgIdstringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/storage' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/from-messageGuarda en Documentos el adjunto de un mensaje entrante.
Path params
orgIdstringrequerido
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/from-message' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documentsSube un documento (campo `file` multipart).
Path params
orgIdstringrequerido
Query params
folderIdstring
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/:docId/visibilityCambia la visibilidad de un documento (ORG/PRIVATE).
Path params
orgIdstringrequeridodocIdstringrequerido
Body (JSON)
visibilitystringrequeridoORGPRIVATE
Respuestas
- 200
curl -X PATCH 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/00000000-0000-0000-0000-000000000000/visibility' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"visibility": "ORG"}'{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/:docId/viewURL firmada para abrir/descargar el documento.
Path params
orgIdstringrequeridodocIdstringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/00000000-0000-0000-0000-000000000000/view' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/:docIdRenombra un documento.
Path params
orgIdstringrequeridodocIdstringrequerido
Body (JSON)
namestringrequerido
Respuestas
- 200
curl -X PATCH 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/00000000-0000-0000-0000-000000000000' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"name": "<name>"}'{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/:docId/moveMueve un documento a otra carpeta (o a la raíz).
Path params
orgIdstringrequeridodocIdstringrequerido
Body (JSON)
folderIdstringrequerido
Respuestas
- 200
curl -X PATCH 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/00000000-0000-0000-0000-000000000000/move' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"folderId": "00000000-0000-0000-0000-000000000000"}'{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/:docId/sendEnvía el documento a una conversación (WhatsApp o web-chat).
Path params
orgIdstringrequeridodocIdstringrequerido
Body (JSON)
conversationIdstringrequeridocaptionstring
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/00000000-0000-0000-0000-000000000000/send' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"conversationId": "00000000-0000-0000-0000-000000000000","caption": "<caption>"}'{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/:docId/restoreRestaura un documento de la papelera.
Path params
orgIdstringrequeridodocIdstringrequerido
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/00000000-0000-0000-0000-000000000000/restore' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/:docIdManda un documento a la papelera (borrado suave).
Path params
orgIdstringrequeridodocIdstringrequerido
Respuestas
- 200
curl -X DELETE 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/00000000-0000-0000-0000-000000000000' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/documents/:docId/purgeElimina definitivamente un documento.
Path params
orgIdstringrequeridodocIdstringrequerido
Respuestas
- 200
curl -X DELETE 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/documents/00000000-0000-0000-0000-000000000000/purge' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}