This is a development version of the documentation. Content may change without notice.
Voke Documentation
ReferenceREST API

Notifications

Push, email, SMS notifications

Get notification logs (SuperAdmin only)

GET
/api/v1/notifications/logs

Query Parameters

page?number

Page number (1-indexed)

Default1
Range1 <= value
limit?number

Items per page

Default20
Range1 <= value <= 100

Response 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

POST
/api/v1/notifications/push-tokens

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

DELETE
/api/v1/notifications/push-tokens/{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
}