``// Dependencies to install:
// $ npm install node-fetch --save
const fetch = require('node-fetch');
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: 'Bearer pk_prod_6CKWEGJQQYMSE5Q0STCCJW5FMDX3'
},
body: JSON.stringify({
"users": [
{
"recipient": "8ec8c99a-c5f7-555b-9f60-8222b8a27056",
"profile": {
"phone_number": "2",
"email": "@gmail.com"
},
"data": {
"name": "abhi",
"age": 27
},
"to": {
"phone_number": "+9"
}
},
{
"recipient": "8ec8c89a-c5f7-455b-9f60-8222b8a27056",
"profile": {
"phone_number": "80",
"email": "i28@gmail.com"
},
"data": {
"name": "twen Doe",
"age": 27
},
"to": {
"phone_number": "+91"
}
}
]
})
};
fetch('https://api.courier.com/bulk/1-633417db-6942a56e97f98845d20b9c4', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));``
Then I ran this to ingest user