Update User Notification Settings

From docs
Jump to: navigation, search

Mobile_API »Update User Notification Settings

Base URL

https://apimobile.callproof.com

Endpoint

/api/update-user-notification-settings

Purpose

Updates one notification preference for the authenticated user. For most notification types this enables/disables the setting. For device_notification, it updates the selected task notification timing choice.

HTTP Method

POST

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

Parameter Type Required Description
type_key string Yes Notification setting key to update. Supported values: video_message_notification, video_message_email_notification, callproof_academy_notification, allow_outside_video_messages, device_notification
value string/boolean/integer Yes New value for the setting. For most types this is an enabled/disabled flag. For device_notification, this is the selected task notification timing choice ID

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/update-user-notification-settings' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "type_key": "video_message_notification", "value": true }' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/update-user-notification-settings' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "type_key": "video_message_notification", "value": true }' 

Successful Response (200)

Indicates that the notification setting was updated successfully.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
message string Confirmation message (for example, "User notification settings updated successfully")
notification_type string The type_key that was updated
uri string Requested resource URI

Error Responses

Status Code Meaning
200 Validation failed – response body uses clientStatusCode 401 with the first validation error message
400 Bad Request – the notification setting could not be updated
401 Unauthorized – missing, invalid, or expired Bearer token
  • Validation (HTTP 200, clientStatusCode 401) – Missing type_key or value.
  • 400 – An error occurred while updating the setting (for example, "Error while updating the user notification settings").
  • 401 – Authentication failed or the access token is missing/expired.