DKBSignDocs

API reference

POSTRequires Bearer token

Find or create a client by email

/api/clients/ensure

Idempotent on email. Same body as create. Duplicate → 200 { created: false }; new → 201 { created: true }. Only id is returned (no extra PII). Throttled (60/min).

Path parameters

This endpoint has no path parameters.

Query parameters

This endpoint has no query parameters.

Request body

FieldTypeDescription
name
Required
stringLast name (max 191).
e.g. "Dupont"
firstname
Required
stringFirst name (max 191).
e.g. "Marie"
cni_number
Required
stringID document number (max 191).
e.g. "CI123456"
phone
Required
stringPhone (max 30).
e.g. "+2250700000000"
email
Required
stringEmail, unique per company (normalized lowercase).
e.g. "marie@example.com"
motif_demande
Required
stringRequest reason (max 191).
e.g. "Account opening"

Responses

StatusMeaning
200Existing client
401Missing or invalid Bearer token.

Request

curl
curl -X POST 'https://api.dkbsigns.com/api/clients/ensure' \
  -H 'Authorization: Bearer $DKBSIGN_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Dupont","firstname":"Marie","cni_number":"CI123456","phone":"+2250700000000","email":"marie@example.com","motif_demande":"Account opening"}'

Response 200

json
{
  "message": "Client déjà enregistré",
  "created": false,
  "client": {
    "id": 12
  }
}