Skip to main content

Manage Content via API

All content is managed through REST endpoints under /api/admin/. Every request requires the Authorization: Bearer <ADMIN_KEY> header.

export ADMIN_KEY="your-admin-api-key"
export API="http://localhost:8000/api/admin"

Common patterns

Every content type follows the same CRUD pattern:

OperationMethodPath
List allGET/api/admin/{resource}
CreatePOST/api/admin/{resource}
UpdatePUT/api/admin/{resource}/{id}
DeleteDELETE/api/admin/{resource}/{id}
# List
curl $API/links -H "Authorization: Bearer $ADMIN_KEY"

# Create
curl -X POST $API/links -H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Blog", "url": "https://blog.example.com", "sort_order": 0}'

# Update
curl -X PUT $API/links/$LINK_ID -H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Updated Title"}'

# Delete
curl -X DELETE $API/links/$LINK_ID -H "Authorization: Bearer $ADMIN_KEY"

Products

curl -X POST $API/products -H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Course Name",
"description": "Description",
"price_cents": 2999,
"currency": "USD",
"product_type": "course",
"external_url": "https://gumroad.com/l/course"
}'

Events

curl -X POST $API/events -H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Webinar",
"start_time": "2026-04-15T18:00:00+00:00",
"end_time": "2026-04-15T19:30:00+00:00",
"max_attendees": 100
}'

Booking slots

curl -X POST $API/bookings/slots -H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"day_of_week": 1, "start_time": "09:00:00", "end_time": "09:30:00", "duration_minutes": 30}'

FAQ entries

curl -X POST $API/faq -H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "What do you do?", "answer": "I build software.", "category": "general"}'

Portfolio items

curl -X POST $API/portfolio -H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Project X", "description": "An open-source tool.", "link_url": "https://github.com/you/project-x"}'

Integrations

curl -X POST $API/integrations -H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"provider": "google", "credentials": "oauth-token", "scopes": ["calendar"]}'

See the full Admin API Reference for response schemas and all fields.