Skip to main content
POST
/
api
/
v1
/
developer
/
customers
Create customer
curl --request POST \
  --url https://api.example.com/api/v1/developer/customers
import requests

url = "https://api.example.com/api/v1/developer/customers"

response = requests.post(url)

print(response.text)
const options = {method: 'POST'};

fetch('https://api.example.com/api/v1/developer/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.example.com/api/v1/developer/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/api/v1/developer/customers"

req, _ := http.NewRequest("POST", url, nil)

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.example.com/api/v1/developer/customers")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v1/developer/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
Required scope: customers:write Rate limit: 60 requests/minute Status code on success: 201 Created Idempotency: supported – pass Idempotency-Key to safely retry. See Idempotency.

Request body

FieldTypeRequiredNotes
emailstring (email)yesMust be unique within your tenant
first_namestringnoUp to 255 characters
last_namestringnoUp to 255 characters
PII fields are stored encrypted at rest with deterministic lookup hashes used for de-duplication.

Response

{
  "id": "c0ffee00-0000-4000-8000-000000000002",
  "email": "newcustomer@example.com",
  "first_name": "Jamie",
  "last_name": "New",
  "total_ltv": "0.00",
  "created_at": "2026-04-26T01:23:45Z",
  "location_id": null
}

Errors

  • 409 "Customer with this email already exists" – a customer with that email already exists in your tenant. Look up the existing record via GET /developer/customers?search={email}.
  • 409 "Idempotency-Key was reused with a different request body. Use a fresh Idempotency-Key for a different operation." – the supplied Idempotency-Key was reused with a different request body within the 24h replay window. See Idempotency.
  • 409 "A duplicate request is already being processed. Please wait a moment and try again." – a request with the same Idempotency-Key is still in flight. Retry shortly.
  • 422 – Validation error (e.g. malformed email).

Examples

curl -X POST \
  -H "X-API-Key: vg_live_EXAMPLEdoNotUseThis123456" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "newcustomer@example.com",
    "first_name": "Jamie",
    "last_name": "New"
  }' \
  https://api.vouchergrid.com/api/v1/developer/customers
const res = await fetch(
  "https://api.vouchergrid.com/api/v1/developer/customers",
  {
    method: "POST",
    headers: {
      "X-API-Key": process.env.VOUCHERGRID_API_KEY!,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      email: "newcustomer@example.com",
      first_name: "Jamie",
      last_name: "New",
    }),
  },
);
const customer = await res.json();