Content APIs
Actions, News, and Events APIs
Content APIs
Endpoints for managing Actions, News Articles, and Events.
Base URL: https://ycwadelaide.adenmgb.com
Authentication: All endpoints require Authorization: Bearer <token> header.
Quick Links
- Actions API - Manage YCW actions
- News API - Manage news articles
- Events API - Manage events
- Tags API - Manage content tags
Common Patterns
All content APIs follow similar patterns:
- GET /api/staff/{type} - List all items (published and draft)
- GET /api/staff/{type}/:id - Get single item with full details
- POST /api/staff/{type} - Create new item (saved as draft)
- PUT /api/staff/{type}/:id - Update existing item
- DELETE /api/staff/{type}/:id - Delete item
- POST /api/staff/{type}/bulk - Bulk operations
Approval Workflow
All content goes through approval workflow:
- Create → Content saved as
draft - Request Approval → Status changes to
pending - Approve → Status changes to
approved, content published - Reject → Status changes to
rejected, returns to draft
See Approval API for details.
Actions API
GET /api/staff/actions
Retrieve all actions (both published and draft).
Response:
Notes:
- Results ordered by
displayOrderASC, thenidASC - Draft actions have
slug: nullandpublished: false iconmust be valid Heroicon component namegradientClassandaccentClassare Tailwind CSS classes
POST /api/staff/actions
Create a new action.
Request Body:
Important: All new content is created as draft. Publishing requires approval workflow.
PUT /api/staff/actions/:id
Update an existing action.
Request Body: (Same as POST, all fields optional)
Note: Content can only be published if approvalStatus is "approved".
DELETE /api/staff/actions/:id
Delete an action. This action cannot be undone.
POST /api/staff/actions/bulk
Bulk operations on multiple actions.
Request Body:
News API
GET /api/staff/news
Retrieve all news articles (both published and draft).
Response:
Notes:
- Results ordered by
publishedAtDESC, thencreatedAtDESC categoryis optional string value- Content and tags not included in list - use detail endpoint
POST /api/staff/news
Create a new news article.
Request Body:
Important: All new content is created as draft. Publishing requires approval workflow.
PUT /api/staff/news/:id
Update an existing news article.
Request Body: (Same as POST, all fields optional)
Note: tagIds replaces all existing tags. Send empty array [] to remove all tags.
DELETE /api/staff/news/:id
Delete a news article. This action cannot be undone.
POST /api/staff/news/bulk
Bulk operations on multiple news articles.
Request Body:
Events API
GET /api/staff/events
Retrieve all events (both published and draft).
Response:
Notes:
- Results ordered by
startDateASC (upcoming events first) endDateis optional (single-day events)- Dates in ISO 8601 format (UTC recommended)
POST /api/staff/events
Create a new event.
Request Body:
Important: startDate is required. endDate is optional.
PUT /api/staff/events/:id
Update an existing event.
Request Body: (Same as POST, all fields optional)
DELETE /api/staff/events/:id
Delete an event. This action cannot be undone.
POST /api/staff/events/bulk
Bulk operations on multiple events.
Request Body:
Tags API
GET /api/staff/tags
Retrieve all tags.
Response:
Notes:
- Results ordered by
nameASC (alphabetical) - Tags have both
name(display) andslug(URL-friendly)
POST /api/staff/tags
Create a new tag.
Request Body:
Response:
PUT /api/staff/tags/:id
Update an existing tag.
Request Body:
DELETE /api/staff/tags/:id
Delete a tag. This removes the tag from all associated content.
Related Guides
- Approval APIs - Approval workflow
- Media APIs - Image uploads
- Public APIs - Public endpoints