createCustomerEmail

createCustomerEmail

This method adds a new email address for a specific customer.

Parameters

customerId (string, required): The UUID of the customer.

Body Parameters

  • email (string, required): The email address to be added.
  • verified (boolean, optional): Indicates whether the email address is verified.

Returns

A JSON object containing the details of the newly created email address.

Usage Example

const axios = require('axios');
let data = JSON.stringify({
  "email": "string",
  "verified": true
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.nexera.id/customers/:customerId/emails',
  headers: { 
    'Content-Type': 'application/json', 
    'Accept': 'application/json', 
    'Authorization': 'Bearer <TOKEN>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});