Skip to content
Get started

Create employer

client.employers.create(EmployerCreateParams { address, ein, legal_name, name } body, RequestOptionsoptions?): Employer { id, active, created_at, 7 more }
post/v1/employers

Creates a new employer for the authenticated organization. Requires employer name, legal name, EIN, and address information. Returns the created employer with its assigned ID.

ParametersExpand Collapse
body: EmployerCreateParams { address, ein, legal_name, name }
address: Address

Employer address

city: string

City name

state: string

Two-letter state code

maxLength2
minLength2
street_1: string

Primary street address

zip_code: string

ZIP code

country?: string

Country code

street_2?: string | null

Secondary street address

ein: string

Employer Identification Number (format: XX-XXXXXXX or XXXXXXXXX)

maxLength10
minLength9
name: string

Employer display name

maxLength255
minLength1
ReturnsExpand Collapse
Employer { id, active, created_at, 7 more }

Serializer for Employer entity in public API responses.

Matches EmployerEntity from company module domain.

id: string

Unique employer identifier with 'empr_' prefix

active: boolean

Whether the employer is currently active in the system

created_at: string

Timestamp when the employer was created

formatdate-time
name: string

Display name of the employer

organization_id: string

ID of the parent organization (org_*)

updated_at: string

Timestamp when the employer was last updated

formatdate-time
address?: Address | null

Nested address within EmployerSerializer.

city: string

City name

state: string

Two-letter state code (e.g., CA, NY)

street_1: string

Primary street address

zip_code: string

ZIP code (5 or 9 digit)

country?: string

Country code (default: US)

street_2?: string | null

Secondary street address (apt, suite, etc.)

ein?: string | null

Employer Identification Number (masked in responses)

eligibility_policy_id?: string | null

ID of the benefit eligibility policy (epol_*), if assigned

Create employer
import VitableConnectAPI from 'vitable-connect-api';

const client = new VitableConnectAPI({
  apiKey: 'My API Key',
});

const employer = await client.employers.create({
  address: { city: 'city', state: 'xx', street_1: 'street_1', zip_code: 'zip_code' },
  ein: 'xxxxxxxxx',
  legal_name: 'x',
  name: 'x',
});

console.log(employer.id);
{
  "id": "id",
  "active": true,
  "created_at": "2019-12-27T18:11:19.117Z",
  "legal_name": "legal_name",
  "name": "name",
  "organization_id": "organization_id",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "address": {
    "city": "city",
    "state": "state",
    "street_1": "street_1",
    "zip_code": "zip_code",
    "country": "country",
    "street_2": "street_2"
  },
  "ein": "ein",
  "eligibility_policy_id": "eligibility_policy_id"
}
Returns Examples
{
  "id": "id",
  "active": true,
  "created_at": "2019-12-27T18:11:19.117Z",
  "legal_name": "legal_name",
  "name": "name",
  "organization_id": "organization_id",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "address": {
    "city": "city",
    "state": "state",
    "street_1": "street_1",
    "zip_code": "zip_code",
    "country": "country",
    "street_2": "street_2"
  },
  "ein": "ein",
  "eligibility_policy_id": "eligibility_policy_id"
}