POST /devices/me/push-notifications

Register device for push notifications. Supports FCM (Firebase), APNs (Apple), or webhook-based notifications.

application/json

Body Required

  • platform string Required

    Push notification platform

    Values are fcm, apns, or webhook.

  • token string

    Push token (required for fcm/apns, not needed for webhook)

Responses

  • 200 application/json

    Push notifications registered

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
  • 400 application/json

    Bad request

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
POST /devices/me/push-notifications
curl \
 --request POST 'http://localhost:7001/devices/me/push-notifications' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"platform":"webhook","token":"string"}'
Request examples
{
  "platform": "webhook",
  "token": "string"
}
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "Push notifications registered successfully"
}
Response examples (400)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}
Response examples (401)
{
  "status": false,
  "code": 401,
  "message": "Unauthorized",
  "error": "Invalid or missing authentication"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}