Skip to main content

Create LDAP Configuration

This API creates the LDAP configuration used to connect the system to an LDAP directory server for user authentication.

Endpoint Details​

URL/v1/ldap/config
MethodPOST
AuthorizationBearer Token

Request Headers​

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Body​

Use the following format to make a request:

JSON Request
{
"host": "ldap.example.com",
"port": 636,
"base_dn": "OU=Users,DC=example,DC=com",
"bind_dn": "CN=Service Account,OU=Users,DC=example,DC=com",
"bind_password": "your_bind_password",
"ssl": true,
"enabled": true
}

Parameters​

ParameterTypeDescription
hostStringHostname or IP address of the LDAP server
portIntegerPort used to connect to the LDAP server
base_dnStringBase distinguished name used as the starting point for searches
bind_dnStringDistinguished name of the account used to bind to the server
bind_passwordStringPassword of the bind account
sslBooleanIndicates whether the connection uses SSL
enabledBooleanIndicates whether the LDAP configuration is enabled

Response​

Here is an example response after the request has been successfully processed:

Response
{
"config": {
"id": "1a4026ed-013e-492e-ab0c-c0133c8fff40",
"host": "ldap.example.com",
"port": 636,
"base_dn": "OU=Users,DC=example,DC=com",
"bind_dn": "CN=Service Account,OU=Users,DC=example,DC=com",
"ssl": true,
"enabled": true,
"created_at": "2026-05-18T10:04:23+07:00",
"updated_at": "2026-07-24T14:33:56+07:00"
}
}

Field Descriptions​

FieldTypeDescription
idUUIDUnique identifier of the LDAP configuration
hostStringHostname or IP address of the LDAP server
portIntegerPort used to connect to the LDAP server
base_dnStringBase distinguished name used as the starting point for searches
bind_dnStringDistinguished name of the account used to bind to the server
sslBooleanIndicates whether the connection uses SSL
enabledBooleanIndicates whether the LDAP configuration is enabled
created_atStringCreation timestamp in RFC 3339 date-time format
updated_atStringLast update timestamp in RFC 3339 date-time format

info
  • A valid Bearer Token is required to access this endpoint.
  • The bind_password is never returned in the response for security reasons.
  • When ssl is set to true, the connection to the LDAP server is secured. Make sure the port matches the one used by the server for secure connections.
  • Timestamps are returned in RFC 3339 date-time format.