# Create Interview — Lever

> Schedules an interview for a candidate opportunity. Use this when asked to set up, book, or schedule an interview for a candidate. panel (Interview Panel UID), interviewers, date, duration, and Perform As are all required. Interviews can…

- Key: `lever-create-interview`
- Type: Action (Write)
- Version: 0.0.2
- App: Lever (`lever`) — https://pipedream.com/apps/lever.md
- This page (HTML): https://pipedream.com/apps/lever/actions/create-interview
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/lever/actions/create-interview/create-interview.mjs

## Description

Schedules an interview for a candidate opportunity. Use this when asked to set up, book, or schedule an interview for a candidate. `panel` (Interview Panel UID), `interviewers`, `date`, `duration`, and Perform As are all required. Interviews can only be created on panels where `externallyManaged == true`. `date` is a single Unix timestamp in milliseconds for when the interview occurs (e.g. `1700000000000`). `duration` is in minutes (e.g. `60`). `interviewers` is a comma-separated list of user IDs — each will be assigned to the interview. Use **List Users** to find user IDs. Use **Search Opportunities** to find the opportunity ID. Example: call with opportunityId="<id>", panelId="<panelId>" (from **List Opportunity Items** (resource=interviews)), interviewers="<userId>", date=1700000000000, duration=60, performAs="<userId>" → adds an interview to the panel and returns it. [See the documentation](https://hire.lever.co/developer/documentation#create-an-interview)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `opportunityId` | `string` | Yes | The ID of the opportunity to schedule an interview for. Use Search Opportunities to find opportunity IDs. |
| `performAs` | `string` | Yes | User ID of the person scheduling the interview — sets the interview creator. Use List Users to find user IDs. |
| `panelId` | `string` | Yes | Interview Panel UID. The panel must have externallyManaged == true. Use List Opportunity Items (resource=interviews) to find existing panel IDs. |
| `interviewers` | `string` | Yes | Comma-separated list of user IDs for interviewers (at least one required). Use List Users to find user IDs. Example: abc123,def456 |
| `date` | `integer` | Yes | Scheduled start time as a Unix timestamp in milliseconds (e.g. 1700000000000). |
| `duration` | `integer` | Yes | Interview duration in minutes. Minimum value is 1 (e.g. 30, 60). |
| `subject` | `string` | No | Interview subject or title (e.g. Technical Screen - Jane Doe). |
| `note` | `string` | No | Instructions or agenda for interviewers. |
| `location` | `string` | No | Interview location — conference room name, phone number, or video link (e.g. https://meet.google.com/abc-defg). |
| `feedbackReminder` | `string` | No | Frequency of feedback reminders to interviewers. Defaults to frequently (every 6 hours) if omitted. |

## 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": "lever",
      },
    },
  },
)

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: "lever-create-interview",
  arguments: {
    opportunityId: "Opportunity ID",
    performAs: "Perform As (User ID)",
  },
})
```

**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: "lever-create-interview",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    lever: { authProvisionId: "apn_xxxxxxx" },
    opportunityId: "Opportunity ID",
    performAs: "Perform As (User ID)",
  },
})

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": "lever-create-interview",
    "configured_props": {
      "lever": { "authProvisionId": "apn_xxxxxxx" },
      "opportunityId": "Opportunity ID",
      "performAs": "Perform As (User ID)"
    }
  }'
```

---

- App: https://pipedream.com/apps/lever.md · All apps: https://pipedream.com/apps
