Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

NationBuilder Sites API

A site is how supporters interact with your nation. Each site has a theme and many pages that can be drafted and published later to be viewed publicly. Read more about sites [here](https://support.nationbuilder.com/en/articles/2363313-set-up-your-website-for-success).

NationBuilder Sites API is one of 41 APIs that NationBuilder publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Sites. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, and a getting-started guide.

This API exposes 1 operation across 1 path, and defines 11 schemas. It is described by OpenAPI 3.1.2, at version 2.0.

Requests are made against a single base URL, https://{subdomain}.nationbuilder.com.

1 operations 1 paths 11 schemas 1 GET

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.2
API Version
2.0
Base URL
https://{nation-slug}.nationbuilder.com/api/v2
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

NationBuilder Sites API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (JWT) (BearerAuth). By default, every request must be authenticated.

  • BearerAuth — Authentication using a bearer token (JWT) issued via OAuth.

Paths & Operations 1

Across 1 path, the API surfaces 1 operation — 1 GET. Each is listed below with its method, path, parameters, and response codes.

Sites 1

A site is how supporters interact with your nation. Each site has a theme and many pages that can be drafted and published later to be viewed publicly. Read more about sites [here…

GET
/api/v2/sites
List all sites in a nation
listSites 4 params → 200401429

Schemas 11

The contract defines 11 schemas that model the data the API accepts and returns. The most detailed are pagination_links (5 properties), index_document (4 properties), site_read_only_attributes (3 properties), resource_identifier (2 properties). Each schema is shown below with its type and property counts.

error_response
object
The error body returned for 4xx and 5xx responses, with a machine-readable code and a human-readable message. Some errors include additional detail members alo…
2 properties 2 required
resource_identifier
object
A JSON:API resource identifier object, the type/id pair that uniquely identifies a single resource.
2 properties 2 required
pagination_links
object
JSON:API pagination links for the pages of a collection. A key whose page is unavailable, or that the server's pagination strategy does not provide, is omitted…
5 properties
site_index_response
A paginated JSON:API response containing a list of sites.
index_document
object
The JSON:API top-level document shape for paginated collection responses, with resource objects under data and pagination links.
4 properties 1 required
site_field_values
string
Readable site attribute names selectable with sparse fieldsets (fields[sites]).
rate_limited_response
object
The body returned by the rate limiter when an access token exceeds its request quota.
1 property 1 required
site_read_only_attributes
object
The read-only attributes of a site.
3 properties
site_response_data
The JSON:API resource object representing a site.
resource
A generic JSON:API resource object. Resources sideloaded in a document's included member use this shape; their attributes are those of the resource type named…
included
array
Sideloaded resources requested via the include query parameter. Each entry is a full resource object whose shape is documented under its own resource type.

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

nationbuilder-sites-api-openapi.yml Raw ↑

Other APIs NationBuilder publishes across the network.

NationBuilder Async Processes API
NationBuilder Automation Enrollments API
NationBuilder Automations API
NationBuilder Ballots API
NationBuilder Broadcasters API
NationBuilder Contacts API
NationBuilder Custom Fields API
NationBuilder Donation Tracking Codes API
NationBuilder Donations API
NationBuilder Elections API
NationBuilder Event Rsvps API
NationBuilder Event Ticket Levels API