Gyvar docs

Create a customer

Returns 201 for a new customer, and 200 if this `reference` already names one with the same details. Different details return 409 `reference_conflict`; use Update a customer to change them. Needs the `receive` capability.

POST
/customers

Authorization

KeyID Timestamp Nonce Signature
X-Gyvar-Key<token>

Your key id, gyv_k_live_... or gyv_k_sandbox_....

In: header

X-Gyvar-Timestamp<token>

Unix seconds. Must be within 5 minutes of our clock.

In: header

X-Gyvar-Nonce<token>

A unique value per request. Replays are rejected.

In: header

X-Gyvar-Signature<token>

Ed25519 signature over the canonical string. See the Signing guide.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

type?string
Default"individual"

Value in

  • "individual"
  • "business"
first_name?string

Required for an individual. Optional contact for a business.

Lengthlength <= 60
last_name?string

Required for an individual. Optional contact for a business.

Lengthlength <= 60
business_name?string

Required for a business. Not allowed for an individual.

Lengthlength <= 120
email?string
Formatemail
phone?string
country?string

ISO 3166-1 alpha-2.

reference*string

Your id for this customer, and the idempotency key.

Lengthlength <= 128

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/customers" \  -H "Content-Type: application/json" \  -d '{    "reference": "user_8812",    "first_name": "Ama",    "last_name": "Mensah",    "email": "ama@example.com",    "country": "GH"  }'
{  "data": {    "id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "reference": "customer_8842",    "type": "individual",    "first_name": "Ama",    "last_name": "Owusu",    "email": "ama.owusu@example.com",    "phone": "+233244000000",    "country": "GH",    "tags": [      "wholesale"    ],    "archived": false,    "created_at": "2026-08-14T08:30:00Z"  }}