Skip to main content

Create a notification

POST 

https://core-prod.malipopay.co.tz/api/v1/notification

Creates a new in-app notification for the authenticated project.

Request

Bodyrequired

    titlestringrequired

    Notification title

    Example: Payment Received
    messagestringrequired

    Notification body message

    Example: You have received a payment of TZS 50,000 from John Doe
    typestringrequired

    Notification type (INFO, WARNING, SUCCESS, ERROR)

    Possible values: [INFO, WARNING, SUCCESS, ERROR]

    Example: SUCCESS
    recipientstring

    User ID of the notification recipient

    Example: 613771e99a924399394b795a
    referencestring

    Related payment or transaction reference

    Example: ML21030
    metadata object

    Additional context data

    property name*any

    Additional context data

Responses

Notification created successfully

Schema
    _idstring
    Example: 65a2c81f3d4e5b0c2f9a7e63
    titlestring
    Example: Payment Received
    messagestring
    Example: You have received a payment of TZS 50,000 from John Doe
    typestring

    Possible values: [INFO, WARNING, SUCCESS, ERROR]

    Example: SUCCESS
    recipientstring
    Example: 613771e99a924399394b795a
    readboolean

    Whether the notification has been read

    Example: false
    referencestring
    Example: ML21030
    projectstring
    Example: 63db68a6c5f3e7682e23c2ca
    deletedboolean
    Example: false
    createdAtdate-time
    Example: 2024-03-05T14:30:00.000Z
    updatedAtdate-time
    Example: 2024-03-05T14:30:00.000Z

Authorization: apiToken

name: apiTokentype: apiKeyin: headerdescription: Project API key. Get yours from the Malipopay dashboard under Settings → API Keys.
curl -L 'https://core-prod.malipopay.co.tz/api/v1/notification' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'apiToken: <apiToken>' \
-d '{
"title": "Payment Received",
"message": "You have received a payment of TZS 50,000 from John Doe",
"type": "SUCCESS",
"recipient": "613771e99a924399394b795a",
"reference": "ML21030",
"metadata": {}
}'
Request
Base URL
https://core-prod.malipopay.co.tz
Auth
Body required
{
  "title": "Payment Received",
  "message": "You have received a payment of TZS 50,000 from John Doe",
  "type": "SUCCESS",
  "recipient": "613771e99a924399394b795a",
  "reference": "ML21030",
  "metadata": {}
}
Response

Click the Send API Request button above and see the response here!