# Start Signature — Openum

> Initiates an electronic document delivery process to recipient(s). See the documentation

- Key: `openum-start-signature`
- Type: Action (Write)
- Version: 0.0.1
- App: Openum (`openum`) — https://pipedream.com/apps/openum.md
- This page (HTML): https://pipedream.com/apps/openum/actions/start-signature
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/openum/actions/start-signature/start-signature.mjs

## Description

Initiates an electronic document delivery process to recipient(s). [See the documentation](https://api.lleida.net/dtd/openum/v1/en/)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `requestId` | `string` | No | Optional reference of the request. |
| `configId` | `string` | Yes | Numerical ID of the configuration. Options are loaded from the connected account. |
| `contractId` | `string` | Yes | Client reference of the process. This reference is provided as the unique identifier for the process. If auto_cancel is enabled in the configuration and an existing reference is specified, the previous pending process will be automatically canceled. |
| `levels` | `string` | Yes | Definition of the viewing level/order as a JSON array. Each level object supports: level_order (integer, 0 to N), required_signatories_to_complete_level (optional integer), and signatories (array of recipient objects with fields: phone, email, name, surname, id_number, landing_access_methods, landing_access_code, landing_information). The maximum is 20 recipients across all levels. Example: [ { "level_order": 0, "signatories": [{ "email": "user@example.com", "name": "John", "surname": "Doe", "phone": "+34666666666" }] } ] |
| `filePaths` | `string[]` | Yes | PDF files to deliver to the recipients. Provide paths to files in the /tmp directory (e.g. /tmp/contract.pdf) or direct URLs to PDF files. Only PDF format is accepted. Maximum 20 files, 25 MB total. |
| `syncDir` | `dir` | Yes | SyncDir |

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

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: "openum-start-signature",
  arguments: {
    requestId: "Request ID",
    configId: "Config 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: "openum-start-signature",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    openum: { authProvisionId: "apn_xxxxxxx" },
    requestId: "Request ID",
    configId: "Config 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": "openum-start-signature",
    "configured_props": {
      "openum": { "authProvisionId": "apn_xxxxxxx" },
      "requestId": "Request ID",
      "configId": "Config ID"
    }
  }'
```

---

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