Calendars API
Create and manage calendars, the containers that hold events.
Authentication
- Every endpoint requires the
manage_optionscapability. Send a cookie plusX-WP-Nonce, or use an Application Password.
Endpoints
| Method | Path | Operation | What it does |
|---|---|---|---|
GET | /calendars | List Calendars | Returns every calendar with its event and guest counts, plus a count per status for the tabs. |
GET | /calendars/options | List Calendar Options | Returns calendars as dropdown options: ID, title, status and meta only, with no counts. |
GET | /calendars/{id} | Get Calendar | Returns one calendar with its creator's name and its event and guest totals. |
POST | /calendars | Create Calendar | Creates a calendar. The current user becomes its creator. |
PATCH | /calendars/{id} | Update Calendar | Updates a calendar. Send the full calendar: every required field is validated again. |
DELETE | /calendars/{id} | Delete Calendar | Deletes a calendar and every event in it, with their guests. |