Event rules
Create vote or ticket events with POST /events. Events created by the API are Premium and approved/live immediately. API events include USSD voting; the Premium commission is applied by PrinPoll and cannot be set in the request.
Amounts use integer pesewas. An API key can access only its developer's API-created events; dashboard-created events are outside the API scope.
Create a vote event
curl --request POST \
'https://api.prinpoll.com/api/partner/v1/events' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Idempotency-Key: YOUR_UNIQUE_KEY' \
--header 'Content-Type: application/json' \
--data '{ "type": "vote", "name": "Example Awards", "description": "Annual awards voting", "starts_at": "2030-01-01T00:00:00Z", "ends_at": "2030-01-02T00:00:00Z", "vote_cost": 100}'Create and manage events
| Event type | Required create fields |
|---|---|
| Vote | type, name, description, starts_at, ends_at, vote_cost |
| Ticket | type, name, description, starts_at, ends_at, event_date, venue |
Use GET /events to list your events and GET /events/{event_id} to retrieve one. PATCH /events/{event_id} updates fields that apply to that event type. PrinPoll stores uploaded images; external image URLs are not accepted.
Vote content
Add categories, then add nominees to a category. A nominee needs a name and Ghana phone number. PrinPoll generates the nominee's ussd_code; it cannot be selected or changed through the API. The generated code is used for USSD voting.
Vote packages are available for vote events. Set their name, price in pesewas, and num_of_votes; optional active dates control their availability.
Ticket content
Add ticket types to a ticket event with a name, price in pesewas, and quantity. PrinPoll reports quantity_remaining and sold. A quantity update cannot reduce stock below the number already sold.
Publish state and readiness
POST /events/{event_id}/unpublish takes an event offline across web, USSD, and widget while preserving its data and votes. POST /events/{event_id}/publish brings an event back only if the developer unpublished it; an admin unpublish cannot be undone by the developer.
An event is ready for payments when it has a category with an approved nominee (vote) or at least one ticket type (ticket). The event response includes ready_for_payments and not_ready_reason.
Results
GET /events/{event_id}/results returns live vote totals per nominee or ticket sales per type. The owning developer can read results even when a vote event does not display public results. The widget's public results route is available only when the event shows results.