Create a new customer
POST
/api/v1/customers
const url = 'https://api.dokanmazad.com/api/v1/customers';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"Ahmed Ali","mobileNumber":"+971501234567","email":"ahmed@example.com","country":"UAE"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.dokanmazad.com/api/v1/customers \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "Ahmed Ali", "mobileNumber": "+971501234567", "email": "ahmed@example.com", "country": "UAE" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Customer full name
string
mobileNumber
required
Customer phone (E.164 preferred)
string
email
Customer email
string
idNumber
Passport or national ID number
string
country
Country code or name
string
address
Customer address
string
Examples
Exampledefault
{ "name": "Ahmed Ali", "mobileNumber": "+971501234567", "email": "ahmed@example.com", "country": "UAE"}Responses
Section titled “Responses”Success
Media typeapplication/json
object
success
required
boolean
data
required
meta
object
page
integer
limit
integer
total
integer
totalPages
integer
data
required
object
id
required
New customer CUID (use as customerId in POST /orders)
string
name
required
Customer name
string
mobileNumber
required
Customer phone
string
walletBalance
required
Initial wallet balance (0)
number
createdAt
required
Creation timestamp
string format: date-time
Examples
Examplesuccess
{ "success": true, "data": { "id": "cmoabcde000001ny11aabbcc0", "name": "Ahmed Ali", "mobileNumber": "+971501234567", "email": "ahmed@example.com", "walletBalance": 0, "createdAt": "2026-05-12T10:00:00.000Z" }}Unauthorized — missing or invalid API key
Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{ "success": false}Forbidden — route not in this key’s allowedRoutes
Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{ "success": false}Rate limit exceeded
Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{ "success": false}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying
