Sends the document out and answers each signer's link.
Sends the document out and answers each signer's link.
POST /v1/esign/documents/{id}/send
| 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 | esignLinks | ok |
200 body — 8 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
id | body | string | — | ID is the document that went out. |
recipients | body | 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.
Examples
hanzo esign documents send <id>import { Configuration, EsignApi } from 'hanzoai';
const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postEsignDocumentsByIdSend({ id: 'id' });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')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.EsignAPI.PostEsignDocumentsByIdSend(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EsignApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new EsignApi(client).postEsignDocumentsByIdSend();curl -X POST https://api.hanzo.ai/v1/esign/documents/<id>/send \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches esign through the esign tool, which names its 9 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
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"
}
}
}'How is this guide?