# Create Application — Personio

> Creates a new application. See the documentation

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

## Description

Creates a new application. [See the documentation](https://developer.personio.de/reference/post_v1-recruiting-applications)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `companyId` | `string` | Yes | Your company id provided at https://{YOUR_COMPANY}.personio.de/configuration/api/credentials/management |
| `recruitingAccessToken` | `string` | Yes | Your recruiting access Token provided at https://{YOUR_COMPANY}.personio.de/configuration/api/credentials/management |
| `firstName` | `string` | Yes | First name(s) of the applicant. Must not be empty or only whitespaces. |
| `lastName` | `string` | Yes | Last name(s) of the applicant. Must not be empty or only whitespaces. |
| `email` | `string` | Yes | Email address of the applicant. |
| `jobPositionId` | `integer` | Yes | The personio internal id of the job this application should belong to. Access your positions page at https://{YOUR_COMPANY}.personio.de/recruiting/positions; Select a position; If your current URL is https://{YOUR_COMPANY}.personio.de/recruiting/positions/12345, then your Job Position ID is 12345 |
| `recruitingChannelId` | `string` | No | The recruiting channel this application was sourced from. See https://{YOUR_COMPANY}.personio.de/configuration/recruiting/channels. |
| `externalPostingId` | `string` | No | The external id of the job posting (E.g. the external id forwarded by Gohiring). |
| `message` | `string` | No | The applicant supplied free-text message. |
| `applicationDate` | `string` | No | The application date (yyyy-mm-dd). It cannot be a date in the future. |
| `tags` | `string[]` | No | Tags to be associated with this application. Non-existing tags will be created. See https://{YOUR_COMPANY}.personio.de/configuration/recruiting/tags. |
| `files` | `string[]` | No | A list of references to previously updated files. These will be attached to the new application. Each file item consists of an uuid, an original_filename and a category. See the documentation. |
| `attributes` | `string[]` | No | A list of attributes for this applicant. Each attribute item consists of an id and a value. See the documentation. |
| `phaseType` | `string` | No | The type of application phase. |

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

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: "personio-create-application",
  arguments: {
    companyId: "Company Id",
    recruitingAccessToken: "Recruiting Access Token",
  },
})
```

**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: "personio-create-application",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    personio: { authProvisionId: "apn_xxxxxxx" },
    companyId: "Company Id",
    recruitingAccessToken: "Recruiting Access Token",
  },
})

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": "personio-create-application",
    "configured_props": {
      "personio": { "authProvisionId": "apn_xxxxxxx" },
      "companyId": "Company Id",
      "recruitingAccessToken": "Recruiting Access Token"
    }
  }'
```

---

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