Publish a draft election
publish_electionPublish a DRAFT election in the connected account, running every check the publish button runs (ballot, schedule, voter list, state law, price) and charging the price from the account's prepaid balance or plan. Free elections (up to 25 voters) publish at no cost. If the balance does not cover it, nothing is charged and the person pays by card, at the finish link or on a payment page from create_checkout_link. Publishing follows a card payment either way: the page the person returns to from Stripe publishes once the payment lands, or call this with after_payment: true, which waits for the payment and publishes without a second charge, never drawing on the balance as well. An election that is already published and paid for answers status already_published with its links, not a refusal. Once published it emails voters their ballots when it can send as the organizer; through an assistant connection it usually cannot, so the result says whether ballots were emailed and, if not, links the election page where the organizer sends them. Confirm with the person before calling this; it can spend their money.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"election": "<election>"
},
"name": "publish_election"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| election | Yes | The election's id or slug, from list_elections or create_election_draft. | |
| after_payment | No | true once the person has paid by card (on a create_checkout_link page or at the finish link): waits up to 15 seconds for the payment to reach vote.direct, then publishes without charging anything, or answers already_published if the page they returned to has published it. Leave it out otherwise. |