# Activepieces e-signature integration

An Activepieces flow can call docuinked today with the HTTP piece, and start from a catch webhook. A docuinked piece is coming soon.

## What works today

| Route | Status |
|---|---|
| HTTP piece, Send Request | Works now, on cloud and self-hosted |
| Webhook trigger | Works now |
| docuinked piece | Coming soon |

## Recipe: send from a flow

Add the **HTTP** piece and choose **Send Request**.

- Method: `POST`
- URL: `https://docuinked.com/v1/documents`
- Headers: `Authorization` as `Bearer di_test_...`, and `Idempotency-Key` from a stable value in the trigger
- Body type: JSON

```json
{"title": "Vendor agreement",
 "pdf_url": "https://example.com/vendor.pdf",
 "signers": [{"name": "Dana Reed", "email": "dana@example.com"},
             {"name": "Sam Ortiz", "email": "sam@example.com"}],
 "ordered": true,
 "send": true}
```

With `ordered` set, the second signer is emailed only after the first has signed.

## Recipe: start a flow when it is signed

Create a flow with the **Webhook** trigger and copy its live URL. Register it with `create_webhook`. Add a branch on `type`. For `document.completed`, call `GET https://docuinked.com/v1/documents/` plus the `document` value, then `signed_pdf` to fetch the file as base64.

## Self-hosting note

If you run Activepieces on your own server, its webhook URL must be public https on the default port, or `create_webhook` will refuse it. We block private addresses on purpose. Put the receiver behind your normal reverse proxy.

## Common questions

### When will there be a docuinked piece?

It is coming soon, and we have no date to share. Flows built on the HTTP piece will keep working after it ships.

### Can I use docuinked from an Activepieces AI agent?

Yes, by calling the API as a tool. Use a key set to "Needs my approval", so anything the agent drafts waits for a person.

### How do I attach a PDF that isn't public?

Send it as `pdf_base64` in place of `pdf_url`. The limit is 25 MB, and base64 adds about a third to the size, so check the request limit of your flow.
