Benbase

2. Connect API

Set up webhooks and respond to census data requests from Benbase.

Connect API

Since your payroll engine isn't directly supported, you provide employee census data when Benbase requests it via webhook. Benbase needs this data to generate accurate benefit quotes for the employer's employees.


Set Up Webhooks

Webhooks are how Benbase communicates with your system asynchronously. You register an endpoint, and Benbase sends HTTP POST requests to it when events occur.

Access the Svix Portal

  1. Log in to Benbase Embed (sandbox or live)
  2. Go to Svix Portal Access tab
  3. Click Get Portal URL to generate a portal link
  4. In the portal, add your webhook endpoint URL

Benbase Embed dashboard showing the Svix Portal Access tab and Get Portal URL button

Subscribe to events

EventWhen it fires
employee-census.sync-requestBenbase needs employee census data from you
employee-census.sync-completeCensus data has been processed
employee.deduction-updatedEmployee enrolled/changed benefits — deduction data available

Webhook requirements

  • Return a 2xx status code within 15 seconds
  • Disable CSRF protection for your webhook endpoint if your framework enables it by default
  • Verify signatures — Svix signs every webhook. See Svix verification docs
  • Failed deliveries are retried automatically by Svix with exponential backoff

To revoke all active portal sessions, click Revoke All Sessions in the Svix Portal Access tab. For testing webhooks locally, see the Svix testing guide.


Handle Census Requests

When Benbase needs employee data, you receive a employee-census.sync-request webhook:

{
  "data": { "employer_id": "<employer-id>" },
  "event_type": "employee-census.sync-request",
  "id": "<webhook-event-id>"
}

Respond by uploading your complete employee census. Include all active employees, not just new hires.

Census endpoint

POST /employer/{employer_id}/census

curl -X POST https://embed-sandbox.benbase.com/api/employer/<employer-id>/census \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "organization": {
      "legal_business_name": "<business-name>",
      "fein": "<fein>",
      "entity_type": "LLC",
      "contact": {
        "first_name": "<contact-first-name>",
        "last_name": "<contact-last-name>",
        "email": "<contact-email>"
      },
      "address": {
        "line1": "<address-line1>",
        "city": "<city>",
        "state": "<state-code>",
        "zip_code": "<zip-code>"
      }
    },
    "employees": [{
      "employee_id": "<employee-id>",
      "first_name": "<first-name>",
      "last_name": "<last-name>",
      "dob": "<YYYY-MM-DD>",
      "address": {
        "line1": "<address-line1>",
        "city": "<city>",
        "state": "<state-code>",
        "zip_code": "<zip-code>"
      },
      "hire_date": "<YYYY-MM-DD>",
      "email": "<employee-email>",
      "hours_worked": "<hours-per-week>",
      "pay_rate": [{
        "amount": "<amount>",
        "period": "annually",
        "effective_start": "<YYYY-MM-DD>"
      }],
      "employment_status": "full_time"
    }]
  }'

You'll receive employee-census.sync-complete when processing is done.

Census request timing varies — make sure your endpoint is ready before rendering the Employer Flow.

Organization fields

FieldTypeRequiredDescription
legal_business_namestringYesLegal name of the business
feinstringYesFederal Employer Identification Number
entity_typestringNoC-Corp, S-Corp, B-Corp, LLC, Non-profit, or Sole Proprietor
contactobjectYesSee Contact fields below
addressobjectYesSee Address fields

Contact fields:

FieldTypeRequiredDescription
first_namestringYesContact person's first name
last_namestringYesContact person's last name
emailstringYesContact person's email

Employee fields (required)

FieldTypeDescription
employee_idstringYour internal employee ID
first_namestringMax 255 characters
last_namestringMax 255 characters
dobstringYYYY-MM-DD format
addressobjectSee Address fields
hire_datestringYYYY-MM-DD format
emailstringValid email, max 254 characters
hours_workedstringHours per week
pay_ratearraySee Pay Rate fields
employment_statusstringfull_time or part_time

Employee fields (optional)

FieldTypeDescription
ssnstringSocial Security Number (stored encrypted, only last 4 digits displayed)
phone_numberstringMax 10 characters
termination_datestringYYYY-MM-DD format
biological_sexstringmale or female
pay_frequencystringweekly, biweekly, semimonthly, or monthly
job_titlestringMax 255 characters

If you have a personal email address, use that one as benefits could continue after employment ends.

Address fields

FieldTypeRequiredDescription
line1stringYesPrimary address line
line2stringNoApartment, suite, etc.
citystringYesCity name
statestringYesTwo-letter state code (e.g. NY, CA, TX)
zip_codestringYesZIP code

Pay Rate fields

FieldTypeRequiredDescription
amountstringYesPay amount, rounded to 2 decimal places (e.g. "75000.00")
periodstringYesannually or hourly
effective_startstringYesWhen the rate takes effect (YYYY-MM-DD)

Next step

Sync Data