# Send documents

URL: https://docs.hanzo.ai/docs/openapi/esign/post-esign-documents-by-id-send

> Sends the document out and answers each signer's link.

`POST /v1/esign/documents/{id}/send`

> [eSign →](https://docs.hanzo.ai/docs/openapi/esign) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                     |
| ------------- | --------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/esign/documents/{id}/send` |
| **Method**    | `POST`                                              |
| **Operation** | `post_esign_documents_by_id_send`                   |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`              |

Sends the document out and answers each signer's link.

It moves the document from DRAFT to PENDING and answers the signing tokens — one
per signing recipient, with the path to hand them — which is how the links reach
the people who must sign. Nothing is emailed by this call; delivering the links
is the caller's.

It refuses to send an unsignable document: no recipients at all is a 400, and so
is any signing recipient with no fields to fill, named in the error. Re-sending
an already-pending document is allowed and re-issues the same links rather than
restarting anything; a completed document is a 409, and an unknown one a 404.
The send is recorded on the audit trail.

## Request

1 field.

| Field | In   | Type   | Required | Description                 |
| ----- | ---- | ------ | -------- | --------------------------- |
| `id`  | path | string | yes      | ID is the document to send. |

## Response

| Status    | Body             | Meaning |
| --------- | ---------------- | ------- |
| `200`     | esign.esignLinks | ok      |
| `default` | problem-details  | refused |

`200` body — 8 fields.

| Field                      | In   | Type               | Always | Description                                                                                           |
| -------------------------- | ---- | ------------------ | ------ | ----------------------------------------------------------------------------------------------------- |
| `id`                       | body | string             | —      | ID is the document that went out.                                                                     |
| `recipients`               | body | esign.esignLink\[] | —      | Recipients is one link per signing recipient.                                                         |
| `recipients[].email`       | body | string             | —      | Email is the address this link is meant for.                                                          |
| `recipients[].recipientId` | body | string             | —      | RecipientID is the recipient the link identifies.                                                     |
| `recipients[].role`        | body | string             | —      | Role is their role — only a SIGNER or an APPROVER gets a link, because only they are asked to act.    |
| `recipients[].signingPath` | body | string             | —      | SigningPath is the tail of the address to send them, relative to wherever the signing page is served. |
| `recipients[].token`       | body | string             | —      | Token is the crypto-random signing capability.                                                        |
| `status`                   | body | string             | —      | Status is PENDING — the state a sent document is in until every signer has finished.                  |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo esign documents send <id>
```

**SDK**

**.ts**

```ts
import { Configuration, EsignApi } from 'hanzoai';

const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postEsignDocumentsByIdSend({ id: 'id' });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import EsignApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = EsignApi(client).post_esign_documents_by_id_send(id='id')
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.EsignAPI.PostEsignDocumentsByIdSend(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, esign_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = esign_api::post_esign_documents_by_id_send(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EsignApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new EsignApi(client).postEsignDocumentsByIdSend();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/esign/documents/<id>/send \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **esign** through the `esign` tool, which names its 9 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_esign_documents"
         }
       }
     }'
```

---

[eSign API](https://docs.hanzo.ai/docs/openapi/esign) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
