Authentication conventions
The reference below is generated from the key-authenticated route families in the supplied OpenAPI specification. Routes outside the API-key surface are excluded. Secret-key server routes use Authorization: Bearer sk_live_xxx; widget routes use publishable key query parameters. GET /me accepts either key type.
Endpoints
delete/api/partner/v1/categories/{category_id}Delete Category
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
category_id | path | Yes | string | — |
Request body
No request body.
Responses
204 Successful Response
No response body schema is specified.
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
DELETE /api/partner/v1/categories/{category_id}
curl --request DELETE 'https://api.prinpoll.com/api/partner/v1/categories/CATEGORY_ID' \
--header 'Authorization: Bearer sk_live_xxx'patch/api/partner/v1/categories/{category_id}Update Category
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
category_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
name | string or null | No | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
200 Successful Response
JSON response fields — CategoryOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
event_id | string | Yes | — |
name | string | Yes | — |
nominees_count | integer | Yes | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
PATCH /api/partner/v1/categories/{category_id}
curl --request PATCH 'https://api.prinpoll.com/api/partner/v1/categories/CATEGORY_ID' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Content-Type: application/json' \
--data-raw '{}'post/api/partner/v1/categories/{category_id}/nomineesCreate Nominee
Add a nominee. PrinPoll generates its ussd_code (unique on the platform); it can't be chosen or changed through the API.
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
category_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | — |
phone_number | string | Yes | Ghana number; PrinPoll texts the nominee their code |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
201 Successful Response
JSON response fields — NomineeOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
event_id | string | Yes | — |
category_id | string | Yes | — |
name | string | Yes | — |
phone_number | string or null | No | — |
image_url | string or null | No | — |
ussd_code | string | Yes | PrinPoll-generated, unique on the platform; voters dial it on USSD |
status | string | Yes | — |
votes | integer | Yes | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/categories/{category_id}/nominees
curl --request POST 'https://api.prinpoll.com/api/partner/v1/categories/CATEGORY_ID/nominees' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Idempotency-Key: YOUR_UNIQUE_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Example event",
"phone_number": "PAYER_PHONE_NUMBER"
}'get/api/partner/v1/eventsList Events
Your API events, newest first.
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
type | query | No | vote | ticket or null | — |
published | query | No | boolean or null | — |
limit | query | No | integer | — |
starting_after | query | No | string or null | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — Page_EventOut_
| Field | Type | Required | Notes |
|---|---|---|---|
data | EventOut[] | Yes | — |
data[].id | string | No | — |
data[].type | vote | ticket | No | — |
data[].source | string | No | — |
data[].name | string | No | — |
data[].description | string or null | No | — |
data[].image_url | string or null | No | — |
data[].stage | string | No | — |
data[].starts_at | string or null | No | — |
data[].ends_at | string or null | No | — |
data[].plan | string | No | — |
data[].commission_bps | integer or null | No | PrinPoll's Premium commission for this event |
data[].published | boolean | No | Online and selling (unless not ready) |
data[].offline_reason | unpublished | developer_suspended or null | No | — |
data[].unpublished_by | developer | admin or null | No | — |
data[].unpublish_reason | string or null | No | — |
data[].ready_for_payments | boolean | No | — |
data[].not_ready_reason | string or null | No | — |
data[].public_url | string or null | No | — |
data[].total_amount_raised | integer | No | — |
data[].vote | VoteDetails or null | No | — |
data[].ticket | TicketDetails or null | No | — |
data[].created_at | string | No | — |
data[].updated_at | string or null | No | — |
has_more | boolean | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/events
curl --request GET 'https://api.prinpoll.com/api/partner/v1/events' \
--header 'Authorization: Bearer sk_live_xxx'post/api/partner/v1/eventsCreate Event
Create a vote or ticket event: always Premium, live at once (no PrinPoll event approval). It can take payments once it has a category with a nominee (vote) or a ticket type (ticket).
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Request body
Content-Type: application/json
VoteEventCreate
| Field | Type | Required | Notes |
|---|---|---|---|
starts_at | string | Yes | — |
ends_at | string | Yes | — |
type | string | Yes | — |
name | string | Yes | — |
description | string | Yes | — |
vote_cost | integer | Yes | Price of one vote, pesewas |
voting_starts_at | string or null | No | Defaults to starts_at |
voting_ends_at | string or null | No | Defaults to ends_at |
show_results | boolean | No | — |
stage | open | voting | closed | No | — |
TicketEventCreate
| Field | Type | Required | Notes |
|---|---|---|---|
starts_at | string | Yes | — |
ends_at | string | Yes | — |
type | string | Yes | — |
name | string | Yes | — |
description | string | Yes | — |
event_date | string | Yes | When the event itself takes place |
venue | string | Yes | — |
latitude | number or null | No | — |
longitude | number or null | No | — |
stage | coming_soon | open | closed | No | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
201 Successful Response
JSON response fields — EventOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
type | vote | ticket | Yes | — |
source | string | No | — |
name | string | Yes | — |
description | string or null | No | — |
image_url | string or null | No | — |
stage | string | Yes | — |
starts_at | string or null | No | — |
ends_at | string or null | No | — |
plan | string | No | — |
commission_bps | integer or null | No | PrinPoll's Premium commission for this event |
published | boolean | Yes | Online and selling (unless not ready) |
offline_reason | unpublished | developer_suspended or null | No | — |
unpublished_by | developer | admin or null | No | — |
unpublish_reason | string or null | No | — |
ready_for_payments | boolean | Yes | — |
not_ready_reason | string or null | No | — |
public_url | string or null | No | — |
total_amount_raised | integer | Yes | — |
vote | VoteDetails or null | No | — |
ticket | TicketDetails or null | No | — |
created_at | string | Yes | — |
updated_at | string or null | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/events
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-raw '{
"starts_at": "2030-01-01T00:00:00Z",
"ends_at": "2030-01-02T00:00:00Z",
"type": "vote",
"name": "Example event",
"description": "An example event",
"vote_cost": 100,
"show_results": true,
"stage": "voting"
}'get/api/partner/v1/events/{event_id}Get Event
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — EventOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
type | vote | ticket | Yes | — |
source | string | No | — |
name | string | Yes | — |
description | string or null | No | — |
image_url | string or null | No | — |
stage | string | Yes | — |
starts_at | string or null | No | — |
ends_at | string or null | No | — |
plan | string | No | — |
commission_bps | integer or null | No | PrinPoll's Premium commission for this event |
published | boolean | Yes | Online and selling (unless not ready) |
offline_reason | unpublished | developer_suspended or null | No | — |
unpublished_by | developer | admin or null | No | — |
unpublish_reason | string or null | No | — |
ready_for_payments | boolean | Yes | — |
not_ready_reason | string or null | No | — |
public_url | string or null | No | — |
total_amount_raised | integer | Yes | — |
vote | VoteDetails or null | No | — |
ticket | TicketDetails or null | No | — |
created_at | string | Yes | — |
updated_at | string or null | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/events/{event_id}
curl --request GET 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID' \
--header 'Authorization: Bearer sk_live_xxx'patch/api/partner/v1/events/{event_id}Update Event
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
name | string or null | No | — |
description | string or null | No | — |
starts_at | string or null | No | — |
ends_at | string or null | No | — |
stage | string or null | No | — |
vote_cost | integer or null | No | — |
voting_starts_at | string or null | No | — |
voting_ends_at | string or null | No | — |
show_results | boolean or null | No | — |
event_date | string or null | No | — |
venue | string or null | No | — |
latitude | number or null | No | — |
longitude | number or null | No | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
200 Successful Response
JSON response fields — EventOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
type | vote | ticket | Yes | — |
source | string | No | — |
name | string | Yes | — |
description | string or null | No | — |
image_url | string or null | No | — |
stage | string | Yes | — |
starts_at | string or null | No | — |
ends_at | string or null | No | — |
plan | string | No | — |
commission_bps | integer or null | No | PrinPoll's Premium commission for this event |
published | boolean | Yes | Online and selling (unless not ready) |
offline_reason | unpublished | developer_suspended or null | No | — |
unpublished_by | developer | admin or null | No | — |
unpublish_reason | string or null | No | — |
ready_for_payments | boolean | Yes | — |
not_ready_reason | string or null | No | — |
public_url | string or null | No | — |
total_amount_raised | integer | Yes | — |
vote | VoteDetails or null | No | — |
ticket | TicketDetails or null | No | — |
created_at | string | Yes | — |
updated_at | string or null | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
PATCH /api/partner/v1/events/{event_id}
curl --request PATCH 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Content-Type: application/json' \
--data-raw '{}'get/api/partner/v1/events/{event_id}/categoriesList Categories
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — CategoryOut[]
| Field | Type | Required | Notes |
|---|---|---|---|
[].id | string | No | — |
[].event_id | string | No | — |
[].name | string | No | — |
[].nominees_count | integer | No | — |
[].created_at | string | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/events/{event_id}/categories
curl --request GET 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/categories' \
--header 'Authorization: Bearer sk_live_xxx'post/api/partner/v1/events/{event_id}/categoriesCreate Category
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
201 Successful Response
JSON response fields — CategoryOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
event_id | string | Yes | — |
name | string | Yes | — |
nominees_count | integer | Yes | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/events/{event_id}/categories
curl --request POST 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/categories' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Idempotency-Key: YOUR_UNIQUE_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Example event"
}'post/api/partner/v1/events/{event_id}/imageUpload Event Image
Upload the event image (stored by PrinPoll; external image URLs aren't accepted).
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
Content-Type: multipart/form-data
| Field | Type | Required | Notes |
|---|---|---|---|
image | string | Yes | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
200 Successful Response
JSON response fields — EventOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
type | vote | ticket | Yes | — |
source | string | No | — |
name | string | Yes | — |
description | string or null | No | — |
image_url | string or null | No | — |
stage | string | Yes | — |
starts_at | string or null | No | — |
ends_at | string or null | No | — |
plan | string | No | — |
commission_bps | integer or null | No | PrinPoll's Premium commission for this event |
published | boolean | Yes | Online and selling (unless not ready) |
offline_reason | unpublished | developer_suspended or null | No | — |
unpublished_by | developer | admin or null | No | — |
unpublish_reason | string or null | No | — |
ready_for_payments | boolean | Yes | — |
not_ready_reason | string or null | No | — |
public_url | string or null | No | — |
total_amount_raised | integer | Yes | — |
vote | VoteDetails or null | No | — |
ticket | TicketDetails or null | No | — |
created_at | string | Yes | — |
updated_at | string or null | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/events/{event_id}/image
curl --request POST 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/image' \
--header 'Authorization: Bearer sk_live_xxx' \
--form 'image=@PATH_TO_IMAGE'get/api/partner/v1/events/{event_id}/nomineesList Nominees
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
category_id | query | No | string or null | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — NomineeOut[]
| Field | Type | Required | Notes |
|---|---|---|---|
[].id | string | No | — |
[].event_id | string | No | — |
[].category_id | string | No | — |
[].name | string | No | — |
[].phone_number | string or null | No | — |
[].image_url | string or null | No | — |
[].ussd_code | string | No | PrinPoll-generated, unique on the platform; voters dial it on USSD |
[].status | string | No | — |
[].votes | integer | No | — |
[].created_at | string | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/events/{event_id}/nominees
curl --request GET 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/nominees' \
--header 'Authorization: Bearer sk_live_xxx'post/api/partner/v1/events/{event_id}/publishPublish Event
Bring an event you unpublished back online (not one PrinPoll unpublished).
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — EventOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
type | vote | ticket | Yes | — |
source | string | No | — |
name | string | Yes | — |
description | string or null | No | — |
image_url | string or null | No | — |
stage | string | Yes | — |
starts_at | string or null | No | — |
ends_at | string or null | No | — |
plan | string | No | — |
commission_bps | integer or null | No | PrinPoll's Premium commission for this event |
published | boolean | Yes | Online and selling (unless not ready) |
offline_reason | unpublished | developer_suspended or null | No | — |
unpublished_by | developer | admin or null | No | — |
unpublish_reason | string or null | No | — |
ready_for_payments | boolean | Yes | — |
not_ready_reason | string or null | No | — |
public_url | string or null | No | — |
total_amount_raised | integer | Yes | — |
vote | VoteDetails or null | No | — |
ticket | TicketDetails or null | No | — |
created_at | string | Yes | — |
updated_at | string or null | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/events/{event_id}/publish
curl --request POST 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/publish' \
--header 'Authorization: Bearer sk_live_xxx'get/api/partner/v1/events/{event_id}/resultsGet Results
Live results: votes per nominee, or ticket sales per type.
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — ResultsOut
| Field | Type | Required | Notes |
|---|---|---|---|
event_id | string | Yes | — |
type | vote | ticket | Yes | — |
generated_at | string | Yes | — |
total_amount_raised | integer | Yes | — |
total_votes | integer or null | No | — |
tickets_sold | integer or null | No | — |
categories | CategoryResult[] or null | No | — |
ticket_types | TicketTypeResult[] or null | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/events/{event_id}/results
curl --request GET 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/results' \
--header 'Authorization: Bearer sk_live_xxx'get/api/partner/v1/events/{event_id}/ticket-typesList Ticket Types
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — TicketTypeOut[]
| Field | Type | Required | Notes |
|---|---|---|---|
[].id | string | No | — |
[].event_id | string | No | — |
[].name | string | No | — |
[].description | string or null | No | — |
[].price | integer | No | — |
[].quantity | integer | No | — |
[].quantity_remaining | integer | No | — |
[].sold | integer | No | — |
[].promotion_tag | string | No | — |
[].promotion_start_date | string or null | No | — |
[].promotion_end_date | string or null | No | — |
[].created_at | string | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/events/{event_id}/ticket-types
curl --request GET 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/ticket-types' \
--header 'Authorization: Bearer sk_live_xxx'post/api/partner/v1/events/{event_id}/ticket-typesCreate Ticket Type
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | — |
description | string | No | — |
price | integer | Yes | pesewas |
quantity | integer | Yes | — |
promotion_tag | early_bird | regular | last_minute | No | — |
promotion_start_date | string or null | No | — |
promotion_end_date | string or null | No | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
201 Successful Response
JSON response fields — TicketTypeOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
event_id | string | Yes | — |
name | string | Yes | — |
description | string or null | No | — |
price | integer | Yes | — |
quantity | integer | Yes | — |
quantity_remaining | integer | Yes | — |
sold | integer | Yes | — |
promotion_tag | string | Yes | — |
promotion_start_date | string or null | No | — |
promotion_end_date | string or null | No | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/events/{event_id}/ticket-types
curl --request POST 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/ticket-types' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Idempotency-Key: YOUR_UNIQUE_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Example event",
"description": "",
"price": 100,
"quantity": 1,
"promotion_tag": "regular"
}'post/api/partner/v1/events/{event_id}/unpublishUnpublish Event
Take the event offline on every channel (web, USSD, widget). Data and votes are kept.
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
reason | string | Yes | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
200 Successful Response
JSON response fields — EventOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
type | vote | ticket | Yes | — |
source | string | No | — |
name | string | Yes | — |
description | string or null | No | — |
image_url | string or null | No | — |
stage | string | Yes | — |
starts_at | string or null | No | — |
ends_at | string or null | No | — |
plan | string | No | — |
commission_bps | integer or null | No | PrinPoll's Premium commission for this event |
published | boolean | Yes | Online and selling (unless not ready) |
offline_reason | unpublished | developer_suspended or null | No | — |
unpublished_by | developer | admin or null | No | — |
unpublish_reason | string or null | No | — |
ready_for_payments | boolean | Yes | — |
not_ready_reason | string or null | No | — |
public_url | string or null | No | — |
total_amount_raised | integer | Yes | — |
vote | VoteDetails or null | No | — |
ticket | TicketDetails or null | No | — |
created_at | string | Yes | — |
updated_at | string or null | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/events/{event_id}/unpublish
curl --request POST 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/unpublish' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"reason": "REPLACE_WITH_VALUE"
}'get/api/partner/v1/events/{event_id}/vote-packagesList Packages
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — PackageOut[]
| Field | Type | Required | Notes |
|---|---|---|---|
[].id | string | No | — |
[].event_id | string | No | — |
[].name | string | No | — |
[].price | integer | No | — |
[].num_of_votes | integer | No | — |
[].is_active | boolean | No | — |
[].active_from | string or null | No | — |
[].active_until | string or null | No | — |
[].created_at | string | No | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/events/{event_id}/vote-packages
curl --request GET 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/vote-packages' \
--header 'Authorization: Bearer sk_live_xxx'post/api/partner/v1/events/{event_id}/vote-packagesCreate Package
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | — |
price | integer | Yes | pesewas |
num_of_votes | integer | Yes | — |
is_active | boolean | No | — |
active_from | string or null | No | — |
active_until | string or null | No | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
201 Successful Response
JSON response fields — PackageOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
event_id | string | Yes | — |
name | string | Yes | — |
price | integer | Yes | — |
num_of_votes | integer | Yes | — |
is_active | boolean | Yes | — |
active_from | string or null | No | — |
active_until | string or null | No | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/events/{event_id}/vote-packages
curl --request POST 'https://api.prinpoll.com/api/partner/v1/events/EVENT_ID/vote-packages' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Idempotency-Key: YOUR_UNIQUE_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Example event",
"price": 100,
"num_of_votes": 1,
"is_active": true
}'get/api/partner/v1/meWhoami
Check a key: which developer and key it is, and whether this is the sandbox.
Authentication
Secret or publishable key; send Authorization: Bearer sk_live_xxx or X-PrinPoll-Key: pk_live_xxx.
Request body
No request body.
Responses
200 Successful Response
JSON response fields — MeOut
| Field | Type | Required | Notes |
|---|---|---|---|
developer_id | string | Yes | — |
organization_id | string | Yes | — |
organization_name | string | Yes | — |
developer_status | pending | approved | rejected | suspended | Yes | — |
key | KeyOut | Yes | — |
key.id | string | Yes | — |
key.name | string | Yes | — |
key.kind | secret | publishable | Yes | — |
key.mode | live | test | Yes | — |
key.prefix | string | Yes | Visible start of the key, e.g. sk_live_Ab3d |
key.last4 | string | Yes | — |
key.display | string | Yes | prefix…last4, to tell keys apart |
key.rate_limit_per_minute | integer | Yes | — |
key.status | string | Yes | active | revoked |
key.created_at | string | Yes | — |
key.last_used_at | string or null | No | — |
key.revoked_at | string or null | No | — |
key.revoke_reason | string or null | No | — |
key.replaces_key_id | string or null | No | — |
key.key | string or null | No | Publishable keys: the full key (public by design). Secret keys: always null (shown only once, at creation). |
sandbox | boolean | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/me
curl --request GET 'https://api.prinpoll.com/api/partner/v1/me' \
--header 'Authorization: Bearer sk_live_xxx'delete/api/partner/v1/nominees/{nominee_id}Delete Nominee
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
nominee_id | path | Yes | string | — |
Request body
No request body.
Responses
204 Successful Response
No response body schema is specified.
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
DELETE /api/partner/v1/nominees/{nominee_id}
curl --request DELETE 'https://api.prinpoll.com/api/partner/v1/nominees/NOMINEE_ID' \
--header 'Authorization: Bearer sk_live_xxx'patch/api/partner/v1/nominees/{nominee_id}Update Nominee
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
nominee_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
name | string or null | No | — |
phone_number | string or null | No | — |
category_id | string or null | No | Move to another category of the same event |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
200 Successful Response
JSON response fields — NomineeOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
event_id | string | Yes | — |
category_id | string | Yes | — |
name | string | Yes | — |
phone_number | string or null | No | — |
image_url | string or null | No | — |
ussd_code | string | Yes | PrinPoll-generated, unique on the platform; voters dial it on USSD |
status | string | Yes | — |
votes | integer | Yes | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
PATCH /api/partner/v1/nominees/{nominee_id}
curl --request PATCH 'https://api.prinpoll.com/api/partner/v1/nominees/NOMINEE_ID' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Content-Type: application/json' \
--data-raw '{}'post/api/partner/v1/nominees/{nominee_id}/imageUpload Nominee Image
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
nominee_id | path | Yes | string | — |
Request body
Content-Type: multipart/form-data
| Field | Type | Required | Notes |
|---|---|---|---|
image | string | Yes | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
200 Successful Response
JSON response fields — NomineeOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
event_id | string | Yes | — |
category_id | string | Yes | — |
name | string | Yes | — |
phone_number | string or null | No | — |
image_url | string or null | No | — |
ussd_code | string | Yes | PrinPoll-generated, unique on the platform; voters dial it on USSD |
status | string | Yes | — |
votes | integer | Yes | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/nominees/{nominee_id}/image
curl --request POST 'https://api.prinpoll.com/api/partner/v1/nominees/NOMINEE_ID/image' \
--header 'Authorization: Bearer sk_live_xxx' \
--form 'image=@PATH_TO_IMAGE'get/api/partner/v1/paymentsList Payments
Payments started through your API key(s) and widget, newest first.
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | query | No | string or null | — |
status | query | No | pending | success | failed | expired or null | — |
limit | query | No | integer | — |
starting_after | query | No | string or null | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — PaymentList
| Field | Type | Required | Notes |
|---|---|---|---|
data | PaymentOut[] | Yes | — |
data[].reference | string | No | — |
data[].status | pending | success | failed | expired | No | — |
data[].message | string or null | No | — |
data[].kind | string | No | vote | ticket |
data[].amount | integer | No | — |
data[].currency | string | No | — |
data[].event_id | string | No | — |
data[].channel | api | widget | No | — |
data[].phone_number | string or null | No | Masked |
data[].network | string or null | No | — |
data[].status_url | string | No | — |
data[].sandbox | boolean | No | — |
data[].created_at | string | No | — |
has_more | boolean | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/payments
curl --request GET 'https://api.prinpoll.com/api/partner/v1/payments' \
--header 'Authorization: Bearer sk_live_xxx'post/api/partner/v1/paymentsStart Payment
Send a MoMo prompt to the payer (Junipay), exactly like the website checkout. Poll GET /payments/{reference} (every few seconds) until status is success, failed or expired.
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Request body
Content-Type: application/json
VotePaymentCreate
| Field | Type | Required | Notes |
|---|---|---|---|
type | string | Yes | — |
event_id | string | Yes | — |
nominee_id | string | Yes | — |
package_id | string or null | No | Buy a vote package instead of single votes |
votes | integer or null | No | Number of votes (taken from the package if omitted) |
amount | integer | Yes | pesewas; must equal vote_cost x votes, or the package price |
phone_number | string | Yes | Payer's MoMo number |
network | mtn | telecel | airteltigo | Yes | — |
TicketPaymentCreate
| Field | Type | Required | Notes |
|---|---|---|---|
type | string | Yes | — |
event_id | string | Yes | — |
ticket_types | TicketLine[] | Yes | — |
ticket_types[].ticket_type_id | string | No | — |
ticket_types[].quantity | integer | No | — |
amount | integer | Yes | pesewas; must equal the tickets' total price |
phone_number | string | Yes | — |
network | mtn | telecel | airteltigo | Yes | — |
buyer | Buyer | Yes | — |
buyer.full_name | string | Yes | — |
buyer.email | string | Yes | — |
buyer_note | string or null | No | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
201 Successful Response
JSON response fields — PaymentOut
| Field | Type | Required | Notes |
|---|---|---|---|
reference | string | Yes | — |
status | pending | success | failed | expired | Yes | — |
message | string or null | No | — |
kind | string | Yes | vote | ticket |
amount | integer | Yes | — |
currency | string | No | — |
event_id | string | Yes | — |
channel | api | widget | Yes | — |
phone_number | string or null | No | Masked |
network | string or null | No | — |
status_url | string | Yes | — |
sandbox | boolean | Yes | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/payments
curl --request POST 'https://api.prinpoll.com/api/partner/v1/payments' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Idempotency-Key: YOUR_UNIQUE_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "vote",
"event_id": "EVENT_ID",
"nominee_id": "NOMINEE_ID",
"amount": 100,
"phone_number": "PAYER_PHONE_NUMBER",
"network": "mtn"
}'get/api/partner/v1/payments/{reference}Get Payment
Status of one of your payments. Checking it also records a confirmed payment (votes / tickets), exactly like the website's status poll.
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
reference | path | Yes | string | — |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — PaymentOut
| Field | Type | Required | Notes |
|---|---|---|---|
reference | string | Yes | — |
status | pending | success | failed | expired | Yes | — |
message | string or null | No | — |
kind | string | Yes | vote | ticket |
amount | integer | Yes | — |
currency | string | No | — |
event_id | string | Yes | — |
channel | api | widget | Yes | — |
phone_number | string or null | No | Masked |
network | string or null | No | — |
status_url | string | Yes | — |
sandbox | boolean | Yes | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/payments/{reference}
curl --request GET 'https://api.prinpoll.com/api/partner/v1/payments/PAYMENT_REFERENCE' \
--header 'Authorization: Bearer sk_live_xxx'delete/api/partner/v1/ticket-types/{ticket_type_id}Delete Ticket Type
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
ticket_type_id | path | Yes | string | — |
Request body
No request body.
Responses
204 Successful Response
No response body schema is specified.
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
DELETE /api/partner/v1/ticket-types/{ticket_type_id}
curl --request DELETE 'https://api.prinpoll.com/api/partner/v1/ticket-types/TICKET_TYPE_ID' \
--header 'Authorization: Bearer sk_live_xxx'patch/api/partner/v1/ticket-types/{ticket_type_id}Update Ticket Type
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
ticket_type_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
name | string or null | No | — |
description | string or null | No | — |
price | integer or null | No | — |
quantity | integer or null | No | Total; can't go below tickets sold |
promotion_tag | early_bird | regular | last_minute or null | No | — |
promotion_start_date | string or null | No | — |
promotion_end_date | string or null | No | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
200 Successful Response
JSON response fields — TicketTypeOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
event_id | string | Yes | — |
name | string | Yes | — |
description | string or null | No | — |
price | integer | Yes | — |
quantity | integer | Yes | — |
quantity_remaining | integer | Yes | — |
sold | integer | Yes | — |
promotion_tag | string | Yes | — |
promotion_start_date | string or null | No | — |
promotion_end_date | string or null | No | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
PATCH /api/partner/v1/ticket-types/{ticket_type_id}
curl --request PATCH 'https://api.prinpoll.com/api/partner/v1/ticket-types/TICKET_TYPE_ID' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Content-Type: application/json' \
--data-raw '{}'delete/api/partner/v1/vote-packages/{package_id}Delete Package
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
package_id | path | Yes | string | — |
Request body
No request body.
Responses
204 Successful Response
No response body schema is specified.
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
DELETE /api/partner/v1/vote-packages/{package_id}
curl --request DELETE 'https://api.prinpoll.com/api/partner/v1/vote-packages/PACKAGE_ID' \
--header 'Authorization: Bearer sk_live_xxx'patch/api/partner/v1/vote-packages/{package_id}Update Package
Authentication
Secret key in Authorization: Bearer sk_live_xxx. Keep this key on your server.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
package_id | path | Yes | string | — |
Request body
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
name | string or null | No | — |
price | integer or null | No | — |
num_of_votes | integer or null | No | — |
is_active | boolean or null | No | — |
active_from | string or null | No | — |
active_until | string or null | No | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
200 Successful Response
JSON response fields — PackageOut
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | — |
event_id | string | Yes | — |
name | string | Yes | — |
price | integer | Yes | — |
num_of_votes | integer | Yes | — |
is_active | boolean | Yes | — |
active_from | string or null | No | — |
active_until | string or null | No | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
PATCH /api/partner/v1/vote-packages/{package_id}
curl --request PATCH 'https://api.prinpoll.com/api/partner/v1/vote-packages/PACKAGE_ID' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Content-Type: application/json' \
--data-raw '{}'get/api/partner/v1/widget/events/{event_id}Widget Event
Public details of an embeddable event.
Authentication
Publishable key in the key query parameter and embed_origin query parameter; called by PrinPoll's iframe.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
key | query | Yes | string | Publishable key (pk_live_... / pk_test_...) |
embed_origin | query | Yes | string | Origin of the page embedding the widget |
Request body
No request body.
Responses
200 Successful Response
value
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/widget/events/{event_id}
curl --request GET 'https://api.prinpoll.com/api/partner/v1/widget/events/EVENT_ID?key=pk_live_xxx&embed_origin=https%3A%2F%2Fexample.com'get/api/partner/v1/widget/events/{event_id}/categoriesWidget Categories
Categories with their nominees (each with its PrinPoll ussd_code).
Authentication
Publishable key in the key query parameter and embed_origin query parameter; called by PrinPoll's iframe.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
key | query | Yes | string | Publishable key (pk_live_... / pk_test_...) |
embed_origin | query | Yes | string | Origin of the page embedding the widget |
Request body
No request body.
Responses
200 Successful Response
value
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/widget/events/{event_id}/categories
curl --request GET 'https://api.prinpoll.com/api/partner/v1/widget/events/EVENT_ID/categories?key=pk_live_xxx&embed_origin=https%3A%2F%2Fexample.com'get/api/partner/v1/widget/events/{event_id}/nomineesWidget Nominees
Nominees of an embeddable vote event.
Authentication
Publishable key in the key query parameter and embed_origin query parameter; called by PrinPoll's iframe.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
category_id | query | No | string or null | — |
key | query | Yes | string | Publishable key (pk_live_... / pk_test_...) |
embed_origin | query | Yes | string | Origin of the page embedding the widget |
Request body
No request body.
Responses
200 Successful Response
value
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/widget/events/{event_id}/nominees
curl --request GET 'https://api.prinpoll.com/api/partner/v1/widget/events/EVENT_ID/nominees?key=pk_live_xxx&embed_origin=https%3A%2F%2Fexample.com'get/api/partner/v1/widget/events/{event_id}/resultsWidget Results
Live results, only for vote events that show results.
Authentication
Publishable key in the key query parameter and embed_origin query parameter; called by PrinPoll's iframe.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
key | query | Yes | string | Publishable key (pk_live_... / pk_test_...) |
embed_origin | query | Yes | string | Origin of the page embedding the widget |
Request body
No request body.
Responses
200 Successful Response
value
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/widget/events/{event_id}/results
curl --request GET 'https://api.prinpoll.com/api/partner/v1/widget/events/EVENT_ID/results?key=pk_live_xxx&embed_origin=https%3A%2F%2Fexample.com'get/api/partner/v1/widget/events/{event_id}/ticket-typesWidget Ticket Types
Ticket types of an embeddable ticket event.
Authentication
Publishable key in the key query parameter and embed_origin query parameter; called by PrinPoll's iframe.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
key | query | Yes | string | Publishable key (pk_live_... / pk_test_...) |
embed_origin | query | Yes | string | Origin of the page embedding the widget |
Request body
No request body.
Responses
200 Successful Response
value
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/widget/events/{event_id}/ticket-types
curl --request GET 'https://api.prinpoll.com/api/partner/v1/widget/events/EVENT_ID/ticket-types?key=pk_live_xxx&embed_origin=https%3A%2F%2Fexample.com'get/api/partner/v1/widget/events/{event_id}/vote-packagesWidget Packages
Active vote packages (inside their time window).
Authentication
Publishable key in the key query parameter and embed_origin query parameter; called by PrinPoll's iframe.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | path | Yes | string | — |
key | query | Yes | string | Publishable key (pk_live_... / pk_test_...) |
embed_origin | query | Yes | string | Origin of the page embedding the widget |
Request body
No request body.
Responses
200 Successful Response
value
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/widget/events/{event_id}/vote-packages
curl --request GET 'https://api.prinpoll.com/api/partner/v1/widget/events/EVENT_ID/vote-packages?key=pk_live_xxx&embed_origin=https%3A%2F%2Fexample.com'get/api/partner/v1/widget/frame-policyFrame Policy
The CSP the iframe page MUST send: `Content-Security-Policy: <content_security_policy>`. Called by the iframe page's server before rendering (no browser Origin needed). With event_id, also says whether that event can be shown.
Authentication
Publishable key in the required key query parameter; server-to-server request.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
event_id | query | No | string or null | — |
key | query | Yes | string | — |
Request body
No request body.
Responses
200 Successful Response
value
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/widget/frame-policy
curl --request GET 'https://api.prinpoll.com/api/partner/v1/widget/frame-policy?key=pk_live_xxx'post/api/partner/v1/widget/paymentsWidget Start Payment
Send the MoMo prompt. Exactly the payments API's logic (website validation and recording), labelled 'widget' with the embedding site.
Authentication
Publishable key in the key query parameter and embed_origin query parameter; called by PrinPoll's iframe.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
key | query | Yes | string | Publishable key (pk_live_... / pk_test_...) |
embed_origin | query | Yes | string | Origin of the page embedding the widget |
Request body
Content-Type: application/json
WidgetVotePayment
| Field | Type | Required | Notes |
|---|---|---|---|
idempotency_key | string | Yes | New random value per purchase attempt (e.g. a UUID); resend the same value when retrying, so the payer never gets two prompts |
type | string | Yes | — |
event_id | string | Yes | — |
nominee_id | string | Yes | — |
package_id | string or null | No | Buy a vote package instead of single votes |
votes | integer or null | No | Number of votes (taken from the package if omitted) |
amount | integer | Yes | pesewas; must equal vote_cost x votes, or the package price |
phone_number | string | Yes | Payer's MoMo number |
network | mtn | telecel | airteltigo | Yes | — |
WidgetTicketPayment
| Field | Type | Required | Notes |
|---|---|---|---|
idempotency_key | string | Yes | New random value per purchase attempt (e.g. a UUID); resend the same value when retrying, so the payer never gets two prompts |
type | string | Yes | — |
event_id | string | Yes | — |
ticket_types | TicketLine[] | Yes | — |
ticket_types[].ticket_type_id | string | No | — |
ticket_types[].quantity | integer | No | — |
amount | integer | Yes | pesewas; must equal the tickets' total price |
phone_number | string | Yes | — |
network | mtn | telecel | airteltigo | Yes | — |
buyer | Buyer | Yes | — |
buyer.full_name | string | Yes | — |
buyer.email | string | Yes | — |
buyer_note | string or null | No | — |
Example body below uses placeholder values; replace them with valid IDs and event data.
Responses
201 Successful Response
JSON response fields — PaymentOut
| Field | Type | Required | Notes |
|---|---|---|---|
reference | string | Yes | — |
status | pending | success | failed | expired | Yes | — |
message | string or null | No | — |
kind | string | Yes | vote | ticket |
amount | integer | Yes | — |
currency | string | No | — |
event_id | string | Yes | — |
channel | api | widget | Yes | — |
phone_number | string or null | No | Masked |
network | string or null | No | — |
status_url | string | Yes | — |
sandbox | boolean | Yes | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
POST /api/partner/v1/widget/payments
curl --request POST 'https://api.prinpoll.com/api/partner/v1/widget/payments?key=pk_live_xxx&embed_origin=https%3A%2F%2Fexample.com' \
--header 'Content-Type: application/json' \
--data-raw '{
"idempotency_key": "YOUR_UNIQUE_KEY",
"type": "vote",
"event_id": "EVENT_ID",
"nominee_id": "NOMINEE_ID",
"amount": 100,
"phone_number": "PAYER_PHONE_NUMBER",
"network": "mtn"
}'get/api/partner/v1/widget/payments/{reference}Widget Payment Status
Poll every few seconds until success, failed or expired.
Authentication
Publishable key in the key query parameter and embed_origin query parameter; called by PrinPoll's iframe.
Parameters and headers
| Name | In | Required | Type | Description |
|---|---|---|---|---|
reference | path | Yes | string | — |
key | query | Yes | string | Publishable key (pk_live_... / pk_test_...) |
embed_origin | query | Yes | string | Origin of the page embedding the widget |
Request body
No request body.
Responses
200 Successful Response
JSON response fields — PaymentOut
| Field | Type | Required | Notes |
|---|---|---|---|
reference | string | Yes | — |
status | pending | success | failed | expired | Yes | — |
message | string or null | No | — |
kind | string | Yes | vote | ticket |
amount | integer | Yes | — |
currency | string | No | — |
event_id | string | Yes | — |
channel | api | widget | Yes | — |
phone_number | string or null | No | Masked |
network | string or null | No | — |
status_url | string | Yes | — |
sandbox | boolean | Yes | — |
created_at | string | Yes | — |
422 Validation Error
JSON response fields — HTTPValidationError
| Field | Type | Required | Notes |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string or integer[] | No | — |
detail[].msg | string | No | — |
detail[].type | string | No | — |
Shared partner error codes and recovery guidance are listed on the Errors page.
Example request
GET /api/partner/v1/widget/payments/{reference}
curl --request GET 'https://api.prinpoll.com/api/partner/v1/widget/payments/PAYMENT_REFERENCE?key=pk_live_xxx&embed_origin=https%3A%2F%2Fexample.com'