This project uses Scribe to generate API documentation.
You can access the full interactive documentation by visiting /docs in your browser.
This API uses Bearer Token authentication (via Laravel Sanctum).
To access protected endpoints, you must provide the token in the Authorization header.
Header Format:
Authorization: Bearer <your-token>
POST /api/auth/login- Log in and obtain an API token.
GET /api/votes- Retrieve a list of available votes.GET /api/votes/{id}- Retrieve details of a specific vote.
POST /api/user-votes- Cast a vote for a specific vote.GET /api/user-votes/{id}- Retrieve your cast vote for a specific vote (where{id}is the vote ID).
Login:
// POST /api/auth/login
{
"email": "test@example.com",
"password": "password",
"device_name": "my-device"
}Cast Vote:
// POST /api/user-votes
{
"vote_id": 1,
"podcast_id": 1
}