REST API Introduction
SportsPress 2.0 introduced endpoints for the WP REST API, enabling programmatic access to manage site data. The plugin requires the WP REST API plugin (version 2) for basic functionality. WordPress 4.7 and later include the REST API natively — no additional plugin is required on modern WordPress installs.
GET requests (reading data) require no authentication. POST, PUT, and DELETE requests (creating, updating, or deleting data) require authentication.
Base URL
All SportsPress REST API endpoints are available under:
/wp-json/sportspress/v2/
Replace example.com with your site's domain:
https://example.com/wp-json/sportspress/v2/events
Available Endpoints
Resource | Endpoint |
Events |
|
Teams |
|
Players |
|
Staff |
|
Calendars |
|
League Tables |
|
Player Lists |
|
Each endpoint supports standard WordPress REST API conventions: list all resources with GET, retrieve a single resource with GET /{id}, create with POST, update with PUT or PATCH, and delete with DELETE.
HTTP Methods
Method | Action |
| Retrieve one or more resources |
| Create a new resource |
| Update an existing resource |
| Delete a resource |
Authentication
Authentication is required for all write operations. See the Authentication article for setup instructions using Application Passwords and Postman.
Known Limitations
Players created via the REST API may not appear automatically in player lists. After creating a player via API, manually assign the player to the relevant team in the admin, or ensure the player list is configured to include that team.
Scheduled (future) events require the
futurestatus value when creating via API.The
_fieldsquery parameter is supported for filtering response fields (available in SportsPress Pro 2.7.16 and later after a fix for an API error with_fields).
