# Complete sign

URL: https://docs.hanzo.ai/docs/openapi/legal/post-legal-documents-by-id-sign-complete

> Records completion of the signature request opened over a generated document and answers the document with a `signed` flag.

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

> [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/complete` |
| **Method**    | `POST`                                                       |
| **Operation** | `post_legal_documents_by_id_sign_complete`                   |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                       |

Records completion of the signature request opened over a generated document and answers the document with a `signed` flag.

The e-sign provider's own status is consulted FIRST and is the default answer; an explicit `signed` field in the body overrides it. That override is the whole point: the default `manual` provider never self-completes, so a reviewer (or a real provider's webhook) is what moves the document. A completion flips the document to `signed`, stamps `signedAt`, and writes a `legal.document.signed` audit event; a provider still reporting incomplete answers 200 with the document unchanged, so the call is safe to repeat and never fabricates a signature.

Org-scoped and fails closed: a validated principal is required (401 without one), the document is read under the caller's OWN org so another tenant's id is a 404, a document with no open signature request is a 400, and a provider whose status call errors is a 502.

## Request

1 field.

| Field | In   | Type   | Required | Description |
| ----- | ---- | ------ | -------- | ----------- |
| `id`  | path | string | yes      |             |

## Response

The document declares no response body for this operation. It answers `200` on success and the platform error shape on failure — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo legal documents sign complete <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.postLegalDocumentsByIdSignComplete({ id: 'id' });
```

**.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_complete(id='id')
```

**.go**

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

resp, _, err := client.LegalAPI.PostLegalDocumentsByIdSignComplete(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_complete(&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).postLegalDocumentsByIdSignComplete();
```

**HTTP**

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

**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)
