ReferenceREST API
Notifications
Push, email, SMS notifications
Get notification logs (SuperAdmin only)
Query Parameters
page?number
Page number (1-indexed)
Default
1Range
1 <= valuelimit?number
Items per page
Default
20Range
1 <= value <= 100Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/notifications/logs"{
"data": [
{
"body": "string",
"channel": "PUSH",
"createdAt": "2019-08-24T14:15:22Z",
"error": "string",
"id": "string",
"metadata": {},
"sentAt": "2019-08-24T14:15:22Z",
"status": "PENDING",
"subject": "string",
"userId": "string"
}
],
"meta": {
"limit": 0,
"page": 0,
"total": 0,
"totalPages": 0
}
}{
"code": "VALIDATION_ERROR",
"details": {},
"error": "Bad Request",
"message": "Validation error",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "SUPER_ADMIN_REQUIRED",
"details": {},
"error": "Forbidden",
"message": "SuperAdmin access required",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Register a push notification token
Request Body
application/json
platform?string
Platform
token*string
Expo push token
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/v1/notifications/push-tokens" \ -H "Content-Type: application/json" \ -d '{ "token": "ExponentPushToken[xxxx]" }'{
"createdAt": "2019-08-24T14:15:22Z",
"id": "string",
"platform": "string",
"token": "string",
"userId": "string"
}{
"code": "BAD_REQUEST",
"details": {},
"error": "Bad Request",
"message": "Invalid push token or payload validation error",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Remove a push notification token
Path Parameters
token*string
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://loading/api/v1/notifications/push-tokens/string"{
"message": "string"
}{
"code": "BAD_REQUEST",
"details": {},
"error": "Bad Request",
"message": "Invalid token parameter",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}