Skip to main content

How to send a system notification with notifier pop

This endpoint allows you to post a system notification within a customer conversation and pop the myKaarma notifier for dealership users. System notifications are not sent to the end customer; they are only shown within the customer conversation in myKaarma. Unlike an internal note, a system notification is created automatically by a system (isManual: false) rather than by a user.

To use this endpoint, you first need your credentials. If you don't already have one, please head over to the Authentication and Authorization page to see how you can request for credentials from us.

tip

A system notification is only saved in the conversation unless you also pass notificationAttributes. To pop the notifier for dealership users, set threadOwnerNotifierPop and/or additionalNotifierNotificationDAUUIDs as described below.

Request​

HTTP request​

POST  https://api.mykaarma.com/communications/department/{departmentUUID}/user/{userUuid}/customer/{customerUuid}/message

Parameters​

Required path parameters:

Parameter NameValueDescription
departmentUUIDstringUnique identifier of dealer department
userUuidstringUnique identifier of the user on behalf of whom the notification is posted. Pass the literal value DEFAULT to use the department's Default DealerAssociate.
customerUuidstringUnique identifier of customer whose conversation the notification is posted in

Authorization​

This request requires the following authorization scopes:

ScopeLevelDescription
message.createDealerDepartmentAuthorizes client to create system notifications for the provided user's dealer department

Request Body​

The request body contains the following main objects:

messageAttributes (Required)​

Property NameTypeDescription
bodystringText of the system notification
typestringSet to NOTE
protocolstringSet to NONE. No customer phone number or email is needed for this protocol.
isManualbooleanSet to false for a system notification
showInCustomerConversationbooleanDefault: true
Whether the notification is shown in the customer conversation
updateThreadTimestampbooleanDefault: false
Set to true to move the customer conversation to the top of the list
updateTotalMessageCountbooleanDefault: true
Whether the notification counts toward the conversation's total message count

notificationAttributes (Optional)​

Controls which dealership users get the notifier pop. If this object is not passed, the notification is saved in the conversation but no user is notified.

Property NameTypeDescription
threadOwnerNotifierPopbooleanSet to true to pop the notifier for the user who owns the customer conversation
additionalNotifierNotificationDAUUIDsarrayList of DealerAssociate UUIDs to pop the notifier for. These are DealerAssociate UUIDs, not user UUIDs.
internalSubscribersNotifierPopbooleanSet to true to pop the notifier for internal subscribers of the conversation
externalSubscribersNotifierPopbooleanSet to true to pop the notifier for external subscribers of the conversation
sendPhoneNotificationbooleanDefault: false
Set to true to also send a push notification to the myKaarma mobile app

messageSendingAttributes (Optional)​

Property NameTypeDescription
sendSynchronouslybooleanDefault: false
Set to true to save the notification before the API returns. When false, the notification is queued and saved in the background.

Example​

Post a system notification and pop the notifier​

curl --location --request POST 'https://api.mykaarma.com/communications/department/{{departmentUUID}}/user/{{userUuid}}/customer/{{customerUuid}}/message' \
--header 'accept: application/json' \
-u "{{username}}:{{password}}" \
--header 'Content-Type: application/json' \
--data-raw '{
"messageAttributes": {
"body": "Customer opted out of text messages",
"type": "NOTE",
"protocol": "NONE",
"isManual": false,
"showInCustomerConversation": true,
"updateThreadTimestamp": false
},
"messageSendingAttributes": {
"sendSynchronously": true
},
"notificationAttributes": {
"threadOwnerNotifierPop": true,
"additionalNotifierNotificationDAUUIDs": ["{{dealerAssociateUuid}}"],
"sendPhoneNotification": true
}
}'

Response​

Success​

If the request is successful, the API returns a 200 OK status code with a JSON response containing the details of the created message.

{
"messageUUID": "message_uuid",
"customerUUID": "customer_uuid",
"requestUUID": "request_uuid",
"status": "SUCCESS",
"errors": [],
"warnings": []
}

Failure​

If the request fails, the API returns a 400 BAD REQUEST or 500 INTERNAL SERVER ERROR status code with a JSON response containing a list of errors.

{
"status": "FAILURE",
"errors": [
{
"errorCode": "ERROR_CODE",
"errorDescription": "Error description"
}
],
"warnings": []
}

Error Codes​

The following error codes may be returned:

Error CodeDescription
MISSING_MESSAGE_ATTRIBUTESMessage attributes are missing in the request.
MISSING_MESSAGE_TYPEThe type field is missing in message attributes.
MISSING_MESSAGE_PROTOCOLThe protocol field is missing in message attributes.
MISSING_IS_MANUALThe isManual field is missing.
MISSING_MESSAGE_BODYThe message body is empty.
INVALID_CUSTOMERThe provided customer UUID is invalid for the department.
INVALID_USERThe provided user UUID is not a valid DealerAssociate of the department.
INTERNAL_SERVER_ERRORAn unexpected error occurred on the server.