DKBSignDocs

API reference

POSTRequires Bearer token

Create LDAP connection

/api/contacts/ldap-connections

Bind password is encrypted at rest and never returned (has_bind_password only). Default search filter is (&(objectClass=person)(mail=*)).

Path parameters

This endpoint has no path parameters.

Query parameters

This endpoint has no query parameters.

Request body

FieldTypeDescription
name
Required
stringConnection label.
e.g. "Corporate AD"
host
Required
stringLDAP host.
e.g. "ldap.acme.test"
port
integerLDAP port (default 389).
e.g. 389
use_ssl
booleanUse LDAPS.
e.g. false
bind_dn
stringBind DN.
e.g. "cn=reader,dc=acme,dc=test"
bind_password
stringBind password (stored encrypted).
base_dn
Required
stringSearch base DN.
e.g. "ou=people,dc=acme,dc=test"
search_filter
stringLDAP search filter.
e.g. "(&(objectClass=person)(mail=*))"
attribute_map
objectMap contact fields → LDAP attributes. Defaults: first_name→givenName, last_name→sn, email→mail, phone→telephoneNumber, title→title, company→company.
active
booleanWhether the connection can be used (default true).
e.g. true

Responses

StatusMeaning
201Connection created
401Missing or invalid Bearer token.

Request

curl
curl -X POST 'https://api.dkbsigns.com/api/contacts/ldap-connections' \
  -H 'Authorization: Bearer $DKBSIGN_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Corporate AD","host":"ldap.acme.test","base_dn":"ou=people,dc=acme,dc=test","port":389,"use_ssl":false,"bind_dn":"cn=reader,dc=acme,dc=test","search_filter":"(&(objectClass=person)(mail=*))","active":true}'

Response 201

json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "Corporate AD",
  "host": "ldap.acme.test",
  "has_bind_password": true
}