Organizations
CRUD de organizaciones (tenants). El multi-tenancy de Mosend se construye sobre este modelo.
Base path:
/organizations·6 endpoints·Source: mosend-wb-backend/src/modules/organizations/organizations.controller.ts/organizations bearer
Listar organizaciones del usuario actual
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations' \ -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 bearer
Crear organización (queda como owner)
Body (JSON)
namestringrequeridoslugstringrequeridobillingEmailstring · emailrequeridocountrystringcurrencystringtimezonestring
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"name": "<name>","slug": "<slug>","billingEmail": "persona@empresa.com","country": "<country>","currency": "<currency>","timezone": "<timezone>"}'Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Mi Empresa",
"slug": "mi-empresa"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/slug-suggest bearer
Sugiere un slug disponible para un nombre dado
Query params
namestringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/slug-suggest' \ -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/slug-available bearer
Verifica si un slug está disponible
Query params
slugstringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/slug-available' \ -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/:id bearer
Obtener organización por id
Path params
idstringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/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/:id bearer
Actualizar organización (requiere organizations:write)
Path params
idstringrequerido
Body (JSON)
namestringbillingEmailstring · emailcountrystringcurrencystringtimezonestringbusinessHoursScheduleobject
Respuestas
- 200
curl -X PATCH 'https://api.mosend.dev/organizations/00000000-0000-0000-0000-000000000000' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"name": "<name>","billingEmail": "persona@empresa.com","country": "<country>","currency": "<currency>","timezone": "<timezone>","businessHoursSchedule": {}}'Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Mi Empresa",
"slug": "mi-empresa"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}