Create Personal Notification Channel
This API endpoint allows creating a new personal notification channel. Notification channels can include SMS, email, or other communication methods used to deliver updates, alerts, or promotional information to the customer. You must include the value and type of the notification channel.

Common use cases:

  • SMS notifications: Use this endpoint to configure an sms notification channel for sending alerts or updates directly to the customer’s phone.
  • Email notifications: Set up an email notification channel to keep customers informed about important alerts, updates, ensuring they receive timely information.
  • Push notifications: Add a webhook or other URL-based notification method to send push notifications or real-time updates to external platforms integrated with customer data.


Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will create the notification channel and return a confirmation message.
  • If the request is unauthorized or invalid, the system will respond with an error message.
Path Parameters
  • id string
    The unique ID of the customer. Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
Request Body Parameters
  • value string
    The value of the notification channel, such as a phone number or email. Example: '+994551234567'
  • type string
JavaScript
Response codes
const axios = require('axios');

const url = "https://customer-cmd.api.pinghome.io/v1/customer/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel";
const data = {
  "value": "+994551234567",
  "type": "sms"
};

axios.post(url, data, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).