Skip to main content
POST
/
end-users
JavaScript
import Conductor from 'conductor-node';

const conductor = new Conductor({
  apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
});

const endUser = await conductor.endUsers.create({
  companyName: 'Acme Inc.',
  email: 'alice@acme.com',
  sourceId: '12345678-abcd-abcd-example-1234567890ab',
});

console.log(endUser.id);
import os
from conductor import Conductor

conductor = Conductor(
    api_key=os.environ.get("CONDUCTOR_SECRET_KEY"),  # This is the default and can be omitted
)
end_user = conductor.end_users.create(
    company_name="Acme Inc.",
    email="alice@acme.com",
    source_id="12345678-abcd-abcd-example-1234567890ab",
)
print(end_user.id)
curl --request POST \
  --url https://api.conductor.is/v1/end-users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "companyName": "Acme Inc.",
  "sourceId": "12345678-abcd-abcd-example-1234567890ab",
  "email": "alice@acme.com"
}
'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.conductor.is/v1/end-users",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'companyName' => 'Acme Inc.',
    'sourceId' => '12345678-abcd-abcd-example-1234567890ab',
    'email' => 'alice@acme.com'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.conductor.is/v1/end-users"

	payload := strings.NewReader("{\n  \"companyName\": \"Acme Inc.\",\n  \"sourceId\": \"12345678-abcd-abcd-example-1234567890ab\",\n  \"email\": \"alice@acme.com\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.conductor.is/v1/end-users")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"companyName\": \"Acme Inc.\",\n  \"sourceId\": \"12345678-abcd-abcd-example-1234567890ab\",\n  \"email\": \"alice@acme.com\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.conductor.is/v1/end-users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"companyName\": \"Acme Inc.\",\n  \"sourceId\": \"12345678-abcd-abcd-example-1234567890ab\",\n  \"email\": \"alice@acme.com\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "end_usr_1234567abcdefg",
  "objectType": "end_user",
  "createdAt": "2024-01-01T12:34:56.789Z",
  "companyName": "Acme Inc.",
  "sourceId": "12345678-abcd-abcd-example-1234567890ab",
  "email": "bob@acme.com",
  "integrationConnections": [
    {
      "id": "int_conn_1234567abcdefg",
      "objectType": "integration_connection",
      "createdAt": "2024-01-01T12:34:56.789Z",
      "integrationSlug": "quickbooks_desktop",
      "lastRequestAt": "2024-01-01T12:34:56.789Z",
      "lastSuccessfulRequestAt": "2024-01-01T12:34:56.789Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Your Conductor secret key using Bearer auth (e.g., "Authorization: Bearer {{YOUR_SECRET_KEY}}").

Body

application/json
companyName
string
required

The end-user's company name that will be shown elsewhere in Conductor.

Example:

"Acme Inc."

sourceId
string
required

The end-user's unique identifier from your system. Maps users between your database and Conductor. Must be unique for each user. If you have only one user, you may use any string value.

Example:

"12345678-abcd-abcd-example-1234567890ab"

email
string
required

The end-user's email address for identification purposes. Setting this field will not cause any emails to be sent.

Example:

"alice@acme.com"

Response

200 - application/json

Returns the end-user object after successful end-user creation.

id
string
required

The unique identifier for this end-user. You must save this value to your database because it is how you identify which of your users to receive your API requests.

Example:

"end_usr_1234567abcdefg"

objectType
string
required

The type of object. This value is always "end_user".

Allowed value: "end_user"
Example:

"end_user"

createdAt
string
required

The date and time when this end-user record was created.

Example:

"2024-01-01T12:34:56.789Z"

companyName
string
required

The end-user's company name that will be shown elsewhere in Conductor.

Example:

"Acme Inc."

sourceId
string
required

The end-user's unique identifier from your system. Maps users between your database and Conductor.

Example:

"12345678-abcd-abcd-example-1234567890ab"

email
string
required

The end-user's email address for identification purposes.

Example:

"bob@acme.com"

integrationConnections
object[]
required

The end-user's integration connections.