Create a consumer
curl --request POST \
--url https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"first_name": "Jane",
"last_name": "Doe",
"date_of_birth": "1990-05-15",
"ssn": "123-45-6789",
"phone": "+15551234567",
"email": "jane.doe@example.com",
"address": {
"street": "123 Main St",
"city": "Austin",
"state": "TX",
"postal_code": "73301",
"country": "US"
},
"external_id": "sp-user-001"
}
'import requests
url = "https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers"
payload = {
"first_name": "Jane",
"last_name": "Doe",
"date_of_birth": "1990-05-15",
"ssn": "123-45-6789",
"phone": "+15551234567",
"email": "jane.doe@example.com",
"address": {
"street": "123 Main St",
"city": "Austin",
"state": "TX",
"postal_code": "73301",
"country": "US"
},
"external_id": "sp-user-001"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Jane',
last_name: 'Doe',
date_of_birth: '1990-05-15',
ssn: '123-45-6789',
phone: '+15551234567',
email: 'jane.doe@example.com',
address: {
street: '123 Main St',
city: 'Austin',
state: 'TX',
postal_code: '73301',
country: 'US'
},
external_id: 'sp-user-001'
})
};
fetch('https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers', 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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers",
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([
'first_name' => 'Jane',
'last_name' => 'Doe',
'date_of_birth' => '1990-05-15',
'ssn' => '123-45-6789',
'phone' => '+15551234567',
'email' => 'jane.doe@example.com',
'address' => [
'street' => '123 Main St',
'city' => 'Austin',
'state' => 'TX',
'postal_code' => '73301',
'country' => 'US'
],
'external_id' => 'sp-user-001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers"
payload := strings.NewReader("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-05-15\",\n \"ssn\": \"123-45-6789\",\n \"phone\": \"+15551234567\",\n \"email\": \"jane.doe@example.com\",\n \"address\": {\n \"street\": \"123 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\",\n \"country\": \"US\"\n },\n \"external_id\": \"sp-user-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-05-15\",\n \"ssn\": \"123-45-6789\",\n \"phone\": \"+15551234567\",\n \"email\": \"jane.doe@example.com\",\n \"address\": {\n \"street\": \"123 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\",\n \"country\": \"US\"\n },\n \"external_id\": \"sp-user-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-05-15\",\n \"ssn\": \"123-45-6789\",\n \"phone\": \"+15551234567\",\n \"email\": \"jane.doe@example.com\",\n \"address\": {\n \"street\": \"123 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\",\n \"country\": \"US\"\n },\n \"external_id\": \"sp-user-001\"\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Jane",
"last_name": "Doe",
"middle_name": null,
"date_of_birth": "1990-05-15",
"phone": "+15551234567",
"email": "jane.doe@example.com",
"address": {
"street": "123 Main St",
"city": "Austin",
"state": "TX",
"postal_code": "73301",
"country": "US"
},
"external_id": "sp-user-001",
"created_at": "2026-02-16T06:16:47.385Z",
"updated_at": "2026-02-16T06:16:47.385Z"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "payment_amount must be a positive integer (cents)",
"field": "payment_amount",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Missing x-api-key header",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "CONFLICT",
"message": "A consumer with this email or external_id already exists for this partner",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}Consumers
Create Consumer
Register a new consumer with PII. The SSN is encrypted at rest using PGP symmetric encryption and is never returned in any API response.
Uniqueness is enforced per-partner on email and external_id.
POST
/
consumers
Create a consumer
curl --request POST \
--url https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"first_name": "Jane",
"last_name": "Doe",
"date_of_birth": "1990-05-15",
"ssn": "123-45-6789",
"phone": "+15551234567",
"email": "jane.doe@example.com",
"address": {
"street": "123 Main St",
"city": "Austin",
"state": "TX",
"postal_code": "73301",
"country": "US"
},
"external_id": "sp-user-001"
}
'import requests
url = "https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers"
payload = {
"first_name": "Jane",
"last_name": "Doe",
"date_of_birth": "1990-05-15",
"ssn": "123-45-6789",
"phone": "+15551234567",
"email": "jane.doe@example.com",
"address": {
"street": "123 Main St",
"city": "Austin",
"state": "TX",
"postal_code": "73301",
"country": "US"
},
"external_id": "sp-user-001"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Jane',
last_name: 'Doe',
date_of_birth: '1990-05-15',
ssn: '123-45-6789',
phone: '+15551234567',
email: 'jane.doe@example.com',
address: {
street: '123 Main St',
city: 'Austin',
state: 'TX',
postal_code: '73301',
country: 'US'
},
external_id: 'sp-user-001'
})
};
fetch('https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers', 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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers",
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([
'first_name' => 'Jane',
'last_name' => 'Doe',
'date_of_birth' => '1990-05-15',
'ssn' => '123-45-6789',
'phone' => '+15551234567',
'email' => 'jane.doe@example.com',
'address' => [
'street' => '123 Main St',
'city' => 'Austin',
'state' => 'TX',
'postal_code' => '73301',
'country' => 'US'
],
'external_id' => 'sp-user-001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers"
payload := strings.NewReader("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-05-15\",\n \"ssn\": \"123-45-6789\",\n \"phone\": \"+15551234567\",\n \"email\": \"jane.doe@example.com\",\n \"address\": {\n \"street\": \"123 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\",\n \"country\": \"US\"\n },\n \"external_id\": \"sp-user-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-05-15\",\n \"ssn\": \"123-45-6789\",\n \"phone\": \"+15551234567\",\n \"email\": \"jane.doe@example.com\",\n \"address\": {\n \"street\": \"123 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\",\n \"country\": \"US\"\n },\n \"external_id\": \"sp-user-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vvdufluovypptsnkihyv.supabase.co/functions/v1/consumers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-05-15\",\n \"ssn\": \"123-45-6789\",\n \"phone\": \"+15551234567\",\n \"email\": \"jane.doe@example.com\",\n \"address\": {\n \"street\": \"123 Main St\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"postal_code\": \"73301\",\n \"country\": \"US\"\n },\n \"external_id\": \"sp-user-001\"\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Jane",
"last_name": "Doe",
"middle_name": null,
"date_of_birth": "1990-05-15",
"phone": "+15551234567",
"email": "jane.doe@example.com",
"address": {
"street": "123 Main St",
"city": "Austin",
"state": "TX",
"postal_code": "73301",
"country": "US"
},
"external_id": "sp-user-001",
"created_at": "2026-02-16T06:16:47.385Z",
"updated_at": "2026-02-16T06:16:47.385Z"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "payment_amount must be a positive integer (cents)",
"field": "payment_amount",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Missing x-api-key header",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "CONFLICT",
"message": "A consumer with this email or external_id already exists for this partner",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred",
"request_id": "4e9024e3-125d-4d08-a392-4fa34f6bda44"
}
}Authorizations
API key in the format sk_live_<token> (production) or sk_test_<token> (sandbox).
Contact Cove to obtain your API key.
Body
application/json
Required string length:
1 - 25Required string length:
1 - 25YYYY-MM-DD
E.164 format
Pattern:
^\+\d{10,15}$Show child attributes
Show child attributes
Maximum string length:
25SSN (XXX-XX-XXXX or XXXXXXXXX). Encrypted at rest, never returned.
Pattern:
^\d{3}-?\d{2}-?\d{4}$Your internal ID for this consumer
Maximum string length:
255⌘I