REST API
Toggle vote on a feature plan
POST https://mbj-api.com/v1/feature_plans/{id}/vote
Toggles the supplied identity’s vote in any published plan; drafts return 404. No body is required. Not idempotent: retrying can undo a vote. After an ambiguous timeout, GET the plan and inspect voted before deciding whether to toggle again. The response includes the resulting voted state and current score, localized like Get a feature plan.
Request
curl --include --request POST 'https://mbj-api.com/v1/feature_plans/1/vote' \
--header 'Authorization: Token token=YOUR_API_KEY' \
--header 'Identity-Anonymous-ID: $MBJAnonymousID:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
Replace the example ID with an ID returned by the corresponding list operation.
Parameters
| Name / location | Required / type | Details |
|---|---|---|
id / path |
Yes / integer | Feature plan ID
Example: 1
|
Headers: Identity-Anonymous-ID (required), Identity-External-ID, Preferred-Languages, Language-Code. See Headers.
Responses
200 — Vote toggled successfully
application/json · FeaturePlan schema
{
"id": 1,
"title": "PDF Export",
"body": "Allow exporting data to PDF format for offline viewing",
"score": 42,
"status": "open",
"voted": false,
"created_at": "2024-01-08T12:00:00Z",
"updated_at": "2024-01-08T12:00:00Z"
}
Errors: 400, 401, 403, 404, 422, and 429. See Errors.