Skip to main content
POST
Update an employee

Authorizations

Authorization
string
header
required

Your secret API key, sent as Authorization: Bearer hmk_test_....

Headers

Hammock-Version
string

The API version to use for this request. Defaults to the version pinned to your API key.

Idempotency-Key
string

A unique value, up to 255 characters, that makes the request safe to retry for 24 hours.

Maximum string length: 255

Path Parameters

id
string
required

Body

application/json
email
string<email>
first_name
string
last_name
string
pay_schedule
string
date_of_birth
string<date>
ssn
string
write-only

Nine digits. Write-only.

Pattern: ^\d{9}$
phone
string
address
object
hire_date
string<date>
termination_date
string<date> | null

Set to terminate the employee. Send null to reinstate.

send_invitation
boolean

Send true to email the employee an invitation now.

metadata
object

Up to 50 key-value pairs you can attach to an object. Keys are up to 40 characters and values up to 500.

Example:

Response

The updated employee.

id
string
required
Example:

"emp_5Tg7Rw2nBx8P"

object
string
required
Allowed value: "employee"
employer
string
required
Example:

"empr_1Qx8Zt2eZvKYlo2C"

external_id
string
required

Your ID for this worker. Unique within the employer.

Example:

"wrk_4821"

email
string<email>
required
Example:

"jordan.lee@acmerobotics.example"

pay_schedule
string
required
Example:

"ps_7Hn3Kd9sLq2W"

status
enum<string>
required
Available options:
active,
terminated
enrollment_status
enum<string>
required

not_started: the employee hasn't opened enrollment. in_progress: they opened it and haven't elected anything. pending: they elected, and their accounts are being opened. enrolled: at least one benefit is active. not_enrolled: the enrollment window closed without an election. closed: every enrollment has ended.

Available options:
not_started,
in_progress,
pending,
enrolled,
not_enrolled,
closed
metadata
object
required

Up to 50 key-value pairs you can attach to an object. Keys are up to 40 characters and values up to 500.

Example:
livemode
boolean
required
created
string<date-time>
required
first_name
string | null
Example:

"Jordan"

last_name
string | null
Example:

"Lee"

date_of_birth
string<date> | null
Example:

"1991-06-14"

ssn_last4
string | null

Last four digits of the SSN. The full SSN is never returned.

Example:

"4321"

phone
string | null
Example:

"+14155550134"

address
object | null
hire_date
string<date> | null
Example:

"2027-02-08"

termination_date
string<date> | null
invited_at
string<date-time> | null

When Hammock last emailed the employee an invitation, if it did.