> ## Documentation Index
> Fetch the complete documentation index at: /help/llms.txt
> Use this file to discover all available pages before exploring further.

# PandaDoc

> Create a PandaDoc proposal from a template for a contact, send it, and check until it's signed, with Poll until steps.

> [!NOTE]
>
> **Pro plan.** PandaDoc works through a connection and HTTP steps, which are part of Pro and Agency (and the free trial). Anything you already have keeps working on every plan. See [Plans and billing](/help/account/billing.md).

When a contact asks for a proposal, a follow-up campaign creates it from your PandaDoc template with their name and company, sends it, and checks every few hours until it's signed.

> [!NOTE]
>
> **How it connects:** PandaDoc's public API with an API key. See PandaDoc's [Create document from template](https://developers.pandadoc.com/reference/create-document-from-pandadoc-template), send document and document status docs. The requests and answers below follow PandaDoc's docs.

## Before you start

* **PandaDoc plan:** the API is on PandaDoc's API plans and Enterprise; a sandbox key is free for testing (PandaDoc's docs).
* **An API key:** generate one in PandaDoc's developer dashboard.
* **A template** with a recipient role (for example `Client`) and tokens such as `Client.FirstName`.

## 1. Connect PandaDoc

In Kerux, open **Integrations > Connections**, click **Connect** on **Custom API** (under **Developers**):

* **How it signs in:** **API key in a header**, **Header name** `Authorization`, and paste `API-Key ` followed by your key.
* **Base URL:** `https://api.pandadoc.com`

Click **Save**.

## 2. Create the document and wait for draft

When a contact asks for a proposal, tag them or let the **When the contact replies** box send them (with **Send to another campaign**) to a follow-up campaign. Its first step is a **Poll until** step named `proposal`:

```json theme={null}
{
  "start": {
    "method": "POST",
    "url": "/public/v1/documents",
    "bodyType": "json",
    "body": {
      "name": "Proposal - {{contact.company}}",
      "template_uuid": "YOUR_TEMPLATE_ID",
      "recipients": [
        { "email": "{{email}}", "first_name": "{{contact.first_name}}", "last_name": "{{contact.last_name | optional}}", "role": "Client" }
      ]
    }
  },
  "request": {
    "method": "GET",
    "url": "/public/v1/documents/{{steps.proposal_start.response.body.id}}",
    "bodyType": "none"
  },
  "until": { "path": "status", "op": "eq", "value": "document.draft" },
  "intervalMinutes": 1,
  "maxAttempts": 10
}
```

PandaDoc first answers with the id and `"status": "document.uploaded"`; its docs say to send only once the status is `document.draft`.

## 3. Send it

A **Webhook / HTTP** step:

```json theme={null}
{
  "method": "POST",
  "url": "/public/v1/documents/{{steps.proposal_start.response.body.id}}/send",
  "bodyType": "json",
  "body": { "message": "Hi {{contact.first_name}}, here's the proposal we talked about.", "silent": false }
}
```

## 4. Check until it's signed

A second **Poll until** step: GET `/public/v1/documents/{{steps.proposal_start.response.body.id}}` until `status` equals `document.completed`, every 360 minutes, 28 checks (7 days). On success, a thank-you message on LinkedIn and a **Slack message** to the owner; on timeout, a gentle nudge.

PandaDoc also has webhooks, but it sends events as a list, so checking with **Poll until** is simpler here.

## Test with one contact

Use the sandbox key and your own email on a test contact. Run **Test on one contact** from the **Builder**; the journey shows each check and PandaDoc's answers.

## Common errors

> [accordion] 401 Unauthorized
>
> The header must be `Authorization: API-Key <your key>`, with `API-Key ` before the key.

> [accordion] 400 when sending
>
> The document wasn't in `document.draft` yet, or a recipient's role doesn't exist in the template.

> [accordion] The second check times out
>
> Nobody signed in 7 days. Raise the checks, or follow up by hand.

Related: [Webhook steps](/help/integrations/webhook-steps.md), [Stripe](/help/integration-guides/stripe.md), [Pipedrive](/help/integration-guides/pipedrive.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.