The Frappe client-side API provides methods for making server requests, managing events, and displaying user messages.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/frappe/frappe/llms.txt
Use this file to discover all available pages before exploring further.
Making API requests
frappe.call()
Make a server-side method call from the client.Server-side method to call (dot notation path)
Arguments to pass to the server method
Function called on successful response. Receives response object with
message propertyFunction called on error
Show a loading indicator that prevents user interaction
Custom message to show during freeze
Whether the request should be asynchronous (default: true)
HTTP method type: ‘POST’ or ‘GET’ (default: ‘POST’)
frappe.xcall()
Promise-based wrapper aroundfrappe.call() for async/await patterns.
Server-side method to call
Arguments to pass to the server method
HTTP method: ‘POST’ or ‘GET’ (default: ‘POST’)
Database methods
frappe.db.get_value()
Get a specific field value from a document.DocType name
Filters object or document name
Field name or array of field names to fetch
Callback function that receives the values
frappe.db.get_list()
Get a list of documents with filtering and pagination.DocType name
Query parameters object
Array of field names to fetch (default: [‘name’])
Filters to apply
Number of records to fetch (default: 20)
Field to sort by with direction (e.g., ‘creation desc’)
frappe.db.get_doc()
Get a complete document with all fields.frappe.db.set_value()
Set a field value in a document.frappe.db.insert()
Insert a new document.frappe.db.delete_doc()
Delete a document.Event system
frappe.on()
Bind an event handler.frappe.trigger()
Trigger an event.frappe.off()
Unbind an event handler.Realtime events
frappe.realtime.on()
Subscribe to realtime events from the server.frappe.realtime.emit()
Emit a realtime event to other users.User messages
frappe.msgprint()
Display a message dialog to the user.Message to display or options object
Dialog title
Color indicator: ‘red’, ‘green’, ‘blue’, ‘orange’, ‘yellow’
frappe.throw()
Throw an error and display it to the user.frappe.show_alert()
Show a temporary alert notification.Message to display or options object with message and indicator
How long to show the alert (default: 3)
frappe.confirm()
Show a confirmation dialog.Confirmation message
Function to call when user confirms
Function to call when user rejects