Uploads
Upload an image and use its storage ID for a logo or avatar.
Use uploads for voting event logos, candidate avatars, group logos, and sponsor logos. The upload happens in one request.
Endpoint
| Method | Path | Scope | Description |
|---|---|---|---|
POST | /uploads | write | Upload an image and return its storage ID and URL. |
Request
Send either multipart form data with a file field or a raw image body. Supported image types are PNG, JPEG, WebP, and GIF. The image must be 5 MB or smaller.
curl -X POST "https://api.pepvote.com/uploads" \
-H "Authorization: Bearer $PEPVOTE_API_KEY" \
-H "User-Agent: my-app/1.0" \
-F "file=@logo.png;type=image/png"{
"data": {
"storageId": "kg2storage01",
"url": "https://storage.pepvote.com/kg2storage01",
"contentType": "image/png",
"size": 18432
}
}You can also send raw bytes with an image Content-Type header.
curl -X POST "https://api.pepvote.com/uploads" \
-H "Authorization: Bearer $PEPVOTE_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: image/png" \
--data-binary "@logo.png"{
"data": {
"storageId": "kg2storage01",
"url": "https://storage.pepvote.com/kg2storage01",
"contentType": "image/png",
"size": 18432
}
}Then use the storage ID. For example, PUT /voting-events/BOARD26/logo accepts { "storageId": "kg2storage01" }.
Was this helpful?
Last updated September 6, 2026