Welcome to Uplup API
Build powerful applications with our comprehensive REST API. Create interactive wheels, manage entries, track analytics, and more with simple HTTP requests.
Quick Start
Get API Keys
Sign up for any plan (including Free) and generate your API key from the dashboard.
Generate keysMake Requests
Use your API key to authenticate requests to our REST endpoints.
Learn authentication →Build & Ship
Create wheels, manage entries, and integrate our tools into your applications.
Explore endpoints →Try it out
// Bearer Token Authentication
const apiKey = 'uplup_live_your_api_key_here';
const response = await fetch(
'https://api.uplup.com/api/v1/wheels',
{
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
}
);
const data = await response.json();
console.log('Your wheels:', data);What you can build
Interactive Decision Wheels
Create customizable spinning wheels for games, random selection, and decision-making tools.
Entry Management
Dynamically add, remove, and modify wheel entries through API calls or CSV imports.
Real-time Results
Get instant results from wheel spins with detailed analytics and winner tracking.
Webhook Integration
On Pro or higher, get a signed POST to your server when a response arrives, a quiz is completed or a payment succeeds, fails or is refunded.
Embeddable Widgets
Embed interactive wheels directly into your website or application with our embed API.
Analytics & Insights
Track usage patterns, popular entries, and engagement metrics to optimize your wheels.
API Information
Base URL
https://api.uplup.comAPI Version
Authentication
Authenticate your API requests using Bearer token authentication with your Uplup API key or an OAuth access token.
API Credentials
Bearer Token Authentication
Every API request needs a token sent as a Bearer token:
- API Key:
uplup_live_oruplup_test_followed by 32 hex characters, created on the Integrations page of a workspace - OAuth access token:
uplup_at_followed by 64 hex characters, issued to an app a member authorised (the MCP server uses these) - Send either via the
Authorization: Bearer YOUR_TOKENheader
Your API key is shown only once when created. Store it securely. It cannot be retrieved later.
uplup_live_abc123def456...Production environment - Use for live applications
uplup_test_xyz789abc123...Development environment - Use for testing and development
Keys belong to a workspace
A key is created inside one workspace and is bound to it. Creating a key requires the workspace id (host_brands_id), and the member creating it must own that workspace or be an accepted team member of it.
Everything you read or change through the key is that workspace's: its forms and quizzes, its wheels, its webhooks and its themes. A team member sees the owner's forms. A user's other workspaces are not visible through the key; create a key in each workspace you need to reach.
If the user who created a key or authorised a token no longer belongs to the workspace, the API answers 401 for it.
Authentication Methods
Use Bearer token authentication by including your API key in the Authorization header of every request.
// Bearer Token Authentication (Recommended)
const apiKey = 'uplup_live_abc123def456789...';
// Using fetch with Bearer token
const response = await fetch(
'https://api.uplup.com/api/v1/forms',
{
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
}
);
const data = await response.json();
// Using axios with Bearer token
import axios from 'axios';
const api = axios.create({
baseURL: 'https://api.uplup.com',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
});
// Forms & Quizzes API
const forms = await api.get('/api/v1/forms');
// Wheel Picker API (also accepts Bearer token)
const wheels = await api.get('/api/v1/wheels');Security Best Practices
Never expose API keys in client-side code
Always make API calls from your backend server. API keys should never be visible in browser code, mobile apps, or public repositories.
Do This
- • Store API keys in environment variables
- • Use HTTPS for all API requests
- • Create Read Only keys for anything that only reads
- • Rotate keys regularly
- • Use test keys for development
Avoid This
- • Hardcoding keys in source code
- • Committing keys to version control
- • Sharing keys via email or chat
- • Using live keys in development
- • Making requests from frontend
Error Handling
The Uplup API uses conventional HTTP status codes. Every error body is a small JSON object with success: false and a human-readable message. Plan gates add upgrade_required: true and required_plan. Branch on the status code and show the message; the wording of messages may be refined over time.
Error Response Format
{
"success": false,
"message": "sort must be created_desc, created_asc or title"
}| Field | Type | Description |
|---|---|---|
| success | boolean | Always false on an error |
| message | string | What went wrong, including which parameter and what it must be |
| upgrade_required | boolean? | Present and true when the feature is not on the workspace owner's plan |
| required_plan | integer? | The plan level that unlocks the feature (2 is Pro) |
HTTP Status Codes
success: true and usually data; list endpoints add total, limit and offset.X-Request-Id header.Example Error Responses
Missing or invalid API key:
HTTP/1.1 401 Unauthorized
{ "success": false, "message": "Invalid or missing API key" }Read Only key attempting a write:
HTTP/1.1 403 Forbidden
{ "success": false, "message": "This token has read access only" }Pro feature on a Free workspace:
HTTP/1.1 403 Forbidden
{
"success": false,
"upgrade_required": true,
"required_plan": 2,
"message": "Webhooks are available on the Pro plan."
}Invalid parameter:
HTTP/1.1 400 Bad Request
{ "success": false, "message": "presentation_mode must be multi-page, card-form or single-page" }Rate limit exceeded:
HTTP/1.1 429 Too Many Requests
Retry-After: 1840
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1762953600
{ "success": false, "message": "Rate limit exceeded" }Resource not found:
HTTP/1.1 404 Not Found
{ "success": false, "message": "Form not found" }Best Practices
- 1.Branch on the HTTP status, show the message. Messages are written for people and may be reworded, so do not match on their text.
- 2.Respect
Retry-AfterOn 429 errors, wait the specified seconds before retrying. Do not retry immediately. - 3.Use exponential backoff for 5xx errors. Start at 1s, double each attempt, cap at 30s. These are transient.
- 4.Watch
X-RateLimit-RemainingIt is on every authenticated response, so you can slow down before you hit 429. - 5.Log the
X-Request-Idheader Include it when contacting support. It uniquely identifies each API request.
const response = await fetch('https://api.uplup.com/api/v1/forms', {
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
});
const body = await response.json();
if (!response.ok || body.success === false) {
switch (response.status) {
case 401:
console.error('Check the key: invalid, inactive, or for a workspace you left');
break;
case 403:
if (body.upgrade_required) console.error('Plan upgrade needed:', body.message);
else console.error('Read-only key on a write endpoint');
break;
case 429: {
const retryAfter = Number(response.headers.get('Retry-After') || 60);
console.error(`Rate limited. Retry in ${retryAfter}s`);
await new Promise(r => setTimeout(r, retryAfter * 1000));
break;
}
default:
console.error(body.message);
}
}API access is available on all plans, including Free. Whether a key can write depends on the permissions you give it when you create it, not on the plan. Two features follow the workspace owner's plan: response export and webhooks need Pro or higher.
Rate Limiting
Every API key or OAuth token may make 600 requests an hour against /api/v1. The limit is the same on every plan and is counted per key or token, in a fixed window that resets an hour after the first request in it. Going over returns 429 with a Retry-After header.
| Header | Meaning |
|---|---|
| X-RateLimit-Limit | 600, the requests allowed per hour |
| X-RateLimit-Remaining | Requests left in the current hour |
| X-RateLimit-Reset | Unix timestamp (seconds) when the window resets |
| Retry-After | Seconds to wait; only on 429 responses |
The three X-RateLimit headers are on every authenticated response, so a client can pace itself before the limit is reached. Need more? .
Response Limits
Responses are counted against the workspace owner's monthly allowance whatever their source (public form, embed or share link). The API does not create responses, so the limit shows up on reads: on the Free plan, responses beyond the allowance in the current period come back as locked rows with is_hidden: true and no email, phone or values, list endpoints carry hidden_count, and exports leave them out.
| Plan | Responses a month |
|---|---|
| Free | 10 |
| Pro | 1,000 |
| Business | 10,000 |
GET /account reports the allowance as limits.submissions_per_month.
Read and Write Access
There are two permission levels. You pick one when you create a key; OAuth apps request the matching read or write scope. Using a read-only credential on a write endpoint returns 403.
| Permission | API key | OAuth scope | What it allows |
|---|---|---|---|
| Read | Read Only | read | Every GET endpoint (forms, fields, submissions, analytics, quiz results, design, themes, webhooks, account, wheels) and the submissions export |
| Write | Read & Write | write | Everything above plus every POST, PATCH, PUT and DELETE: creating, editing, cloning, publishing and deleting forms, fields, webhooks and wheels, spinning a wheel, testing a webhook |
Older keys created before permissions existed keep read and write access. OAuth tokens get only the scopes the app registered for; PKCE with S256 is required for public clients, and tokens can be revoked by the app at any time.
Forms & Quizzes API
Create and edit forms and quizzes, read responses and analytics, manage quiz scoring, design, webhooks and the account. Every endpoint takes a Bearer token and answers with JSON: { "success": true, "data": ... } on success and { "success": false, "message": "..." } on failure.
Base URL
https://api.uplup.com/api/v1Authentication and access
All requests require a Bearer token: Authorization: Bearer uplup_live_xxx
API access is on every plan, including Free. A key belongs to one workspace, so the forms, wheels and webhooks you see through it are that workspace's. Read Only keys can call every GET endpoint (and the export); every POST, PATCH and DELETE needs a Read & Write key. Manage keys in your dashboard.
Forms
GET endpoints work with any key. POST, PATCH and DELETE need a key created with Read & Write permissions (or an OAuth token with the write scope).
List Forms
/formsReturns the forms and quizzes in the key's workspace, newest first by default.
const response = await fetch('https://api.uplup.com/api/v1/forms?type=quiz&sort=created_desc&limit=10', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Create Form
/formsCreate a new form or quiz. Fields are added afterwards with POST /forms/{form_id}/fields.
const response = await fetch('https://api.uplup.com/api/v1/forms', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'title': 'Customer Feedback',
'content_type': 'form',
'presentation_mode': 'multi-page',
'language': 'en'
})
});
const data = await response.json();
console.log(data);Get Form
/forms/{form_id}Retrieve a single form with its full document (meta, pages and fields, theme, quiz settings and settings).
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Update Form
/forms/{form_id}Update form properties. Only the keys you send change. PUT is accepted with the same body.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'title': 'Updated Title',
'custom_url': 'updated-title',
'language': 'en'
})
});
const data = await response.json();
console.log(data);Delete Form
/forms/{form_id}Permanently delete a form together with its responses, page views and quiz attempts.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Clone Form
/forms/{form_id}/cloneDuplicate a form with all its pages, fields, styling and settings. The custom URL is not copied.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/clone', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'title': 'Customer Feedback (Spring)'
})
});
const data = await response.json();
console.log(data);Publish / Unpublish
/forms/{form_id}/publishMake a form live or take it offline. Published forms are reachable at their public URL.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/publish', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'published': true
})
});
const data = await response.json();
console.log(data);Fields
Fields are the question and input objects inside document.pages. Layout elements (buttons, headings, paragraphs, images, video, icons, spacers) are not returned here.
GET endpoints work with any key. POST, PATCH and DELETE need a key created with Read & Write permissions (or an OAuth token with the write scope).
List Fields
/forms/{form_id}/fieldsGet every field on the form, page by page in display order.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/fields', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Add Field
/forms/{form_id}/fieldsAdd a field. The body is stored as the field object, so any builder property is accepted alongside type. Question text lives in content.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/fields', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'type': 'multipleChoice',
'content': 'What is your favorite color?',
'required': true,
'options': [
{
'label': 'Red',
'value': 'Red'
},
{
'label': 'Blue',
'value': 'Blue'
},
{
'label': 'Green',
'value': 'Green'
}
]
})
});
const data = await response.json();
console.log(data);Get Field
/forms/{form_id}/fields/{field_id}Retrieve a single field by ID.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/fields/2f1c-…', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Update Field
/forms/{form_id}/fields/{field_id}Merge properties onto an existing field. Only the keys you send change; id cannot be changed.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/fields/2f1c-…', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'content': 'Full name',
'required': true
})
});
const data = await response.json();
console.log(data);Delete Field
/forms/{form_id}/fields/{field_id}Remove a field from the form.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/fields/2f1c-…', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Reorder Fields
/forms/{form_id}/fields/reorderSet the order of fields by listing their ids. Fields are reordered within each content page; ids you leave out keep their relative order after the listed ones.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/fields/reorder', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'field_ids': [
'9b7e-…',
'2f1c-…',
'c4d0-…'
]
})
});
const data = await response.json();
console.log(data);Submissions
Responses are created by people filling in the public form, not through this API. On the Free plan, responses beyond the monthly limit come back as locked rows: is_hidden is true and the email, phone, region and values are null. The list carries hidden_count so you know how many were locked.
GET endpoints work with any key. POST, PATCH and DELETE need a key created with Read & Write permissions (or an OAuth token with the write scope).
List Submissions
/forms/{form_id}/submissionsPaginated responses for a form, newest first by default.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/submissions?limit=10&sort=newest&filter_country=US', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Get Submission
/forms/{form_id}/submissions/{submission_id}Retrieve a single response with its decrypted values (unless it is locked by the plan limit).
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/submissions/sub_123abc', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Delete Submission
/forms/{form_id}/submissions/{submission_id}Soft-delete a response. It disappears from lists, exports and analytics.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/submissions/sub_123abc', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Export Submissions
/forms/{form_id}/submissions/exportExport the form's responses as CSV (default) or JSON. Up to the 10,000 most recent responses; rows locked by the plan limit are left out.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/submissions/export', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'format': 'json'
})
});
const data = await response.json();
console.log(data);Analytics
Read endpoints, available with any key. period is one of 7d, 30d, 90d or all (default).
Analytics Overview
/forms/{form_id}/analyticsTotal views, total submissions and the conversion rate (submissions divided by views, as a percentage) for the chosen period.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/analytics?period=30d', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Submission Trends
/forms/{form_id}/analytics/submissionsSubmission counts grouped by day, week or month over the chosen period.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/analytics/submissions?period=90d&group_by=week', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Geography Breakdown
/forms/{form_id}/analytics/geographySubmission counts by country and region, highest first (top 50).
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/analytics/geography', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Activity Patterns
/forms/{form_id}/analytics/performanceWhen responses arrive: submission counts by hour of day (UTC) and by day of the week.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/analytics/performance', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Quiz
Scoring settings, per-attempt results and the leaderboard. Settings use the same camelCase keys the builder stores in document.quiz.
GET endpoints work with any key. POST, PATCH and DELETE need a key created with Read & Write permissions (or an OAuth token with the write scope).
Get Quiz Settings
/forms/{form_id}/quiz/settingsReturns document.quiz: scoring mode, pass mark, timing, retake policy, question behaviour, results display, lead capture and personality types.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/quiz/settings', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Update Quiz Settings
/forms/{form_id}/quiz/settingsMerge the keys you send into document.quiz. Nested sections (timing, retakePolicy, questionBehavior, resultsDisplay, leadCapture, personalitySettings) merge one level deep, so send only what should change. snake_case aliases such as passing_score and retake_policy are mapped to the stored camelCase names; unknown keys are ignored and listed in the response.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/quiz/settings', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'passingScore': 70,
'passingScoreType': 'percentage',
'timing': {
'enabled': true,
'totalTimeLimit': 10
},
'resultsDisplay': {
'showScore': true,
'showCorrectAnswers': 'after_submit'
}
})
});
const data = await response.json();
console.log(data);Quiz Results
/forms/{form_id}/quiz/resultsPer-attempt results, newest first: the answers, score, max_score, percentage and whether the attempt passed.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/quiz/results?limit=10', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Leaderboard
/forms/{form_id}/quiz/leaderboardCompleted attempts ranked by percentage (highest first), with earlier submissions ahead on ties.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/quiz/leaderboard?limit=5', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Design & Themes
The form's theme lives in document.theme and is returned as styling. Themes are the presets plus the ones saved in your workspace, identified by an integer id.
GET endpoints work with any key. POST, PATCH and DELETE need a key created with Read & Write permissions (or an OAuth token with the write scope).
Get Design
/forms/{form_id}/designRetrieve the form's styling, branding images and presentation settings.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/design', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Update Design
/forms/{form_id}/designUpdate the form's look. styling replaces the whole theme, so read it first and send the complete object back with your changes.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/design', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'logo': 'https://example.com/logo.png',
'logo_custom_link': 'https://example.com'
})
});
const data = await response.json();
console.log(data);Apply Theme
/forms/{form_id}/design/themeReplace the form's theme with a preset or one of your saved themes.
const response = await fetch('https://api.uplup.com/api/v1/forms/abc12345/design/theme', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'theme_id': 12
})
});
const data = await response.json();
console.log(data);List Themes
/themesAll presets plus the themes saved in your workspace.
const response = await fetch('https://api.uplup.com/api/v1/themes', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Get Theme
/themes/{theme_id}Retrieve a single theme and its styling.
const response = await fetch('https://api.uplup.com/api/v1/themes/12', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Webhooks
Receive a signed HTTP POST on your server when something happens on a form. Webhooks need the Pro plan or higher (the workspace owner's plan), both to create a subscription and for deliveries to be sent. A workspace can hold up to 25 webhooks.
GET endpoints work with any key. POST, PATCH and DELETE need a key created with Read & Write permissions (or an OAuth token with the write scope).
Event Types
A subscription lists the events it wants, or * for all of them. These are the only names accepted:
submission.createdA response was received
quiz.completedA quiz attempt was scored
payment.succeededA payment field was paid
payment.failedA payment attempt failed
payment.refundedA payment was refunded
*Every event above
Payload Format
Every delivery is a POST with a JSON body. timestamp is Unix seconds and is the value signed in the V2 header. data depends on the event; submission and quiz events carry the response:
{
"event": "submission.created",
"form_id": "abc12345",
"timestamp": 1762950000,
"data": {
"submission_id": "sub_xyz789",
"content_type": "form",
"fields": [
{ "id": "2f1c…", "type": "shortAnswer", "label": "Your Name", "value": "John Doe" },
{ "id": "9b7e…", "type": "multipleChoice", "label": "Favorite Color", "value": "Blue" }
],
"metadata": { "country": "US", "region": "California" }
}
}Request Headers
| Header | Description |
|---|---|
Content-Type | Always application/json |
X-Webhook-Id | The webhook subscription id |
X-Webhook-Event | Event type (for example submission.created, or test for a test send) |
X-Webhook-Timestamp | Unix seconds at send time, the same value as the body's timestamp |
X-Webhook-Signature-V2 | HMAC-SHA256 hex digest of "{timestamp}.{body}" with your webhook secret. Verify this one. |
X-Uplup-Signature | Legacy V1 signature: HMAC-SHA256 hex digest of the raw body alone. Kept for existing receivers. |
Signature Verification
Compute HMAC-SHA256 over the timestamp header, a dot and the raw request body, using your signing secret, and compare it with X-Webhook-Signature-V2 in constant time. Rejecting timestamps older than a few minutes stops replays.
const crypto = require('crypto');
function verify(rawBody, headers, secret) {
const ts = headers['x-webhook-timestamp'];
const v2 = headers['x-webhook-signature-v2'];
// Reject stale deliveries (replay protection)
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
const expected = crypto
.createHmac('sha256', secret)
.update(`${ts}.${rawBody}`)
.digest('hex');
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v2));
}Delivery Policy
- The target must be an https URL on a public host. Private, loopback, link-local and other reserved addresses are refused when you create the webhook and checked again before every send.
- Deliveries time out after 10 seconds and never follow redirects.
- A 2xx response counts as delivered. Anything else, or no response, is logged as failed.
- Every attempt is written to the delivery log (event, status, response code, time), and failures are not retried.
- Deliveries stop if the workspace owner drops below the Pro plan.
List Webhooks
/webhooksEvery webhook subscription in the workspace, newest first.
const response = await fetch('https://api.uplup.com/api/v1/webhooks', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Create Webhook
/webhooksSubscribe a URL to events. The signing secret is returned once, in this response only.
const response = await fetch('https://api.uplup.com/api/v1/webhooks', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'url': 'https://example.com/webhook',
'events': [
'submission.created',
'quiz.completed'
],
'form_ids': [
'abc12345'
]
})
});
const data = await response.json();
console.log(data);Get Webhook
/webhooks/{webhook_id}The webhook's fields, directly under data, plus recent_deliveries with the last 10 attempts.
const response = await fetch('https://api.uplup.com/api/v1/webhooks/a1b2c3d4e5f60718', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Update Webhook
/webhooks/{webhook_id}Change the URL, the events, the form filter or pause and resume it. Only the keys you send change.
const response = await fetch('https://api.uplup.com/api/v1/webhooks/a1b2c3d4e5f60718', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'is_active': false
})
});
const data = await response.json();
console.log(data);Delete Webhook
/webhooks/{webhook_id}Deactivate and remove a webhook subscription. Deliveries stop immediately.
const response = await fetch('https://api.uplup.com/api/v1/webhooks/a1b2c3d4e5f60718', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Test Webhook
/webhooks/{webhook_id}/testSend a signed test event (event "test") to the URL and report the HTTP status it answered with. The response body of your endpoint is never relayed.
const response = await fetch('https://api.uplup.com/api/v1/webhooks/a1b2c3d4e5f60718/test', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Regenerate Secret
/webhooks/{webhook_id}/regenerate-secretIssue a new signing secret. The old one stops working at once and the new one is only returned here.
const response = await fetch('https://api.uplup.com/api/v1/webhooks/a1b2c3d4e5f60718/regenerate-secret', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Get Deliveries
/webhooks/{webhook_id}/deliveriesThe delivery log for a webhook, newest first: every attempt including failures and test sends.
const response = await fetch('https://api.uplup.com/api/v1/webhooks/a1b2c3d4e5f60718/deliveries?limit=10', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Account
Read endpoint, available with any key.
Get Account
/accountThe workspace behind the key: plan, usage, limits, features and the permissions the key carries.
const response = await fetch('https://api.uplup.com/api/v1/account', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Rate Limits
Every API key or OAuth token may make 600 requests an hour on /api/v1, on every plan. The window is fixed and resets an hour after the first request in it. Going over returns 429 with { "success": false, "message": "Rate limit exceeded" } and a Retry-After header holding the seconds until the window resets.
Response Headers (on every authenticated response)
X-RateLimit-Limit: 600X-RateLimit-Remaining: requests left in the current hourX-RateLimit-Reset: Unix timestamp when the window resetsRetry-After: seconds to wait (only on 429)X-Request-Id: unique request id to quote when contacting support
Wheel Picker API
Create, manage, and interact with spinning wheels programmatically. Build decision-making tools, games, and interactive experiences.
Base URL: https://api.uplup.com/api/wheel
Ready to get started?
Generate your API keys from the Uplup dashboard and start building amazing applications.
List Wheels
/api/v1/wheelsRetrieve a paginated list of all wheels belonging to your account.
// Get all wheels with pagination
const apiKey = 'YOUR_API_KEY';
const response =
await fetch('https://api.uplup.com/api/v1/wheels', {
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
});
const data = await response.json();
if (response.ok) {
// Success - API returns JSON response
// Format: {"success": true, "data": {"wheels": [...]}}
console.log('Response:', JSON.stringify(data, null, 2));
} else {
// Handle error
console.error('Error:', response.status);
if (data.error) {
console.error('Message:', data.error.message);
}
}Create Wheel
/api/v1/wheelsCreate a new spinning wheel with customizable entries, settings, and appearance.
// Create a new wheel
const wheelData = {
wheel_name: "Team Lunch Picker",
entries: ["Pizza Palace", "Burger Barn", "Taco Town", "Sushi Spot"],
settings: {
spinnerDuration: "normal",
selectedColorSet: "Vibrant",
colorSequence: ["#e6194b", "#3cb44b", "#ffe119", "#4363d8"],
selectedAudio: "https://uplup-media.ams3.digitaloceanspaces.com/root/drum-roll-long.mp3",
volume: 100,
showTitle: true,
removeAfterWin: false,
winnersToSelect: 1
}
};
const apiKey = 'YOUR_API_KEY';
const response = await fetch(
'https://api.uplup.com/api/v1/wheels', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(wheelData) // Follows redirects automatically
});
const result = await response.json();
if (response.ok) {
// Success - API returns JSON response
// Format: {"success": true, "data": {"wheel_id": "wheel_123", "message": "Wheel created successfully"}}
console.log('Response:', JSON.stringify(result, null, 2));
} else {
// Handle error
console.error('Error:', response.status);
if (result.error) {
console.error('Message:', result.error.message);
}
}Get Wheel
/api/v1/wheels/{wheel_id}Retrieve detailed information about a specific wheel including all entries and settings.
// Get detailed wheel information
const apiKey = 'YOUR_API_KEY';
const wheelId = 'wheel_123';
const response = await fetch(
`https://api.uplup.com/api/v1/wheels/${wheelId}`, {
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
}) // Follows redirects automatically;
const wheel = await response.json();
if (response.ok) {
// Success - API returns JSON response
// Format: {"success": true, "data": {wheel details}}
console.log('Response:', JSON.stringify(wheel, null, 2));
} else {
// Handle error
console.error('Error:', response.status);
if (wheel.error) {
console.error('Message:', wheel.error.message);
}
}Spin Wheel
/api/v1/wheels/{wheel_id}/spinProgrammatically spin a wheel and get a randomly selected winner. The spin counter is incremented and the winner is appended to the wheel's results history.
// Spin a wheel and get the result
const apiKey = 'YOUR_API_KEY';
const wheelId = 'wheel_123';
const response = await fetch(
`https://api.uplup.com/api/v1/wheels/${wheelId}/spin`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
save_result: true,
notify_webhooks: true
}) // Follows redirects automatically
});
const result = await response.json();
if (response.ok) {
// Success - API returns JSON response
// Format: {"success": true, "data": {"winner": {...}, "results": [...]}}
console.log('Response:', JSON.stringify(result, null, 2));
} else {
// Handle error
console.error('Error:', response.status);
if (result.error) {
console.error('Message:', result.error.message);
}
}Update Wheel
/api/v1/wheels/{wheel_id}Update an existing wheel's properties including title, entries, settings, and appearance.
// Update wheel name and add new entries
const updates = {
wheel_name: "Updated Team Lunch Picker",
entries: ["Pizza Palace", "Burger Barn", "Sushi Spot", "Deli Downtown"],
settings: {
spinnerDuration: "short",
enableConfetti: false
}
};
const apiKey = 'YOUR_API_KEY';
const wheelId = 'wheel_123';
const response = await fetch(
`https://api.uplup.com/api/v1/wheels/${wheelId}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(updates) // Follows redirects automatically
});
const result = await response.json();
if (response.ok) {
// Success - API returns JSON response
// Format: {"success": true, "data": {"wheel_id": "wheel_123", "message": "Wheel created successfully"}}
console.log('Response:', JSON.stringify(result, null, 2));
} else {
// Handle error
console.error('Error:', response.status);
if (result.error) {
console.error('Message:', result.error.message);
}
}Delete Wheel
/api/v1/wheels/{wheel_id}Permanently delete a wheel and all its associated data including spin history.
// Delete a wheel permanently
const apiKey = 'YOUR_API_KEY';
const wheelId = 'wheel_123';
const response = await fetch(
`https://api.uplup.com/api/v1/wheels/${wheelId}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
}) // Follows redirects automatically;
const result = await response.json();
if (response.ok) {
// Success - API returns JSON response
// Format: {"success": true, "message": "Wheel deleted successfully"}
console.log('Response:', JSON.stringify(result, null, 2));
} else {
// Handle error
console.error('Error:', response.status);
if (result.error) {
console.error('Message:', result.error.message);
}
}Append Entries
/api/v1/wheels/{wheel_id}/entriesAppend one or more entries to a wheel without replacing the existing list. Use PUT /api/v1/wheels/{wheel_id}/entries to replace the full entries array, or DELETE to clear all entries.
// Add new entries to a wheel
const entryUpdate = {
action: "add",
entries: ["Mediterranean Cafe", "BBQ Joint", "Vegan Kitchen"]
};
const apiKey = 'YOUR_API_KEY';
const wheelId = 'wheel_123';
const response = await fetch(
`https://api.uplup.com/api/v1/wheels/${wheelId}/entries`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(entryUpdate) // Follows redirects automatically
});
const result = await response.json();
if (response.ok) {
// Success - API returns JSON response
// Format: {"success": true, "data": {"entries_added": 3, ...}}
console.log('Response:', JSON.stringify(result, null, 2));
} else {
// Handle error
console.error('Error:', response.status);
if (result.error) {
console.error('Message:', result.error.message);
}
}
// Remove specific entries
const removeUpdate = {
action: "remove",
entries: ["entry_id_1", "entry_id_2"]
};