Skip to main content
POST
/
customers
Create customer
curl --request POST \
  --url https://api.fernhq.com/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "john.doe@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "businessName": "John Doe Inc."
}
'
import requests

url = "https://api.fernhq.com/customers"

payload = {
"email": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"businessName": "John Doe Inc."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'john.doe@example.com',
firstName: 'John',
lastName: 'Doe',
businessName: 'John Doe Inc.'
})
};

fetch('https://api.fernhq.com/customers', 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.fernhq.com/customers",
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([
'email' => 'john.doe@example.com',
'firstName' => 'John',
'lastName' => 'Doe',
'businessName' => 'John Doe Inc.'
]),
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.fernhq.com/customers"

payload := strings.NewReader("{\n \"email\": \"john.doe@example.com\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"businessName\": \"John Doe Inc.\"\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.fernhq.com/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"john.doe@example.com\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"businessName\": \"John Doe Inc.\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.fernhq.com/customers")

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 \"email\": \"john.doe@example.com\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"businessName\": \"John Doe Inc.\"\n}"

response = http.request(request)
puts response.read_body
{
  "customerId": "03b7030f-6da1-4d76-9352-cdebd82112c8",
  "customerStatus": "ACTIVE",
  "customerType": "INDIVIDUAL",
  "name": "John Doe",
  "email": "johndoe@example.com",
  "verificationLink": "https://forms.fernhq.com/verify-customer/03b7030f-6da1-4d76-9352-cdebd82112c8",
  "updatedAt": "2023-10-01T12:00:00Z",
  "organizationId": "8469411c-48c1-4e26-a032-44688be9cb4b"
}

Authorizations

Authorization
string
header
required

To authenticate server-side requests

Body

application/json

Request payload for creating a new customer account with optional KYC data

Request payload for creating a new customer account with optional KYC data

customerType
enum<string>
required

The type of customer - either individual or business

Available options:
INDIVIDUAL,
BUSINESS
email
string<email>
required

Email of the customer

Example:

"john.doe@example.com"

firstName
string

First name of the customer

Example:

"John"

lastName
string

Last name of the customer

Example:

"Doe"

businessName
string

Name of the business

Example:

"John Doe Inc."

kycData
KYC Data (Create) · object

Optional KYC data for immediate verification submission.

kybData
KYB Data (Create) · object

Optional KYB data for immediate verification submission.

Response

Response schema for a customer retrieval request

Response schema for a customer retrieval request

customerId
string<uuid>
required

Unique identifier of the customer

Example:

"abc123"

customerStatus
enum<string>
required

Current status of the customer

Available options:
CREATED,
UNDER_REVIEW,
NEEDS_ADDITIONAL_INFORMATION,
ACTIVE,
REJECTED,
DEACTIVATED
Example:

"ACTIVE"

email
string<email>
required

Email of the customer

Example:

"john.doe@example.com"

customerType
enum<string>
required

The type of customer - either individual or business

Available options:
INDIVIDUAL,
BUSINESS
name
string
required

Full name of the customer or business

Example:

"John Doe"

URL for KYC/KYB verification process

Example:

"https://forms.fernhq.com/verify-customer/0423300f-ae6d-4e82-8afb-a3b430e22e29"

updatedAt
string<date-time>
required

Timestamp of the last status update

organizationId
string
required

Organization identifier

Example:

"8469411c-48c1-4e26-a032-44688be9cb4b"

availablePaymentMethods
string[]

Available payment methods for the customer

Example:
[
"ACH",
"WIRE",
"SEPA",
"CA_INTERAC",
"IN_NEFT_RTGS_IMPS",
"ARBITRUM",
"BASE",
"ETHEREUM",
"OPTIMISM",
"POLYGON",
"SOLANA"
]
verificationIssues
Verification Issue · object[]

Current verification issues blocking customer approval. Only present for customers in NEEDS_ADDITIONAL_INFORMATION, UNDER_REVIEW, or REJECTED status.

Example:
[
{
"code": "DOCUMENT_MISSING_BACK",
"message": "Please upload clear photos of both the front and back of your ID.",
"timestamp": "2023-10-01T12:00:00Z"
}
]