Blog / Everyaction· December 1, 2026

Connecting Your Website to EveryAction and NGP VAN

Embed EveryAction forms with ActionTag, or use the NGP VAN API to find or create people and apply activist codes. Auth, access tiers, and examples.

Gary Bunofsky

Gary Bunofsky

Lead Developer

Stacked sheets of paper

There are two ways to get data from your website into EveryAction or NGP VAN. You can embed an Online Actions form with ActionTag, which needs no API key. Or you can build your own form and send the data through the NGP VAN API.

Embeds are faster to ship. The API gives you full control over the form and lets you do things embeds can't, like apply an activist code based on which page someone signed up on. This guide covers both.


1. Embed an Online Actions Form With ActionTag

If the form you need already exists in EveryAction, embed it. EveryAction generates the code for you in the form's settings. It looks like this:

<link rel="stylesheet" href="https://static.everyaction.com/ea-actiontag/at.min.css">
<script src="https://static.everyaction.com/ea-actiontag/at.js" crossorigin="anonymous"></script>

<div
  class="ngp-form"
  data-form-url="https://secure.everyaction.com/v1/Forms/YOUR_FORM_ID"
  data-fastaction-endpoint="https://fastaction.ngpvan.com"
  data-inline-errors="true"
></div>

Copy the snippet EveryAction gives you rather than retyping this one, since the data attributes vary by form and account.

ActionTag renders the form directly into your page's HTML, not into an iframe. That means your site's CSS can reach it. The fields use classes that start with .at-, such as .at-row, .at-text, and .at-submit, so you can scope your styles to them:

.ngp-form .at-text input {
  border: 1px solid #d6d3d1;
  border-radius: 0.375rem;
  padding: 0.75rem;
}

.ngp-form .at-submit {
  background: #111827;
  color: #fff;
}

Keep your selectors scoped to .ngp-form so you don't restyle the rest of the page. Our guide to styling EveryAction forms has more on keeping a light touch.

If you need to run code after the form appears, ActionTag reads a global nvtag_callbacks object:

var nvtag_callbacks = nvtag_callbacks || {};
nvtag_callbacks.postRender = nvtag_callbacks.postRender || [];
nvtag_callbacks.postRender.push(function () {
  // The form is now in the page. Add classes, move elements, attach analytics.
});

Define it before the at.js script loads so your callback is registered in time.


2. When to Use the API Instead

Use the API when:

  • The form has to match a design ActionTag can't produce.
  • One form feeds different activist codes or source codes depending on the page.
  • Data comes from somewhere other than a form, like an event app or a donation tool.
  • You're syncing EveryAction with another database.

The trade-off is a server. The NGP VAN docs are explicit that API keys must never be exposed in client-side scripts. Your form posts to your own endpoint, and that endpoint talks to NGP VAN.


3. Authentication

Every request goes to https://api.securevan.com/v4 using HTTP Basic authentication:

  • Username: your application name.
  • Password: your API key, a pipe, and a database mode: YOUR-API-KEY|1.

The database mode is 0 for My Voters and 1 for My Campaign. EveryAction nonprofits work in My Campaign, so you'll almost always use 1. Campaigns working with voter file data use 0 for that context.

Each key is tied to one database, tab, and committee, and only sees data in that context. Use a separate key for each application.

Test your credentials with the echo endpoint. It's a POST, not a GET:

curl -X POST https://api.securevan.com/v4/echoes \
  -u "your-app-name:YOUR-API-KEY|1" \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello, world"}'

If it echoes your message back, you're connected. GET /apiKeyProfiles tells you which database, committee, and mode the key is attached to, which saves a lot of guessing.


4. Plan Your Access Tier Before You Build

NGP VAN gates API endpoints by tier. New developers get Tier 1 sandbox access by default, which lets you send data in but not export it. Higher tiers require a review.

A few examples from NGP VAN's tier table:

  • Finding and creating people, and activist codes, are Tier 1.
  • Online Actions forms through the API are Tier 2 and only available in My Campaign.
  • Changed entity exports, the main way to pull bulk changes out, are Tier 4.

List every endpoint you plan to use before you start, and apply for the tier that covers all of them. Discovering halfway through that you need a higher tier is the most common way these builds stall. NGP VAN's API team can answer questions at the developer contact listed in their docs.

Also note that sandbox match rates can differ from production, so test matching against real data before launch.


5. Find or Create a Person

POST /people/findOrCreate matches the person you send against the database. If there's no match, it creates a new record.

// server-side
const auth = Buffer.from(
  `${process.env.VAN_APP_NAME}:${process.env.VAN_API_KEY}|1`
).toString('base64');

const response = await fetch('https://api.securevan.com/v4/people/findOrCreate', {
  method: 'POST',
  redirect: 'manual',
  headers: {
    Authorization: `Basic ${auth}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    firstName: data.firstName,
    lastName: data.lastName,
    emails: [{ email: data.email }],
    addresses: [{ zipOrPostalCode: data.zip, countryCode: 'US' }],
  }),
});

const { vanId, status } = await response.json();

The response gives you a vanId and a status:

  • Matched returns HTTP 302.
  • UnmatchedStored returns HTTP 201, meaning a new record was created.

Note the redirect: 'manual' above. A match comes back as a 302 with a Location header, and many HTTP clients follow redirects automatically. Turn that off so you read the vanId from the original response.

Matching only works if you send enough information. The minimum combinations include first name, last name, and email, or first name, last name, and phone, or an email address on its own. Send less than that and NGP VAN creates a new record every time, which is how databases fill with duplicates.

Some other details from the docs:

  • emails, phones, and addresses must be arrays. An object in their place is silently ignored.
  • Matching ignores case and accents.
  • Your database may have stricter matching rules turned on. Your VAN administrator can tell you which.

6. Apply an Activist Code

Activist codes are applied through the canvass responses endpoint, using the vanId from the last step:

curl -X POST https://api.securevan.com/v4/people/VAN_ID/canvassResponses \
  -u "your-app-name:YOUR-API-KEY|1" \
  -H "Content-Type: application/json" \
  -d '{
    "canvassContext": {
      "contactTypeId": 37,
      "inputTypeId": 11,
      "dateCanvassed": "2026-12-01T12:00:00-05:00"
    },
    "responses": [
      { "activistCodeId": 12345, "action": "Apply", "type": "ActivistCode" }
    ]
  }'

A successful request returns 204 No Content.

The IDs in that example are placeholders. Look up the real ones for your database first: GET /activistCodes for activist codes, and GET /canvassResponses/contactTypes and GET /canvassResponses/inputTypes for the context values. Store them in configuration, not in code, since they differ between databases.


7. Getting Data Back Out

The API docs don't describe a general webhook feed. For ongoing exports, NGP VAN offers changed entity export jobs, which return records changed since a given time. They sit at Tier 4, so request that access early if your build depends on it.

For donations, the flow usually runs the other way. ActBlue, for example, has a self-serve NGP VAN integration that sends contributions in. Our guide to adding ActBlue to your website covers the website side.


Embed or API?

Start with ActionTag. It's supported, needs no key, and with scoped CSS it can look like the rest of your site. Move to the API when the form has to do something ActionTag can't, and budget time for the tier review.

If your organization also runs Action Network, the same split applies there. See our guides to integrating Action Network forms and the Action Network API.


Want Help With the Build?

We connect nonprofit websites to EveryAction, NGP VAN, and the tools around them. That includes ActionTag embeds, custom forms, and the integrations and workflows behind them. Tell us what you're trying to do.

More thinking

All posts
A megaphone
mobilize · December 1, 2026

How to Show Mobilize Events on Your Website

Use the public Mobilize API to list your upcoming events on your own site. Finding your organization ID, filters, rendering, caching, and RSVPs.

Tall stone pillars in soft light, suggesting a building under construction.
nonprofit · December 1, 2026

Who Designs Capital Campaign Websites for Nonprofits?

Your options for a capital campaign website, what the site needs to do at each phase, and how Loopdash designs and builds them for nonprofits.

Loose sheets of paper on a desk
actblue · December 1, 2026

How to Add ActBlue Donation Forms to Your Website

Link, embed, or open ActBlue in a modal from your own site. Refcodes, URL parameters, conversion tracking, and getting donations into your CRM.