POST /api/v2/segments/:segmentId/create-userssegmentId. This allows you to provide a list of user information to be added to the segment.segmentId (integer) - The ID of the segment to which the users will be added. Example: 18Content-Type: application/jsonname and email.[
{
"name": "Rahul Sharma",
"email": "rahul.sharma@shorterloop.com"
},
{
"name": "Pooja Mehta",
"email": "pooja.mehta@shorterloop.com"
},
{
"name": "Amit Verma",
"email": "amit.verma@shorterloop.com"
},
{
"name": "Sneha Reddy",
"email": "sneha.reddy@shorterloop.com"
},
{
"name": "Deepak Rao",
"email": "deepak.rao@shorterloop.com"
}
][
{
"name": "Anjali Singh",
"email": "anjali.singh@shorterloop.com"
},
{
"name": "Ravi Kumar",
"email": "ravi.kumar@shorterloop.com"
},
{
"name": "Neha Patel",
"email": "neha.patel@shorterloop.com"
},
{
"name": "Vikas Gupta",
"email": "vikas.gupta@shorterloop.com"
},
{
"name": "Priya Nair",
"email": "priya.nair@shorterloop.com"
}
]curl --location --request POST 'https://api.shorterloop.com/api/v2/segments/18/create-users' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MjA3NSwiZmlyc3ROYW1lIjoiZGVlcGlrYSIsImxhc3ROYW1lIjpudWxsLCJ1c2VyRXhwZXJpZW5jZSI6bnVsbCwiZW1haWwiOiJkcGF0aWFsK2ppcmFAc2hvcnRlcmxvb3AuY29tIiwiZGlzcGxheU5hbWUiOiJkZWVwaWthIiwicHJvZmlsZUltYWdlIjoiMTM3OC9nZW5lcmFsL3VzZXJzL0lJM0YyMDc1YzZhNS5zdmciLCJ0aW1lWm9uZUFiYnIiOm51bGwsInN0YXR1cyI6ImFjdGl2ZSIsInByb3ZpZGVyIjoiY3VzdG9tIiwidGVybXNBY2NlcHRlZCI6MSwibGFzdFBhZ2UiOiIvQ09OT1AvcHJvZHVjdC9ERUUvZG9jdW1lbnRhdGlvbi91bnRpdGxlZC02LTY0ZjQiLCJ2ZXJpZmljYXRpb25Ub2tlbiI6IiIsImxhc3RTaWduSW4iOiIyMDI1LTA0LTAxVDE0OjMwOjIwLjAwMFoiLCJyb2xlIjoic3VwZXJhZG1pbiIsImlzUHJvZGVhc3lBZG1pbiI6MCwiZ3JvdXAiOjEsInJlZmVycmVyIjpudWxsLCJpc1ZlcmlmaWVkIjoxLCJyZWZlcnJlclRva2VuIjpudWxsLCJyZWZyZXNoUmVmZXJyZXJUb2tlbiI6bnVsbCwiYmlvIjpudWxsLCJjcmVhdGVkQXQiOiIyMDI1LTAzLTE3VDA5OjM2OjU2LjAwMFoiLCJ1cGRhdGVkQXQiOiIyMDI1LTA0LTAxVDE0OjMwOjIwLjAwMFoiLCJzdWJzY3JpcHRpb24iOnsidXNlclJvbGUiOiJzdXBlcmFkbWluIiwic3Vic2NyaXB0aW9uRXh0ZXJuYWxLZXkiOiJDT05PUCIsImV4dGVybmFsS2V5IjoiQ09OT1AiLCJjbmFtZSI6bnVsbCwiaWQiOjEzNzh9LCJzdWJzY3JpcHRpb25JZCI6MTM3OCwiZXh0ZXJuYWxLZXkiOiJDT05PUCIsInN1YnNjcmlwdGlvbkV4dGVybmFsS2V5IjoiQ09OT1AiLCJ0aW1lIjoiMjAyNS0wNC0wMlQwNTo0Mzo1NC41MDRaIiwiaWF0IjoxNzQzNTcyNjM0LCJleHAiOjE3NDM4MzE4MzR9.UJaUHpd_XJyGSv4C0DaaEVxDDQKzKZ_lKPkf8Yrr-Oc' \
--header 'initiativeId: DEE' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"name": "Anjali Singh",
"email": "anjali.singh@shorterloop.com"
},
{
"name": "Ravi Kumar",
"email": "ravi.kumar@shorterloop.com"
},
{
"name": "Neha Patel",
"email": "neha.patel@shorterloop.com"
},
{
"name": "Vikas Gupta",
"email": "vikas.gupta@shorterloop.com"
},
{
"name": "Priya Nair",
"email": "priya.nair@shorterloop.com"
}
]'{
"success": true,
"message": "Users copied to segment successfully",
"data": {
"inviteResults": [
{
"success": true,
"user": {
"id": 1827,
"email": "anjali.singh@shorterloop.com",
"role": "idm_member",
"updatedAt": "2024-10-29T10:48:49.867Z",
"createdAt": "2024-10-29T10:48:49.867Z",
"firstName": "Anjali Singh"
}
},
{
"success": true,
"user": {
"id": 1828,
"email": "ravi.kumar@shorterloop.com",
"role": "idm_member",
"updatedAt": "2024-10-29T10:48:49.925Z",
"createdAt": "2024-10-29T10:48:49.925Z",
"firstName": "Ravi Kumar"
}
},
{
"success": true,
"user": {
"id": 1829,
"email": "neha.patel@shorterloop.com",
"role": "idm_member",
"updatedAt": "2024-10-29T10:48:49.979Z",
"createdAt": "2024-10-29T10:48:49.979Z",
"firstName": "Neha Patel"
}
},
{
"success": true,
"user": {
"id": 1830,
"email": "vikas.gupta@shorterloop.com",
"role": "idm_member",
"updatedAt": "2024-10-29T10:48:50.014Z",
"createdAt": "2024-10-29T10:48:50.014Z",
"firstName": "Vikas Gupta"
}
}
],
"segmentCount": 5
}
}