Skip to main content

Adding Profiles to a List

This endpoint lets you add multiple profiles to an existing list or create a new list if one is not specified.

  • If a listId is provided → profiles are added to that existing list.
  • If no listId is provided → a new list is created using the supplied name and description.

Endpoint

POST /list/addProfiles

Headers

HeaderValueRequired
AuthroizationBearer <your-api-key>✅ Yes
Content-Typeapplication/json✅ Yes

Body Parameters

ParameterTypeRequiredDescription
profilesArray✅ YesAn array of profile objects. Each must include at least email. Optional fields: firstName, lastName.
nameString✅ Required if no listIdThe name for the new list.
descriptionString❌ Optional (if listId absent)A description for the new list.
listIdString❌ OptionalIf provided, profiles will be added to this list.

Examples

Request

const response = await fetch("https://api.basicsengage.com/api/v0/dev/list/addProfiles", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authroization": "Bearer <your-api-key>"
},
body: JSON.stringify({
listId: "64b22f999...",
profiles: [
{ email: "alice@example.com", firstName: "Alice", lastName: "Doe" },
{ email: "bob@example.com", firstName: "Bob", lastName: "Smith" }
]
})
});

const data = await response.json();
console.log(data);

Responses

{
"status": "success",
"data": {
"listId": "64b22f999...",
"addedCount": 2
}
}