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 |
| Method | POST |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must 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
| Parameter | Type | Description |
|---|---|---|
| host | String | Hostname or IP address of the LDAP server |
| port | Integer | Port used to connect to the LDAP server |
| base_dn | String | Base distinguished name used as the starting point for searches |
| bind_dn | String | Distinguished name of the account used to bind to the server |
| bind_password | String | Password of the bind account |
| ssl | Boolean | Indicates whether the connection uses SSL |
| enabled | Boolean | Indicates 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
| Field | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the LDAP configuration |
| host | String | Hostname or IP address of the LDAP server |
| port | Integer | Port used to connect to the LDAP server |
| base_dn | String | Base distinguished name used as the starting point for searches |
| bind_dn | String | Distinguished name of the account used to bind to the server |
| ssl | Boolean | Indicates whether the connection uses SSL |
| enabled | Boolean | Indicates whether the LDAP configuration is enabled |
| created_at | String | Creation timestamp in RFC 3339 date-time format |
| updated_at | String | Last update timestamp in RFC 3339 date-time format |
info
- A valid Bearer Token is required to access this endpoint.
- The
bind_passwordis never returned in the response for security reasons. - When
sslis set totrue, the connection to the LDAP server is secured. Make sure theportmatches the one used by the server for secure connections. - Timestamps are returned in RFC 3339 date-time format.