Create 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": "Ada",
"lastName": "Lovelace",
"email": "ada@example.com",
"phoneCountryCode": "1",
"phoneNumber": "5555550100"
}
'import requests
url = "https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users"
payload = {
"firstName": "Ada",
"lastName": "Lovelace",
"email": "ada@example.com",
"phoneCountryCode": "1",
"phoneNumber": "5555550100"
}
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: 'Ada',
lastName: 'Lovelace',
email: 'ada@example.com',
phoneCountryCode: '1',
phoneNumber: '5555550100'
})
};
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' => 'Ada',
'lastName' => 'Lovelace',
'email' => 'ada@example.com',
'phoneCountryCode' => '1',
'phoneNumber' => '5555550100'
]),
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\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"email\": \"ada@example.com\",\n \"phoneCountryCode\": \"1\",\n \"phoneNumber\": \"5555550100\"\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\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"email\": \"ada@example.com\",\n \"phoneCountryCode\": \"1\",\n \"phoneNumber\": \"5555550100\"\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\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"email\": \"ada@example.com\",\n \"phoneCountryCode\": \"1\",\n \"phoneNumber\": \"5555550100\"\n}"
response = http.request(request)
puts response.read_body{
"cardholderId": "cus_6OzDYZWl5Aim37RwvZfZ",
"businessId": "cus_HUCgMg1iqWb379FMNvaJ",
"firstName": "Ada",
"lastName": "Lovelace",
"email": "ada@example.com",
"status": "active"
}{
"code": 400,
"message": "Cardholder could not be created",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "ERRCRD_1010",
"message": "Cardholder could not be created",
"field": null
}
]
}{
"code": 401,
"message": "Partner API key required",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "ERRCORE_1004",
"message": "Partner API key required",
"field": null
}
]
}{
"code": 403,
"message": "Access denied / missing cards permission",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "ERRCORE_1005",
"message": "Access denied / missing cards permission",
"field": null
}
]
}{
"code": 404,
"message": "Reference not found",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "ERRREF_1001",
"message": "Reference not found",
"field": "userId"
}
]
}Create cardholder
Register a person who can hold cards under a business customer.
phoneCountryCode and phoneNumber travel together — sending one without the other is a 400 ERRCRD_1005. A 91 country code requires 10 digits starting 6–9.
POST
/
api
/
v0
/
customer
/
{businessId}
/
card-users
Create 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": "Ada",
"lastName": "Lovelace",
"email": "ada@example.com",
"phoneCountryCode": "1",
"phoneNumber": "5555550100"
}
'import requests
url = "https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users"
payload = {
"firstName": "Ada",
"lastName": "Lovelace",
"email": "ada@example.com",
"phoneCountryCode": "1",
"phoneNumber": "5555550100"
}
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: 'Ada',
lastName: 'Lovelace',
email: 'ada@example.com',
phoneCountryCode: '1',
phoneNumber: '5555550100'
})
};
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' => 'Ada',
'lastName' => 'Lovelace',
'email' => 'ada@example.com',
'phoneCountryCode' => '1',
'phoneNumber' => '5555550100'
]),
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\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"email\": \"ada@example.com\",\n \"phoneCountryCode\": \"1\",\n \"phoneNumber\": \"5555550100\"\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\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"email\": \"ada@example.com\",\n \"phoneCountryCode\": \"1\",\n \"phoneNumber\": \"5555550100\"\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\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"email\": \"ada@example.com\",\n \"phoneCountryCode\": \"1\",\n \"phoneNumber\": \"5555550100\"\n}"
response = http.request(request)
puts response.read_body{
"cardholderId": "cus_6OzDYZWl5Aim37RwvZfZ",
"businessId": "cus_HUCgMg1iqWb379FMNvaJ",
"firstName": "Ada",
"lastName": "Lovelace",
"email": "ada@example.com",
"status": "active"
}{
"code": 400,
"message": "Cardholder could not be created",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "ERRCRD_1010",
"message": "Cardholder could not be created",
"field": null
}
]
}{
"code": 401,
"message": "Partner API key required",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "ERRCORE_1004",
"message": "Partner API key required",
"field": null
}
]
}{
"code": 403,
"message": "Access denied / missing cards permission",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "ERRCORE_1005",
"message": "Access denied / missing cards permission",
"field": null
}
]
}{
"code": 404,
"message": "Reference not found",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "ERRREF_1001",
"message": "Reference not found",
"field": "userId"
}
]
}Authorizations
Partner API key. Must carry the cards permission.
Headers
The API version this request targets. 2026-09.1. See Versioning.
Pattern:
^\d{4}-\d{2}\.\d+$Path Parameters
Your business customer, cus_…, enabled for cards.
Body
application/json
Non-blank.
Non-blank.
Valid email. Must not already be an Endl account or another business's cardholder.
Digits — "1". Required with phoneNumber.
Digits, unique across cardholders. Required with phoneCountryCode.