Create recipients

Adds someone to a draft and mints their signing token.

POST /v1/esign/documents/{id}/recipients

Addresshttps://api.hanzo.ai/v1/esign/documents/{id}/recipients
MethodPOST
Operationpost_esign_documents_by_id_recipients
AuthAuthorization: Bearer $HANZO_API_KEY

Adds someone to a draft and mints their signing token.

It answers 201 with the recipient's id and their signing TOKEN — the crypto-random capability that is the only credential the signer's surface accepts — so this response is where the signing link is built from. A CC recipient is recorded as already complete, because they are never asked to sign.

Only while DRAFT: adding a recipient to a document already sent is a 409, because the field layout and the turn order were fixed when it went out. An unknown document is a 404. The addition is recorded on the audit trail.

Request

5 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyes
emailbodyany—Email is where the signing link is meant to go, lower-cased on the way in.
namebodyany—Name is the recipient's display name, also the fallback a NAME field is filled with when they leave it blank.
rolebodyany—Role is SIGNER (the default), CC, VIEWER, APPROVER or ASSISTANT; anything else reads as SIGNER.
signingOrderbodyany—SigningOrder is this recipient's position when the document is SEQUENTIAL — lower signs first, and ties fall back to the order they were added.

Response

StatusBodyMeaning
201esign.esignInvitecreated
defaultproblem-detailsrefused

201 body — 5 fields.

FieldInTypeAlwaysDescription
emailbodystring—Email is the address the invitation is for, lower-cased.
idbodystring—ID is the new recipient's id, which is what a field is placed against.
namebodystring—Name is the recipient's display name, empty when none was given.
rolebodystring—Role is the role they were recorded with — SIGNER unless another was asked for.
tokenbodystring—Token is the crypto-random signing capability for this recipient.

Failure carries the platform error shape — see Errors.

Examples

hanzo esign documents recipients <id>
import { Configuration, EsignApi } from 'hanzoai';

const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postEsignDocumentsByIdRecipients({ id: 'id', email: "<email>", name: "<name>" });
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_recipients(id='id', email="<email>", name="<name>")
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.EsignAPI.PostEsignDocumentsByIdRecipients(context.Background()).Execute()
if err != nil {
	return err
}
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_recipients(&cfg, Default::default()).await?;
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).postEsignDocumentsByIdRecipients();
curl -X POST https://api.hanzo.ai/v1/esign/documents/<id>/recipients \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "email": "<email>",
       "name": "<name>"
     }'

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:

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 · All Hanzo APIs · Interactive reference

Was this page useful?