Notificaciones push

Referencia de 9 endpoints generados desde mosend-wb-backend/src/modules/push/push.controller.ts.

Base path: /push·9 endpoints·Source: mosend-wb-backend/src/modules/push/push.controller.ts
POST/push/device
bearer

Registra el token de push nativo (Expo) del dispositivo.

Body

RegisterDeviceDtoparámetro: dto

Respuestas

  • 200
curl -X POST 'https://api.mosend.dev/push/device' \
  -H 'X-Api-Key: mk_live_<prefix>.<secret>' \
  -H 'Content-Type: application/json' \
  -d '{"email": "info@empresa.com","password": "••••••••","organizationName": "Mi Empresa"}'
Response · 200
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "email": "info@empresa.com",
    "password": "••••••••",
    "organizationName": "Mi Empresa"
  },
  "timestamp": "2026-05-01T03:42:18.123Z"
}
DELETE/push/device
bearer

Da de baja un token de push nativo (logout en el device).

Body

UnregisterDeviceDtoparámetro: dto

Respuestas

  • 204
curl -X DELETE 'https://api.mosend.dev/push/device' \
  -H 'X-Api-Key: mk_live_<prefix>.<secret>' \
  -H 'Content-Type: application/json' \
  -d '{"email": "info@empresa.com","password": "••••••••","organizationName": "Mi Empresa"}'
Response · 200
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "email": "info@empresa.com",
    "password": "••••••••",
    "organizationName": "Mi Empresa"
  },
  "timestamp": "2026-05-01T03:42:18.123Z"
}
GET/push/config
bearer

VAPID public key y disponibilidad del servicio.

Respuestas

  • 200
curl -X GET 'https://api.mosend.dev/push/config' \
  -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"
}
POST/push/subscribe
bearer

Guarda la suscripción Push del browser del usuario.

Body

SubscribeDtoparámetro: dto

Respuestas

  • 200
curl -X POST 'https://api.mosend.dev/push/subscribe' \
  -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"
}
DELETE/push/subscribe
bearer

Elimina una suscripción Push (logout en device, toggle off).

Body

UnsubscribeDtoparámetro: dto

Respuestas

  • 204
curl -X DELETE 'https://api.mosend.dev/push/subscribe' \
  -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"
}
POST/push/rotate
público

Re-registra una suscripción tras pushsubscriptionchange.

Body

RotateDtoparámetro: dto

Respuestas

  • 200
curl -X POST 'https://api.mosend.dev/push/rotate' \
  -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"
}
GET/push/subscriptions
bearer

Lista los devices del usuario con push habilitado.

Respuestas

  • 200
curl -X GET 'https://api.mosend.dev/push/subscriptions' \
  -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"
}
GET/push/diagnose
bearer

Estado de un endpoint en el backend (registrado / no).

Query params

  • endpointstringrequerido

Respuestas

  • 200
curl -X GET 'https://api.mosend.dev/push/diagnose' \
  -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"
}
POST/push/test
bearer

Envía una notificación de prueba al usuario actual.

Respuestas

  • 200
curl -X POST 'https://api.mosend.dev/push/test' \
  -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"
}