Maintainers
Pricing
Enterprise
More
More
Documentation
Try Live
Rankings
Install
Blog
Docs7
Ask
New
Add Docs
LibreBooking
https://librebooking.readthedocs.io/en/latest/
Admin
LibreBooking is an open-source resource scheduling solution that provides a flexible,
...
Tokens:
108,901
Snippets:
978
Trust Score:
9.6
Update:
5 months ago
Context
Chat
Benchmark
63.67
Latest
Show doc for...
Code
Info
Show Results
Tokens:
Raw
Copy
Link
Tokens:
Raw
Copy
Link
### Get Resource Availability (curl examples) Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Examples for fetching resource availability using curl. One fetches current availability, the other fetches availability at a specific datetime. Both require authentication. ```bash # Get availability for one resource curl -s -X GET "${BASE_URL}/Web/Services/index.php/Resources/1/Availability" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" # Get availability for one resource at a specific datetime curl -s -X GET \ "${BASE_URL}/Web/Services/index.php/Resources/1/Availability?dateTime=2026-03-20T09:00:00%2B0000" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Docker Deployment for LibreBooking Source: https://librebooking.readthedocs.io/en/latest/index.html Use this command to clone the Docker repository and start LibreBooking using Docker Compose. Ensure you have Docker and Docker Compose installed. ```bash git clone https://github.com/LibreBooking/docker.git cd docker docker-compose up -d ``` -------------------------------- ### Installer URL Source: https://librebooking.readthedocs.io/en/latest/FAQ.html Access the installer using the 'Web' directory with the correct case. Ensure 'install.password' is set in config.php. ```http https://example.com/Web/install ``` -------------------------------- ### Automated Database Setup Script Source: https://librebooking.readthedocs.io/en/latest/_sources/INSTALLATION.rst.txt Execute this bash script to automate database setup and optionally load sample data. ```bash ./database_schema/setup-database.sh ``` -------------------------------- ### Docker Compose Configuration Source: https://librebooking.readthedocs.io/en/latest/_sources/INSTALLATION.rst.txt Example docker-compose.yml file for setting up LibreBooking services, including a MariaDB database. Ensure Docker and Docker Compose are installed. ```yaml name: librebooking services: db: image: linuxserver/mariadb:10.6.13 restart: always volumes: - db_data:/config environment: - PUID=1000 - PGID=1000 ``` -------------------------------- ### Set Installation Password Source: https://librebooking.readthedocs.io/en/latest/INSTALLATION.html Configure the installation password in the application settings before running the automated database setup. This password is required to access the installer. ```php return [ 'settings' => [ 'install.password' => 'your_secure_password', ] ]; ``` -------------------------------- ### Create User Account curl Example Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example using curl to send a POST request for creating a user account. Requires Content-Type header. ```bash curl -s -X POST "${BASE_URL}/Web/Services/index.php/Accounts/" \ -H "Content-Type: application/json" \ -d '{ "password": "plaintextpassword", "acceptTermsOfService": true, "firstName": "FirstName", "lastName": "LastName", "emailAddress": "email@address.com", "userName": "username", "language": "en_us", "timezone": "America/Chicago" }' ``` -------------------------------- ### Install Composer Dependencies Source: https://librebooking.readthedocs.io/en/latest/FAQ.html Run this command in the application root to install necessary PHP packages. Use --no-dev for production deployments. ```bash composer install --no-dev ``` -------------------------------- ### Automated Database Setup Script Source: https://librebooking.readthedocs.io/en/latest/INSTALLATION.html Execute the provided shell script to automate the database setup process, including schema creation, data population, and optional sample data loading. ```bash ./database_schema/setup-database.sh ``` -------------------------------- ### Configure Installation Password Source: https://librebooking.readthedocs.io/en/latest/_sources/INSTALLATION.rst.txt Set an installation password in the configuration file to access the automated installer. This password is required for security. ```php return [ 'settings' => [ 'install.password' => 'your_secure_password', ] ]; ``` -------------------------------- ### Set Installation Password Source: https://librebooking.readthedocs.io/en/latest/BASIC-CONFIGURATION.html Specify a password required for initial installation or system upgrades to ensure security. ```php 'install.password' => '', ``` -------------------------------- ### Start LibreBooking Services with Docker Compose Source: https://librebooking.readthedocs.io/en/latest/_sources/BASIC-CONFIGURATION.rst.txt Use this command to start all defined services in your docker-compose.yml file in detached mode. ```bash docker-compose up -d ``` -------------------------------- ### Install Composer Dependencies Source: https://librebooking.readthedocs.io/en/latest/DEVELOPER-README.html Installs Composer-managed tools into \/vendor\/bin, such as php-cs-fixer. Run this command in the root of the project. ```bash composer install ``` -------------------------------- ### Install Development Tools Composer Source: https://librebooking.readthedocs.io/en/latest/DEVELOPER-README.html Installs Phive-managed tools into the \/tools directory. Run this command in the root of the project. ```bash composer install-tools ``` -------------------------------- ### All Schedules Response Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example response containing a list of all schedules with their configurations. ```json { "schedules": [ { "daysVisible": 5, "id": 123, "isDefault": true, "name": "schedule name", "timezone": "timezone_name", "weekdayStart": 0, "availabilityBegin": "2021-03-08T09:56:04+0000", "availabilityEnd": "2021-03-28T09:56:04+0000", "maxResourcesPerReservation": 10, "totalConcurrentReservationsAllowed": 0, "links": [], "message": null } ], "links": [], "message": null } ``` -------------------------------- ### Install PHP Dependencies with Composer Source: https://librebooking.readthedocs.io/en/latest/INSTALLATION.html Install PHP dependencies for LibreBooking using Composer. Use '--no-dev' for production environments to exclude development dependencies. ```bash cd librebooking # Install without the developer dependencies composer install --no-dev # If you will be working on the code then use: `composer install` ``` -------------------------------- ### Check-in Reservation cURL Example Source: https://librebooking.readthedocs.io/en/latest/API.html Example of how to check into a reservation using cURL, requiring session token and user ID. ```bash curl -s -X POST "${BASE_URL}/Web/Services/index.php/Reservations/abc123/CheckIn" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Approve Reservation cURL Example Source: https://librebooking.readthedocs.io/en/latest/API.html Example of how to approve a reservation using cURL, requiring session token and user ID. ```bash curl -s -X POST "${BASE_URL}/Web/Services/index.php/Reservations/abc123/Approval" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Install LDAP Extension and Net_LDAP2 Source: https://librebooking.readthedocs.io/en/latest/LDAP-Authentication.html Install the PHP LDAP extension and the Net_LDAP2 library using package managers and Composer. The package name for the PHP extension varies by distribution. ```bash # install/enable PHP LDAP extension (package name varies by distro) # examples: # dnf install php-ldap # apt install php-ldap composer require pear/net_ldap2 ``` -------------------------------- ### Install PHP LDAP Extension and Net_LDAP2 Source: https://librebooking.readthedocs.io/en/latest/_sources/LDAP-Authentication.rst.txt Install the necessary PHP LDAP extension and the Net_LDAP2 library using Composer. The package name for the PHP extension may vary by distribution. ```bash # install/enable PHP LDAP extension (package name varies by distro) # examples: # dnf install php-ldap # apt install php-ldap composer require pear/net_ldap2 ``` -------------------------------- ### Availability JSON Response Example Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example JSON response structure for resource availability, indicating if a resource is available and relevant timestamps. ```json { "resources": [ { "available": true, "resource": { "resourceId": 1, "name": "resource name", "scheduleId": 2, "statusId": 1, "statusReasonId": 123, "links": [ { "href": "http://get-resource-url", "title": "get_resource" }, { "href": "http://get-schedule-url", "title": "get_schedule" } ], "message": null }, "availableAt": "2021-03-08T09:56:04+0000", "availableUntil": "2021-03-08T09:56:04+0000", "links": [ { "href": "http://get-user-url", "title": "get_user" }, { "href": "http://get-reservation-url", "title": "get_reservation" } ], "message": null } ], "links": [], "message": null } ``` -------------------------------- ### Set Up Database with Phing Source: https://librebooking.readthedocs.io/en/latest/INSTALLATION.html Use the Phing build tool to set up a fresh database with the latest schema for LibreBooking. Ensure Phing and MySQL support are installed. ```bash phing setup.db ``` -------------------------------- ### Get All Users with Curl Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example curl command to retrieve all users visible to the authenticated user. ```bash curl -s -X GET "${BASE_URL}/Web/Services/index.php/Users/" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Get All Groups API Response Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example JSON response when retrieving all groups. Includes group details and links. ```json { "groups": [ { "id": 1, "name": "group name", "isDefault": true, "links": [], "message": null } ], "links": [], "message": null } ``` -------------------------------- ### Get Resource Statuses using cURL Source: https://librebooking.readthedocs.io/en/latest/API.html Example cURL command to retrieve all available resource statuses. This endpoint does not require authentication. ```bash curl -s -X GET "${BASE_URL}/Web/Services/index.php/Resources/Status" ``` -------------------------------- ### Get Account API Response Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example response when retrieving an authenticated user's account information. This service is secure and requires authentication. ```json { "userId": 1, "firstName": "first", "lastName": "last", "emailAddress": "email@address.com", "userName": "username", "language": "en_us", "timezone": "America/Chicago", "phone": "phone", "organization": "organization", "position": "position", "customAttributes": [ { "id": 123, "label": "label", "value": "value", "links": [], "message": null } ] } ``` -------------------------------- ### cURL Example: Create a Basic Reservation Source: https://librebooking.readthedocs.io/en/latest/API.html This cURL command demonstrates how to create a simple reservation. Ensure to replace placeholders like ${BASE_URL}, ${SESSION_TOKEN}, and ${USER_ID} with actual values. ```bash curl -s -X POST "${BASE_URL}/Web/Services/index.php/Reservations/" \ -H "Content-Type: application/json" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" \ -d '{ "title": "Team Meeting", "description": "Weekly sync", "startDateTime": "2026-03-20T09:00:00+0000", "endDateTime": "2026-03-20T10:00:00+0000", "resourceId": 1, "userId": 1 }' ``` -------------------------------- ### Set Curl Variables Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Set these shell variables before running curl examples. BASE_URL should be your LibreBooking installation URL, and SESSION_TOKEN and USER_ID are obtained after authentication. ```bash # Base URL of your LibreBooking installation BASE_URL="https://librebooking.example.com" # Obtained from the Authenticate response SESSION_TOKEN="your-session-token" USER_ID=123 ``` -------------------------------- ### Get Custom Attribute using cURL Source: https://librebooking.readthedocs.io/en/latest/API.html Example cURL command to fetch a custom attribute definition. Ensure BASE_URL, SESSION_TOKEN, and USER_ID are set. ```bash curl -s -X GET "${BASE_URL}/Web/Services/index.php/Attributes/1" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Create Resource using cURL Source: https://librebooking.readthedocs.io/en/latest/API.html Example cURL command to create a new resource. Ensure you replace placeholders like ${BASE_URL}, ${SESSION_TOKEN}, and ${USER_ID} with your actual values. Authentication is required. ```bash curl -s -X POST "${BASE_URL}/Web/Services/index.php/Resources/" \ -H "Content-Type: application/json" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" \ -d '{ "name": "Conference Room A", "scheduleId": 1, "autoAssignPermissions": true, "description": "Main floor conference room" }' ``` -------------------------------- ### Get All Accessories Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Loads all accessories. Requires authentication. The 'creditApplicability' field indicates if credits are per slot (1) or per reservation (2). ```json { "accessories": [ { "id": 1, "name": "accessoryName", "quantityAvailable": 3, "associatedResourceCount": 10, "creditCount": 1, "peakCreditCount": 2, "creditApplicability": 1, "creditsChargedAllSlots": null, "links": [], "message": null } ], "links": [], "message": null } ``` ```bash curl -s -X GET "${BASE_URL}/Web/Services/index.php/Accessories/" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Get Availability from a Specific Point in Time Source: https://librebooking.readthedocs.io/en/latest/API.html Fetch resource availability starting from a specified dateTime. The dateTime parameter should be URL-encoded. This requires authentication with SESSION_TOKEN and USER_ID. ```curl # Get availability from a specific point in time curl -s -X GET \ "${BASE_URL}/Web/Services/index.php/Resources/Availability?dateTime=2026-03-20T09:00:00%2B0000" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Copy Configuration Template Source: https://librebooking.readthedocs.io/en/latest/BASIC-CONFIGURATION.html Copy the default configuration file to create your own. ```bash cp /config/config.dist.php /config/config.php ``` -------------------------------- ### Get Specific Group API Response Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example JSON response for a specific group, including its ID, name, admin group URL, permissions, and user associations. ```json { "id": 123, "name": "group name", "adminGroup": "http://url/to/group", "permissions": [ "http://url/to/resource" ], "viewPermissions": [ "http://url/to/resource" ], "users": [ "http://url/to/user" ], "roles": [ 1, 2 ], "isDefault": true, "links": [], "message": null } ``` -------------------------------- ### Create User with Curl Source: https://librebooking.readthedocs.io/en/latest/API.html Example of how to create a user using curl. Ensure to replace placeholders like ${BASE_URL}, ${SESSION_TOKEN}, and ${USER_ID} with actual values. Authentication is required. ```bash curl -s -X POST "${BASE_URL}/Web/Services/index.php/Users/" \ -H "Content-Type: application/json" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" \ -d '{ "password": "unencrypted password", "language": "en_us", "firstName": "first", "lastName": "last", "emailAddress": "email@address.com", "userName": "username", "timezone": "America/Chicago", "groups": [1, 2] }' ``` -------------------------------- ### Get Category Attributes (curl Example) Source: https://librebooking.readthedocs.io/en/latest/API.html Use this curl command to retrieve all custom attribute definitions for a specific category. Replace ':categoryId' with the desired category ID (e.g., 1 for reservation). ```bash curl -s -X GET "${BASE_URL}/Web/Services/index.php/Attributes/Category/1" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Using .env Files for Configuration Source: https://librebooking.readthedocs.io/en/latest/_sources/ADVANCED-CONFIGURATION.rst.txt Create a .env file in the application root directory to automatically load and use environment variables for configuration overrides. ```bash LB_APP_TITLE='My Company Booking' LB_DATABASE_HOSTSPEC='db.example.com' LB_ADMIN_EMAIL='admin@mycompany.com' ``` -------------------------------- ### Configure Database Connection Source: https://librebooking.readthedocs.io/en/latest/BASIC-CONFIGURATION.html Set up the database connection details, including type, host, name, user, and password. ```php 'database' => [ 'type' => 'mysql', 'hostspec' => '127.0.0.1', 'name' => 'librebooking', 'user' => 'lb_user', 'password' => 'password', ], ``` -------------------------------- ### Start Docker Services Source: https://librebooking.readthedocs.io/en/latest/BASIC-CONFIGURATION.html Command to start the Docker services defined in your docker-compose.yml file in detached mode. ```bash docker-compose up -d ``` -------------------------------- ### Configure Database Connection Source: https://librebooking.readthedocs.io/en/latest/INSTALLATION.html Set up the database connection details in the `config/config.php` file. Ensure the database user has the necessary privileges. ```php return [ 'settings' => [ 'database' => [ 'type' => 'mysql', 'user' => 'lb_user', // Database user with permission to access the LibreBooking database 'password' => 'password', // Database password 'hostspec' => '127.0.0.1', // IP address, DNS name, or named pipe 'name' => 'librebooking', // Name of the database used by LibreBooking ], ] ]; ``` -------------------------------- ### Get All Resources Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Retrieves a list of all available resources. Requires authentication with session token and user ID. ```bash curl -s -X GET "${BASE_URL}/Web/Services/index.php/Resources/" -H "X-Booked-SessionToken: ${SESSION_TOKEN}" -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Example Crontab Entries for Scheduled Jobs Source: https://librebooking.readthedocs.io/en/latest/_sources/BASIC-CONFIGURATION.rst.txt Set up host cron entries to execute LibreBooking job scripts directly with PHP. Adjust the PHP binary path and LibreBooking path as needed. ```text * * * * * /usr/bin/env php -f /var/www/librebooking/Jobs/autorelease.php * * * * * /usr/bin/env php -f /var/www/librebooking/Jobs/sendreminders.php * * * * * /usr/bin/env php -f /var/www/librebooking/Jobs/sendmissedcheckin.php * * * * * /usr/bin/env php -f /var/www/librebooking/Jobs/sendwaitlist.php 0 0 * * * /usr/bin/env php -f /var/www/librebooking/Jobs/sendseriesend.php 0 0 * * * /usr/bin/env php -f /var/www/librebooking/Jobs/sessioncleanup.php 0 1 * * * /usr/bin/env php -f /var/www/librebooking/Jobs/deleteolddata.php ``` -------------------------------- ### Get Account Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Gets the currently authenticated user's account information. This service is secure and requires authentication. ```APIDOC ## GET /Web/Services/index.php/Accounts/:userId ### Description Gets the currently authenticated user's account information. This service is secure and requires authentication. ### Method GET ### Endpoint /Web/Services/index.php/Accounts/:userId ### Parameters #### Path Parameters - **userId** (integer) - Required - The ID of the user account to retrieve. ### Response #### Success Response (200) - **userId** (integer) - The unique identifier for the user. - **firstName** (string) - The user's first name. - **lastName** (string) - The user's last name. - **emailAddress** (string) - The user's email address. - **userName** (string) - The desired username. - **language** (string) - The user's preferred language (e.g., "en_us"). - **timezone** (string) - The user's timezone (e.g., "America/Chicago"). - **phone** (string) - The user's phone number. - **organization** (string) - The user's organization. - **position** (string) - The user's position within the organization. - **customAttributes** (array) - A list of custom attributes for the user. - **id** (integer) - The ID of the attribute. - **label** (string) - The label of the attribute. - **value** (string) - The value of the attribute. - **links** (array) - A list of related actions or resources for the attribute. - **message** (null) - A message associated with the attribute response. #### Response Example ```json { "userId": 1, "firstName": "first", "lastName": "last", "emailAddress": "email@address.com", "userName": "username", "language": "en_us", "timezone": "America/Chicago", "phone": "phone", "organization": "organization", "position": "position", "customAttributes": [ { "id": 123, "label": "label", "value": "value", "links": [], "message": null } ] } ``` ``` -------------------------------- ### Resource JSON Response Example Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example JSON response structure for a resource, detailing its properties and custom attributes. ```json { "resources": [ { "resourceId": 123, "name": "resource name", "location": "location", "contact": "contact", "notes": "notes", "minLength": "2 minutes", "maxLength": "2 minutes", "requiresApproval": true, "allowMultiday": true, "maxParticipants": 10, "minNoticeAdd": "2 minutes", "minNoticeUpdate": "2 minutes", "minNoticeDelete": "2 minutes", "maxNotice": "2 minutes", "description": "resource description", "scheduleId": 123, "icsUrl": null, "statusId": 1, "statusReasonId": 3, "customAttributes": [ { "id": 123, "label": "label", "value": "value", "links": [], "message": null } ], "typeId": 2, "groupIds": null, "bufferTime": "1 hours 30 minutes", "autoReleaseMinutes": 15, "requiresCheckIn": true, "color": "#ffffff", "credits": 3, "peakCredits": 6, "creditApplicability": 1, "creditsChargedAllSlots": true, "maxConcurrentReservations": 1, "links": [], "message": null } ], "links": [], "message": null } ``` -------------------------------- ### Get All Resources Source: https://librebooking.readthedocs.io/en/latest/API.html Loads all resources. Optional query parameters include `scheduleId` and `groupId` for filtering. Authentication is required. ```bash curl -s -X GET "${BASE_URL}/Web/Services/index.php/Resources/" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` ```bash curl -s -X GET "${BASE_URL}/Web/Services/index.php/Resources/?scheduleId=1" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Check-out Reservation cURL Example Source: https://librebooking.readthedocs.io/en/latest/API.html Example of how to check out of a reservation using cURL, requiring session token and user ID. ```bash curl -s -X POST "${BASE_URL}/Web/Services/index.php/Reservations/abc123/CheckOut" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Configure SimpleSAMLphp Paths in LibreBooking Source: https://librebooking.readthedocs.io/en/latest/SAML-Configuration.html Specify the filesystem paths for SimpleSAMLphp's root and configuration directory within LibreBooking's SAML plugin configuration. ```PHP $conf['settings']['simplesamlphp.lib'] = '/home/username/simplesamlphp'; $conf['settings']['simplesamlphp.config'] = '/home/username/simplesamlphp/config'; ``` -------------------------------- ### Check LibreBooking Application Container Logs Source: https://librebooking.readthedocs.io/en/latest/_sources/BASIC-CONFIGURATION.rst.txt View the logs for the LibreBooking application container to troubleshoot startup issues. ```bash docker-compose logs app ``` -------------------------------- ### Get Account Details Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Retrieves details for a specific account using a GET request. Requires session and user tokens for authentication. ```bash curl -s -X GET "${BASE_URL}/Web/Services/index.php/Accounts/1" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" ``` -------------------------------- ### Migrate Configuration to New Format (Bash) Source: https://librebooking.readthedocs.io/en/latest/_sources/CONFIGURATION.rst.txt Command-line script to migrate LibreBooking's configuration from an older format to the modern array return format. It can write to a sibling file or a specified output path. ```bash php scripts/migrate-config.php config/config.php ``` ```bash php scripts/migrate-config.php config/config.php /tmp/config.new.php ``` -------------------------------- ### Status Reasons JSON Response Example Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example JSON response structure for resource status reasons, including ID and description. ```json { "reasons": [ { "id": 1, "description": "reason description", "statusId": 2 } ], "links": [], "message": null } ``` -------------------------------- ### Configure User Registration Settings Source: https://librebooking.readthedocs.io/en/latest/_sources/BASIC-CONFIGURATION.rst.txt Set up user registration options, including enabling self-registration, CAPTCHA, email activation, and admin notifications. ```php 'registration' => [ 'allow.self.registration' => true, 'captcha.enabled' => true, 'require.email.activation' => false, 'notify.admin' => false, ], ``` -------------------------------- ### Update Password curl Example Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example using curl to update a user's password. Requires authentication headers and Content-Type. ```bash curl -s -X POST "${BASE_URL}/Web/Services/index.php/Accounts/1/Password" \ -H "Content-Type: application/json" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" \ -d '{"currentPassword": "oldpassword", "newPassword": "newpassword"}' ``` -------------------------------- ### Update User Account curl Example Source: https://librebooking.readthedocs.io/en/latest/_sources/API.rst.txt Example using curl to update a user account. Requires authentication headers and Content-Type. ```bash curl -s -X POST "${BASE_URL}/Web/Services/index.php/Accounts/1" \ -H "Content-Type: application/json" \ -H "X-Booked-SessionToken: ${SESSION_TOKEN}" \ -H "X-Booked-UserId: ${USER_ID}" \ -d '{ "firstName": "FirstName", "lastName": "LastName", "emailAddress": "email@address.com", "userName": "username", "language": "en_us", "timezone": "America/Chicago" }' ```