Technical Reference
Neut Widget Customer Reference
Use this reference after the quickstart is working. It lists supported widget IDs, query variables, subject values, status filters, colorways, and bootstrap URL parameters.
Start with Customer Widget Quickstart if you have not set up the iframe and backend endpoint yet.
Widget IDs And Paths
| Widget | widget_id |
Hosted path |
|---|---|---|
| Bill Preview | bill-preview |
/bill-preview-embed.html |
| Vote Breakdown | vote-breakdown |
/vote-breakdown-embed.html |
| Legislation By Subject | legislation-by-subject |
/legislation-by-subject-embed.html |
The production widget origin is:
https://widgets.neut.us
Common Variables
Every widget request uses these fields:
widget_id
Must match one of the supported widget IDs.
instance_id
Unique per widget instance on the page. Use only letters, numbers, dot, underscore, colon, or hyphen. Maximum 128 characters.
article_id
Useful for customer analytics or tracing.
colorway
Defaults to Default.
Do not include tenant_id in the browser payload. The customer backend should read the tenant
from server configuration.
Bill Preview
Use this widget when the page is about a specific bill.
widget_id
Fixed value.
instance_id
Unique widget placement ID.
article_id
Customer tracing value.
bill_type
Supported values: HR, S, HRES, SRES, SCONRES, HCONRES, HJRES, and SJRES.
bill_number
Positive bill number.
congress
Positive Congress number. Currently only the 119th Congress is supported.
temp_text_url
HTTPS fallback bill text URL for same-day coverage.
temp_title
Fallback title for same-day coverage.
colorway
Optional style selection.
temp_text_url and temp_title are fallback values for newly introduced bills. Use
them when a story embeds a bill on the same day it is introduced and official Congress data may not be
available to Neut yet.
Vote Breakdown
Use this widget to show House roll call votes for a representative, or a general House roll call feed when you do not want to target a single member.
widget_id
Fixed value.
instance_id
Unique widget placement ID.
article_id
Customer tracing value.
member_type
Must currently be Representative when targeting a single member. Omit together with the other member fields for a general House roll call feed request.
last_name
Member last name. Required only when targeting a single member.
state_code
Two-letter state code. Required only when targeting a single member.
district
Optional disambiguation for House members. Only valid with member_type=Representative. Use null for at-large representatives.
congress
Positive Congress number. Currently only the 119th Congress is supported.
page
Defaults to 1 in the browser/backend examples. Final iframe URL should include it.
limit
Defaults to 10 in the browser/backend examples. Final iframe URL should include it.
colorway
Optional style selection.
If you provide any member targeting fields, provide the full set: member_type,
last_name, and state_code. Do not send partial member filters.
vote-breakdown currently supports House roll call votes only. Senate recorded votes are not available in this widget yet.
Legislation By Subject
Use this widget on an issue or policy subject page, either for a single member or for general legislation on that subject.
widget_id
Fixed value.
instance_id
Unique widget placement ID.
article_id
Customer tracing value.
member_type
Must be Representative or Senator when targeting a single member. Omit together with the other member fields for a general subject request.
last_name
Member last name. Required only when targeting a single member.
state_code
Two-letter state code. Required only when targeting a single member.
district
Optional disambiguation for House members. Only valid with member_type=Representative. Use null for at-large representatives.
congress
Positive Congress number. Currently only the 119th Congress is supported.
subject
Must match a supported subject.
status_filter
Defaults to All.
show_subject_filter
Defaults to true if omitted by the final iframe URL.
show_status_filter
Defaults to true if omitted by the final iframe URL.
page
Defaults to 1 in the browser/backend examples. Final iframe URL should include it.
limit
Defaults to 10 in the browser/backend examples. Final iframe URL should include it.
colorway
Optional style selection.
If you provide any member targeting fields, provide the full set: member_type,
last_name, and state_code. Do not send partial member filters.
Supported Subjects
Use one of these values for subject:
Animals & Agriculture
Business & Trade
Crime
Culture and Society
Education
Energy & Conservation
Finance & Taxes
Geopolitics
Government Operations
Health & Social Welfare
Human, Civil, & Immigration Rights
Infrastructure & Housing
Labor & Employment
National Security & International Affairs
STEM
Supported Status Filters
Use one of these values for status_filter:
All
Introduced
With First Chamber
With Second Chamber
Presented to President
Became Law
Vetoed by President
Passed Resolutions
Supported Colorways
Use one of these values for colorway:
Default
Dark
Paper
WashedSage
Slate
MonoLight
Common aliases accepted by the hosted widgets include:
dark-mode
washed-sage
mono-light
Bootstrap URL Parameters
Your backend builds the final iframe URL. In addition to widget variables, the URL must include:
tenant_id
widget_id
customer_origin
bootstrap_timestamp
bootstrap_nonce
bootstrap_key_id
bootstrap_assertion
The hosted widget exchanges these bootstrap parameters with Neut. Do not put access_token,
origin, timestamp, nonce, key_id, or
signature legacy params in the iframe URL.
Parent Refresh Message
If the hosted widget detects an expired Neut widget session, it now sends a postMessage
request to the parent page so your site can re-mint a fresh iframe URL and reauthenticate the widget.
Message shape:
{
"type": "neut-widget-refresh-request",
"widget": "bill-preview | vote-breakdown | legislation-by-subject",
"instance_id": "your-widget-instance-id",
"reason": "session_expired"
}
The message is posted from the iframe to the configured customer_origin. Your parent page
should listen for this event, verify event.origin === "https://widgets.neut.us", verify the
message shape, then replace or reload the iframe using a newly signed bootstrap URL.