# Submit Feedback — Lever

> Submits an interview feedback form (scorecard) for an opportunity. Use this after an interview to record the interviewer's assessment. baseTemplateId is required — it identifies which feedback form template to submit against. Use List…

- Key: `lever-submit-feedback`
- 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/submit-feedback
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/lever/actions/submit-feedback/submit-feedback.mjs

## Description

Submits an interview feedback form (scorecard) for an opportunity. Use this after an interview to record the interviewer's assessment. `baseTemplateId` is required — it identifies which feedback form template to submit against. Use **List Feedback Templates** to resolve the template id and its field IDs. `panel` and `interview` are optional but linked: if you specify one, you must specify the other. Use **List Opportunity Items** (resource=interviews) to find panel and interview IDs. Use **List Opportunity Items** (resource=feedback) to check if feedback has already been submitted for this panel. `fieldValues` is a JSON array of `{"id": "<field_id>", "value": "<answer>"}` objects; the field IDs and valid values come from the template returned by **List Feedback Templates**. Perform As is required — feedback is attributed to this user. Use **List Users** to find user IDs. Example: call with opportunityId="<id>", performAs="<userId>", baseTemplateId="<templateId>", fieldValues=`[{"id": "<fieldId>", "value": "strong_yes"}]` → submits the scorecard and returns the created feedback record. [See the documentation](https://hire.lever.co/developer/documentation#create-a-feedback-form)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `opportunityId` | `string` | Yes | The ID of the opportunity. Use Search Opportunities to find opportunity IDs. |
| `performAs` | `string` | Yes | User ID of the interviewer submitting feedback — feedback is attributed to this user. Use List Users to find user IDs. |
| `baseTemplateId` | `string` | Yes | UID of the feedback form template to submit. Obtain from your Lever account's feedback template list. |
| `panelId` | `string` | No | Interview panel UID. Required if Interview ID is specified. Use List Opportunity Items (resource=interviews) to find panel IDs. |
| `interviewId` | `string` | No | Interview UID within the panel. Required if Panel ID is specified. Use List Opportunity Items (resource=interviews) to find interview IDs. |
| `fieldValues` | `string` | No | JSON array of field responses. Each item must have an id (field UID from the template) and a value. Example: [{"id": "abc123", "value": "Strong communicator"}, {"id": "def456", "value": "3 - Hire"}] |

## 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-submit-feedback",
  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-submit-feedback",
  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-submit-feedback",
    "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
