# Create Employee — Peakon Employee Voice

> Creates a new employee record in Peakon. Requires firstName, lastName, and identifier (the HR employee number, e.g. E001 — must be unique). Optional standard fields: email, employeeType (permanent/contractor/temporary/volunteer/other)…

- Key: `peakon_employee_voice-create-employee`
- Type: Action (Write)
- Version: 0.0.2
- App: Peakon Employee Voice (`peakon_employee_voice`) — https://pipedream.com/apps/peakon-employee-voice.md
- This page (HTML): https://pipedream.com/apps/peakon-employee-voice/actions/create-employee
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/peakon_employee_voice/actions/create-employee/create-employee.mjs

## Description

Creates a new employee record in Peakon. Requires `firstName`, `lastName`, and `identifier` (the HR employee number, e.g. `E001` — must be unique). Optional standard fields: `email`, `employeeType` (permanent/contractor/temporary/volunteer/other), `employmentStatus`. Custom HR attributes such as Department, Region, and Job Level can be set via `customAttributes` as a JSON object — e.g. `{"Department": "Sales", "Region": "North America"}`. Returns the new employee record including the internal `id`, which can be used with **Update Employee** or **Delete Employee**. [See the Peakon API documentation](https://developer.peakon.com/reference/post_employees)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `firstName` | `string` | Yes | Employee's first name. |
| `lastName` | `string` | Yes | Employee's last name. |
| `identifier` | `string` | Yes | HR employee number or unique identifier (e.g. E001). Must be unique across employees. |
| `email` | `string` | No | Employee's work email address. |
| `employeeType` | `string` | No | Employment type. |
| `employmentStatus` | `string` | No | Current employment status (e.g. employed, on_leave). |
| `customAttributes` | `string` | No | JSON object of custom HR attributes for the employee. Example: {"Department": "Sales", "Region": "North America", "Job Level": "Manager"}. Enum values are accepted as plain strings. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "peakon_employee_voice",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "peakon_employee_voice-create-employee",
  arguments: {
    firstName: "First Name",
    lastName: "Last Name",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "peakon_employee_voice-create-employee",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    peakon_employee_voice: { authProvisionId: "apn_xxxxxxx" },
    firstName: "First Name",
    lastName: "Last Name",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "peakon_employee_voice-create-employee",
    "configured_props": {
      "peakon_employee_voice": { "authProvisionId": "apn_xxxxxxx" },
      "firstName": "First Name",
      "lastName": "Last Name"
    }
  }'
```

---

- App: https://pipedream.com/apps/peakon-employee-voice.md · All apps: https://pipedream.com/apps
