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"
}
]
}End Users
Create an end-user
Creates an end-user.
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
Body
application/json
Response
200 - application/json
Returns the end-user object after successful end-user creation.

