# Create sign

URL: https://docs.hanzo.ai/docs/openapi/legal/post-legal-documents-by-id-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`

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

|               |                                                     |
| ------------- | --------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/legal/documents/{id}/sign` |
| **Method**    | `POST`                                              |
| **Operation** | `post_legal_documents_by_id_sign`                   |
| **Auth**      | `Authorization: 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).

| Field             | In   | Type                 | Required | Description                                              |
| ----------------- | ---- | -------------------- | -------- | -------------------------------------------------------- |
| `id`              | path | string               | yes      | ID is the document to send for signature, from the path. |
| `id`              | body | string               | —        | ID is the document to send for signature, from the path. |
| `signers`         | body | legal.legalSigner\[] | —        | Signers are the people who must sign, by name and email. |
| `signers[].email` | body | string               | —        |                                                          |
| `signers[].name`  | body | string               | —        |                                                          |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | legal.signReply | ok      |
| `default` | problem-details | refused |

`200` body — 13 fields.

| Field                      | In   | Type                  | Always | Description                                                                                                   |
| -------------------------- | ---- | --------------------- | ------ | ------------------------------------------------------------------------------------------------------------- |
| `document`                 | body | legal.documentSummary | —      |                                                                                                               |
| `document.category`        | body | string                | —      | Category is the template's category: formation, equity, ops or sales.                                         |
| `document.createdAt`       | body | integer (int64)       | —      | CreatedAt is when the document was generated, in unix seconds.                                                |
| `document.esignProvider`   | body | string                | —      | EsignProvider names the e-signature provider handling it, absent until a signature has been requested.        |
| `document.id`              | body | string                | —      | ID is the document's server-minted handle, "doc\_"-prefixed.                                                  |
| `document.signedAt`        | body | integer (int64)       | —      | SignedAt is when the provider reported completion, in unix seconds.                                           |
| `document.status`          | body | string                | —      | Status is the lifecycle state: draft, out\_for\_signature, signed or voided.                                  |
| `document.templateId`      | body | string                | —      | TemplateID is the template it was rendered from.                                                              |
| `document.templateVersion` | body | integer (int64)       | —      | TemplateVersion is WHICH version of that template rendered it, so the document is reproducible and auditable. |
| `document.title`           | body | string                | —      | Title is the document's title, inherited from the template.                                                   |
| `document.updatedAt`       | body | integer (int64)       | —      | UpdatedAt is when it last changed, in unix seconds.                                                           |
| `esignRef`                 | body | string                | —      | EsignRef is the provider's own reference for the request — what a webhook or a status poll quotes.            |
| `provider`                 | body | string                | —      | Provider names the e-signature provider that took the request.                                                |

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

## Examples

**CLI**

```bash
hanzo legal documents sign create <id>
```

**SDK**

**.ts**

```ts
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>"}] });
```

**.py**

```python
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>"}])
```

**.go**

```go
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
}
```

**.rs**

```rust
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?;
```

**.java**

```java
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();
```

**HTTP**

```bash
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**

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:

```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_legal_documents"
         }
       }
     }'
```

---

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