# Create Signature Request from Template — Signaturit

> Creates a signature request using a pre-existing template. See the documentation

- Key: `signaturit-create-signature-request-from-template`
- Type: Action (Write)
- Version: 0.1.2
- App: Signaturit (`signaturit`) — https://pipedream.com/apps/signaturit.md
- This page (HTML): https://pipedream.com/apps/signaturit/actions/create-signature-request-from-template
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/signaturit/actions/create-signature-request-from-template/create-signature-request-from-template.mjs

## Description

Creates a signature request using a pre-existing template. [See the documentation](https://docs.signaturit.com/api/latest#signatures_create_signature)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `body` | `string` | No | Email body (html code is allowed) for email and sms type requests. Note: For sms request types it will be truncated to 120 characters Note: For sms the body should contain the tag {{url}} where we will include the document url. |
| `brandingId` | `string` | No | ID of the branding to use. Options are loaded from the connected account. |
| `callbackUrl` | `string` | No | Url to redirect the user when finish the signature process. |
| `data` | `object` | No | Custom key-value data in JSON format. |
| `deliveryType` | `string` | No | Delivery type for signature request. |
| `expireTime` | `integer` | No | Expiration time of the document in days (max 365). |
| `eventsUrl` | `string` | No | URL to receive real-time events. |
| `files` | `string[]` | No | The file(s) to attach. For each entry, provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.txt) |
| `name` | `string` | Yes | Name assigned to the signature request. |
| `recipients` | `string[]` | Yes | List of recipients in JSON format, e.g., '{"name": "John Doe", "email": "john@example.com", "phone": "34555667788"}'. See the documentation for further information. |
| `cc` | `string[]` | No | List with email recipients containing name and email for people that will receive a copy of the signed document when the process is completed. e.g., '{"name": "John Doe", "email": "john@example.com"}'. |
| `replyTo` | `string` | No | Email Reply-To address. |
| `reminders` | `string[]` | No | Reminders in days to send automatic reminders. You can set it 0 to disable reminders. E.g. [1,3,4] |
| `signingMode` | `string` | No | The signing mode lets you control the order in which your recipients receive and sign your documents. |
| `subject` | `string` | No | Email subject for email type requests. |
| `templates` | `string[]` | Yes | Templates to use in the signature request. Options are loaded from the connected account. |
| `type` | `string` | No | The type of the signature. |
| `syncDir` | `dir` | No | 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": "signaturit",
      },
    },
  },
)

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: "signaturit-create-signature-request-from-template",
  arguments: {
    body: "Body",
    brandingId: "Branding 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: "signaturit-create-signature-request-from-template",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    signaturit: { authProvisionId: "apn_xxxxxxx" },
    body: "Body",
    brandingId: "Branding 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": "signaturit-create-signature-request-from-template",
    "configured_props": {
      "signaturit": { "authProvisionId": "apn_xxxxxxx" },
      "body": "Body",
      "brandingId": "Branding ID"
    }
  }'
```

---

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