# Gusto

> Manage Gusto HR and payroll - employees, compensation, payroll runs, pay stubs, time tracking, benefits, tax documents, and webhooks via API.

Lets an agent read and manage your Gusto HR and payroll account - employees, compensation, payroll runs, pay stubs, time tracking, benefits, tax documents, and webhooks. Write actions (create/update/terminate/process/delete) are confirmed with you first.

## What it can do

| Method | What it does |
| --- | --- |
| `gusto_get_me` | Get the authenticated user (id, email, current company_id); call this first to find your company UUID. |
| `gusto_get_company` | Get company info - name, tax IDs, EIN, locations, employee count. |
| `gusto_list_locations` | List the company's locations (paginated). |
| `gusto_get_location` | Get one location by id. |
| `gusto_list_departments` | List the company's departments (paginated). |
| `gusto_get_department` | Get one department by id. |
| `gusto_list_employees` | List employees; optional include fields and pagination. |
| `gusto_get_employee` | Get one employee by id, with optional include fields. |
| `gusto_create_employee` | Create an employee (first_name, last_name, email; optional SSN, DOB, location, manager). |
| `gusto_update_employee` | Update an employee's name, email, or manager. |
| `gusto_terminate_employee` | Terminate an employee on a given termination date. |
| `gusto_rehire_employee` | Rehire a previously terminated employee. |
| `gusto_list_compensations` | List an employee's compensations (salary, hourly). |
| `gusto_update_compensation` | Update a compensation's rate and effective date. |
| `gusto_list_payroll_schedules` | List configured payroll schedules (weekly, biweekly, etc). |
| `gusto_list_payroll_runs` | List payroll runs; filter by status and paginate. |
| `gusto_get_payroll_run` | Get one payroll run with calculations and net/gross totals. |
| `gusto_calculate_payroll_run` | Calculate a payroll run - pre-process withholdings, deductions, and taxes. |
| `gusto_approve_payroll_run` | Approve a payroll run (open to approved). |
| `gusto_unapprove_payroll_run` | Un-approve a payroll run (approved back to open). |
| `gusto_process_payroll_run` | Process an approved payroll run for payment (cannot be undone). |
| `gusto_list_pay_stubs` | List an employee's pay stubs (paginated). |
| `gusto_get_pay_stub` | Get one pay stub - earnings, deductions, taxes, net pay. |
| `gusto_list_timesheets` | List timesheets; optional employee filter and pagination. |
| `gusto_get_timesheet` | Get one timesheet by id. |
| `gusto_list_timecard_entries` | List the timecard entries on a timesheet. |
| `gusto_create_timecard_entry` | Add a timecard entry (hours, optional note) to a timesheet. |
| `gusto_list_benefit_plans` | List the company's benefit plans (paginated). |
| `gusto_get_benefit_plan` | Get one benefit plan by id. |
| `gusto_list_benefit_enrollments` | List benefit enrollments; optional employee filter and pagination. |
| `gusto_get_benefit_enrollment` | Get one benefit enrollment by id. |
| `gusto_list_tax_documents` | List tax documents; filter by year and document type (W2, 1099, 940, 941, state). |
| `gusto_get_tax_document` | Get one tax document (W2, 1099-NEC/MISC, 940, 941, state forms). |
| `gusto_list_webhook_subscriptions` | List the company's webhook subscriptions. |
| `gusto_create_webhook_subscription` | Create a webhook subscription (HTTPS url plus event types). |
| `gusto_delete_webhook_subscription` | Delete a webhook subscription by id. |

## How to get credentials

Gusto connects over OAuth, so you do not paste a long-lived key - you authorize FlyMyAI to act on your Gusto account.

1. Sign in to your Gusto account at [app.gusto.com](https://app.gusto.com/).
2. In FlyMyAI, add the Gusto connector and click **Connect** to start the OAuth flow.
3. On the Gusto consent screen, review the requested access and approve it.
4. You are redirected back to FlyMyAI - the access token (`GUSTO_ACCESS_TOKEN`) is stored automatically.
5. Find your company UUID by running `gusto_get_me`, or set it once as `GUSTO_COMPANY_ID` so calls do not need to pass it each time.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `GUSTO_ACCESS_TOKEN` | Set automatically by the Gusto OAuth flow - no manual entry |
| `GUSTO_COMPANY_ID` *(optional)* | Your company UUID, from `gusto_get_me` or the Gusto dashboard |
