API versions
Frappe supports multiple API versions:- V1:
/api/v1/*(also available at/api/*for backward compatibility) - V2:
/api/v2/*(recommended)
Endpoint types
The REST API provides two main types of endpoints:Resource endpoints
Auto-generated CRUD endpoints for all DocTypes in your application:Method endpoints
Call whitelisted Python methods via the API:Base URL
All API requests are made to your Frappe site’s domain:Request format
Query parameters
For GET requests, pass parameters as query strings:Request body
For POST, PUT, and PATCH requests, send data as JSON:Response format
V1 response structure
V2 response structure
Error handling
Errors are returned with appropriate HTTP status codes and error messages:200- Success201- Created202- Accepted (for async operations)400- Bad request401- Unauthorized403- Forbidden404- Not found417- Expectation failed (validation errors)500- Internal server error
Pagination
List endpoints support pagination:has_next_page field in the response to indicate if more results are available.
Filtering
Filter results using thefilters parameter:
Field selection
Specify which fields to return:API request logging
Enable API request logging in System Settings to track all API calls. This creates records in the “API Request Log” DocType.Rate limiting
API endpoints may be rate-limited based on your server configuration. Whitelisted methods can define their own rate limits using the@rate_limit decorator.
Next steps
Authentication
Learn how to authenticate API requests
Resource endpoints
Work with DocType CRUD operations
Method endpoints
Call custom Python methods