Confirm Customer Username Change
This API endpoint allows verifying a new username. You need to include the confirmation code when making the request.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will verify the username and return a confirmation message.
  • If the request is unauthorized or invalid, the system will respond with an error message.
Request Body Parameters
  • code string
    The verification code sent to the customer. Example: '293479'
JavaScript
Response codes
const axios = require('axios');

const url = "https://customer-cmd.api.pinghome.io/default/v1/customer/username";
const data = {
    "code": "293479"
};

axios.patch(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).