> ## Documentation Index
> Fetch the complete documentation index at: https://partners.usehammock.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Onboard employers

> Create an employer, send its admin through hosted setup, and track it to active.

An employer is a company you offer Hammock benefits to. You create it with the details you
already hold, and Hammock's hosted setup collects the rest: business verification, signed
agreements, a bank account and the benefits the employer wants to offer.

## Create the employer

```bash theme={null}
curl https://api.usehammock.co/employers \
  -H "Authorization: Bearer hmk_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6b1f4c0e-2a8d-4d7b-9c3e-5f0a1b2c3d4e" \
  -d '{
    "name": "Acme Robotics",
    "legal_name": "Acme Robotics, Inc.",
    "external_id": "company_8f2k1",
    "ein": "123456789",
    "address": {
      "line1": "500 Howard St",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94105",
      "country": "US"
    },
    "primary_contact": {
      "first_name": "Dana",
      "last_name": "Whitfield",
      "email": "dana@acmerobotics.example"
    }
  }'
```

Everything beyond `name`, `external_id` and `primary_contact` is optional and prefills hosted
setup. `external_id` is your own company ID. It must be unique across your employers, and you can
look an employer up by it with `GET /employers?external_id=...`.

## Send the admin to hosted setup

Create an employer link when the admin clicks through from your product, then redirect them to
its `url`.

```bash theme={null}
curl https://api.usehammock.co/employer_links \
  -H "Authorization: Bearer hmk_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 7d26530e-bd50-445c-af49-e0370811b078" \
  -d '{
    "employer": "empr_1Qx8Zt2eZvKYlo2C",
    "type": "onboarding",
    "return_url": "https://partner.example/benefits/hammock/done",
    "refresh_url": "https://partner.example/benefits/hammock/start"
  }'
```

Links are single-use and expire a few minutes after creation. Don't email them or store them.

* **`return_url`** is where the admin lands when they finish or leave. Landing there doesn't mean
  setup is complete, so check `requirements` before you show a success state.
* **`refresh_url`** is where Hammock sends an admin whose link expired or was already used. Create
  a fresh link there and redirect again.

An admin can leave and come back. Create a new link each time and setup resumes where they
stopped.

## Statuses and requirements

| Status | Meaning |
| - | - |
| `onboarding` | Hosted setup isn't finished. `requirements.currently_due` lists what's left. |
| `pending_review` | Setup is submitted. Hammock and its banking partner are reviewing it. |
| `active` | Employees can enroll and you can report payrolls. |
| `closed` | The employer no longer offers Hammock benefits. |

Every employer is reviewed by Hammock before it goes live, and you get an `employer.activated`
event when review finishes.

```json theme={null}
{
  "id": "empr_1Qx8Zt2eZvKYlo2C",
  "object": "employer",
  "status": "onboarding",
  "requirements": {
    "currently_due": ["agreements", "bank_account"],
    "pending_verification": ["business_verification"],
    "disabled_reason": "requirements.currently_due"
  }
}
```

| Requirement | What it covers |
| - | - |
| `company_details` | Legal name, EIN and address |
| `authorized_signer` | The person who signs for the company, and their identity |
| `business_verification` | Know-your-business checks, and any documents they call for |
| `agreements` | The plan and service agreements, signed in hosted setup |
| `bank_account` | The account Hammock debits, and its ACH authorization |
| `benefit_plan` | Which benefits the employer offers, and its contributions |
| `pay_schedule` | At least one [pay schedule](https://partners.usehammock.co/guides/pay-schedules.md) |
| `hammock_review` | Hammock's own review of the completed setup |

Requirements can come back after an employer is active, for example when a bank account is
closed. Listen for `employer.updated` and send the admin a link of type `update`.

## What you can do before an employer is active

You can create pay schedules and employees as soon as the employer exists, so the roster is ready
when review finishes. Enrollment links and payroll reports need an `active` employer and return
an `employer_not_active` error until then.

## Billing

Hosted setup doesn't ask the employer for a payment method. Hammock invoices you for the
employers you bring, and you bill them as part of your own pricing.

> [!NOTE]
>
> Connecting an employer that already uses Hammock directly isn't part of this preview. Tell us if
> you have customers in that position.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.