Add a cardholder
curl --request POST \
--url https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users \
--header 'Api-Key: <api-key>' \
--header 'Api-Version: <api-version>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "Maya",
"lastName": "Okafor",
"email": "maya.okafor@example.com",
"phoneCountryCode": "+44",
"phoneNumber": "7700900123"
}
'import requests
url = "https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users"
payload = {
"firstName": "Maya",
"lastName": "Okafor",
"email": "maya.okafor@example.com",
"phoneCountryCode": "+44",
"phoneNumber": "7700900123"
}
headers = {
"Api-Version": "<api-version>",
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Version': '<api-version>',
'Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: 'Maya',
lastName: 'Okafor',
email: 'maya.okafor@example.com',
phoneCountryCode: '+44',
phoneNumber: '7700900123'
})
};
fetch('https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-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([
'firstName' => 'Maya',
'lastName' => 'Okafor',
'email' => 'maya.okafor@example.com',
'phoneCountryCode' => '+44',
'phoneNumber' => '7700900123'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Api-Version: <api-version>",
"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-sandbox.endl.io/api/v0/customer/{businessId}/card-users"
payload := strings.NewReader("{\n \"firstName\": \"Maya\",\n \"lastName\": \"Okafor\",\n \"email\": \"maya.okafor@example.com\",\n \"phoneCountryCode\": \"+44\",\n \"phoneNumber\": \"7700900123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Version", "<api-version>")
req.Header.Add("Api-Key", "<api-key>")
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-sandbox.endl.io/api/v0/customer/{businessId}/card-users")
.header("Api-Version", "<api-version>")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Maya\",\n \"lastName\": \"Okafor\",\n \"email\": \"maya.okafor@example.com\",\n \"phoneCountryCode\": \"+44\",\n \"phoneNumber\": \"7700900123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Version"] = '<api-version>'
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Maya\",\n \"lastName\": \"Okafor\",\n \"email\": \"maya.okafor@example.com\",\n \"phoneCountryCode\": \"+44\",\n \"phoneNumber\": \"7700900123\"\n}"
response = http.request(request)
puts response.read_body{
"cardholderId": "cus_8Qw2mZ4pL7nR1tY6vB3x",
"businessId": "cus_1Xb7cV4bN7mQ0wE3rT5y",
"firstName": "Maya",
"lastName": "Okafor",
"email": "maya.okafor@example.com",
"status": "pending"
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}Add a cardholder
Adds an employee as a cardholder of the business. Their cards spend the business’s card balance. The business must be enrolled, with status active. An enrolled individual is their own cardholder and needs no step here.
- The new cardholder gets their own
cus_id. Use it ascardholderIdto issue cards. - Cardholders send no events. Poll Get a cardholder until the status is
activebefore you issue cards. - The business’s main beneficial owner is added automatically when the business enrols. Don’t add them again. See Business owner.
- No
Idempotency-Key. A repeat with the same email returns400 ERRCRD_1010. If you lost the response, find the cardholder in List cardholders.
POST
/
api
/
v0
/
customer
/
{businessId}
/
card-users
Add a cardholder
curl --request POST \
--url https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users \
--header 'Api-Key: <api-key>' \
--header 'Api-Version: <api-version>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "Maya",
"lastName": "Okafor",
"email": "maya.okafor@example.com",
"phoneCountryCode": "+44",
"phoneNumber": "7700900123"
}
'import requests
url = "https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users"
payload = {
"firstName": "Maya",
"lastName": "Okafor",
"email": "maya.okafor@example.com",
"phoneCountryCode": "+44",
"phoneNumber": "7700900123"
}
headers = {
"Api-Version": "<api-version>",
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Version': '<api-version>',
'Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: 'Maya',
lastName: 'Okafor',
email: 'maya.okafor@example.com',
phoneCountryCode: '+44',
phoneNumber: '7700900123'
})
};
fetch('https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-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([
'firstName' => 'Maya',
'lastName' => 'Okafor',
'email' => 'maya.okafor@example.com',
'phoneCountryCode' => '+44',
'phoneNumber' => '7700900123'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Api-Version: <api-version>",
"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-sandbox.endl.io/api/v0/customer/{businessId}/card-users"
payload := strings.NewReader("{\n \"firstName\": \"Maya\",\n \"lastName\": \"Okafor\",\n \"email\": \"maya.okafor@example.com\",\n \"phoneCountryCode\": \"+44\",\n \"phoneNumber\": \"7700900123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Version", "<api-version>")
req.Header.Add("Api-Key", "<api-key>")
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-sandbox.endl.io/api/v0/customer/{businessId}/card-users")
.header("Api-Version", "<api-version>")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Maya\",\n \"lastName\": \"Okafor\",\n \"email\": \"maya.okafor@example.com\",\n \"phoneCountryCode\": \"+44\",\n \"phoneNumber\": \"7700900123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Version"] = '<api-version>'
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Maya\",\n \"lastName\": \"Okafor\",\n \"email\": \"maya.okafor@example.com\",\n \"phoneCountryCode\": \"+44\",\n \"phoneNumber\": \"7700900123\"\n}"
response = http.request(request)
puts response.read_body{
"cardholderId": "cus_8Qw2mZ4pL7nR1tY6vB3x",
"businessId": "cus_1Xb7cV4bN7mQ0wE3rT5y",
"firstName": "Maya",
"lastName": "Okafor",
"email": "maya.okafor@example.com",
"status": "pending"
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}Headers
The API version this request targets. 2026-09.1. See Versioning.
Pattern:
^\d{4}-\d{2}\.\d+$Path Parameters
Body
application/json
Response
The cardholder.
Fields without a value are left out.