Create sign

Opens an e-signature request over one document and moves it to out_for_signature, returning the provider's reference for the request.

POST /v1/legal/documents/{id}/sign

Addresshttps://api.hanzo.ai/v1/legal/documents/{id}/sign
MethodPOST
Operationpost_legal_documents_by_id_sign
AuthAuthorization: Bearer $HANZO_API_KEY

Opens an e-signature request over one document and moves it to out_for_signature, returning the provider's reference for the request.

The provider is whatever this deployment has wired. The honest default is "manual": the request is recorded and the org fulfils it out of band — nothing here fabricates a signature, and the stub never reports itself complete.

Request

5 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyesID is the document to send for signature, from the path.
idbodystring—ID is the document to send for signature, from the path.
signersbodylegal.legalSigner[]—Signers are the people who must sign, by name and email.
signers[].emailbodystring—
signers[].namebodystring—

Response

StatusBodyMeaning
200legal.signReplyok
defaultproblem-detailsrefused

200 body — 13 fields.

FieldInTypeAlwaysDescription
documentbodylegal.documentSummary—
document.categorybodystring—Category is the template's category: formation, equity, ops or sales.
document.createdAtbodyinteger (int64)—CreatedAt is when the document was generated, in unix seconds.
document.esignProviderbodystring—EsignProvider names the e-signature provider handling it, absent until a signature has been requested.
document.idbodystring—ID is the document's server-minted handle, "doc_"-prefixed.
document.signedAtbodyinteger (int64)—SignedAt is when the provider reported completion, in unix seconds.
document.statusbodystring—Status is the lifecycle state: draft, out_for_signature, signed or voided.
document.templateIdbodystring—TemplateID is the template it was rendered from.
document.templateVersionbodyinteger (int64)—TemplateVersion is WHICH version of that template rendered it, so the document is reproducible and auditable.
document.titlebodystring—Title is the document's title, inherited from the template.
document.updatedAtbodyinteger (int64)—UpdatedAt is when it last changed, in unix seconds.
esignRefbodystring—EsignRef is the provider's own reference for the request — what a webhook or a status poll quotes.
providerbodystring—Provider names the e-signature provider that took the request.

Failure carries the platform error shape — see Errors.

Examples

hanzo legal documents sign create <id>
import { Configuration, LegalApi } from 'hanzoai';

const api = new LegalApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postLegalDocumentsByIdSign({ id: 'id', id: "<id>", signers: [{"email":"<email>","name":"<name>"}] });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import LegalApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = LegalApi(client).post_legal_documents_by_id_sign(id='id', id="<id>", signers=[{"email":"<email>","name":"<name>"}])
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.LegalAPI.PostLegalDocumentsByIdSign(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, legal_api};

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

let result = legal_api::post_legal_documents_by_id_sign(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LegalApi;

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

var result = new LegalApi(client).postLegalDocumentsByIdSign();
curl -X POST https://api.hanzo.ai/v1/legal/documents/<id>/sign \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "id": "<id>",
       "signers": [
         {
           "email": "<email>",
           "name": "<name>"
         }
       ]
     }'

MCP reaches legal through the legal tool, which names its 10 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_legal_documents"
         }
       }
     }'

Legal API · All Hanzo APIs · Interactive reference

Was this page useful?