Sites API

Use the Sites APi to get information about the individual sites hosted by a nation.  This information is useful for gathering information for interacting with page APIs.

Index Endpoint

GET /api/v1/sites

Parameters:

  • page - page number
  • per_page - number of results to display per page (max 100)

Example:

  Issuing a request like this:

  GET https://foobar.nationbuilder.com/api/v1/sites

  Should give you a response like this:

{ 
  "page": 1, 
  "total_pages": 1, 
  "per_page": 10, 
  "total": 2, 
  "results": [ 
    { 
      "id": 1, 
      "name": "Foobar", 
      "slug": "foobar", 
      "domain": "foobarsoftwares.com" 
    }, 
    { 
      "id": 2, 
      "name": "Test Site", 
      "slug": "test", 
      "domain": null 
    } 
  ] 
}
Do you like this page?

Be the first to comment

Wrap code snippets in <code></code> tags.
Please check your e-mail for a link to activate your account.