import Conductor from "conductor-node";
const conductor = new Conductor("{{YOUR_SECRET_KEY}}");

const endUser = await conductor.endUsers.create({
  companyName: "Big Construction Co.",
  sourceId: "12345678-abcd-abcd-example-1234567890ab",
  email: "bob@bigconstruction.com",
});
{
  "id": "end_usr_1234567abcdefg",
  "objectType": "end_user",
  "companyName": "Big Construction Co.",
  "sourceId": "12345678-abcd-abcd-example-1234567890ab",
  "email": "bob@bigconstruction.com",
  "createdAt": "2022-11-16 23:51:08.996+00"
}

Parameters

companyName
string
required

Your end-user’s company name that will be shown elsewhere in Conductor.

sourceId
string
required

Your end-user’s unique ID from your database. Must be distinct from your other EndUsers.

email
string
required

Your end-user’s email address.

Returns

Returns the EndUser object after successful EndUser creation. Returns an error if the parameters were invalid (for example, specifying an invalid email address).

import Conductor from "conductor-node";
const conductor = new Conductor("{{YOUR_SECRET_KEY}}");

const endUser = await conductor.endUsers.create({
  companyName: "Big Construction Co.",
  sourceId: "12345678-abcd-abcd-example-1234567890ab",
  email: "bob@bigconstruction.com",
});
{
  "id": "end_usr_1234567abcdefg",
  "objectType": "end_user",
  "companyName": "Big Construction Co.",
  "sourceId": "12345678-abcd-abcd-example-1234567890ab",
  "email": "bob@bigconstruction.com",
  "createdAt": "2022-11-16 23:51:08.996+00"
}