# Create fields — POST /v1/esign/o/{org}/sign/{token}/fields/{fieldId}

URL: https://docs.hanzo.ai/docs/openapi/esign/post-esign-o-by-org-sign-by-token-fields-by-fieldid

> Fills in one of your fields.

`POST /v1/esign/o/{org}/sign/{token}/fields/{fieldId}`

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

|               |                                                                       |
| ------------- | --------------------------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/esign/o/{org}/sign/{token}/fields/{fieldId}` |
| **Method**    | `POST`                                                                |
| **Operation** | `post_esign_o_by_org_sign_by_token_fields_by_fieldid`                 |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                                |

Fills in one of your fields.

It records a value for one field and marks it inserted. A signature field takes
a value with isBase64 true for drawn image bytes, or false for a typed
signature; a date, name or email field falls back to today, the recipient's name
or their email when the value is omitted; any other type requires one.

Nothing is sealed here — filling every field still leaves the document pending
until the completion call. The token is the whole credential and it bounds what
can be written: a field belonging to another recipient is refused with 401 even
under a valid token, an unknown field is a 404, and a field already filled is a
409\. A document not out for signature is a 409, as is a recipient who has
already completed or rejected. Under SEQUENTIAL order a signer whose turn has
not come is refused 403 until every earlier signer has signed. Each insertion is
recorded on the audit trail.

## Request

5 fields, body `application/json` (required).

| Field      | In   | Type   | Required | Description                                                                        |
| ---------- | ---- | ------ | -------- | ---------------------------------------------------------------------------------- |
| `org`      | path | string | yes      |                                                                                    |
| `token`    | path | string | yes      |                                                                                    |
| `fieldId`  | path | string | yes      |                                                                                    |
| `isBase64` | body | any    | —        | IsBase64 marks Value as drawn signature image bytes rather than a typed signature. |
| `value`    | body | any    | —        | Value is what goes in the field.                                                   |

## Response

| Status    | Body                 | Meaning |
| --------- | -------------------- | ------- |
| `200`     | esign.esignInsertion | ok      |
| `default` | problem-details      | refused |

`200` body — 2 fields.

| Field      | In   | Type    | Always | Description                                     |
| ---------- | ---- | ------- | ------ | ----------------------------------------------- |
| `fieldId`  | body | string  | —      | FieldID is the field that was filled.           |
| `inserted` | body | boolean | —      | Inserted is true — the field now holds a value. |

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

## Examples

**CLI**

```bash
hanzo esign o sign fields add <org> <token> <fieldId>
```

**SDK**

**.ts**

```ts
import { Configuration, EsignApi } from 'hanzoai';

const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postEsignOByOrgSignByTokenFieldsByFieldid({ org: 'org', token: 'token', fieldId: 'fieldId', isBase64: "<isBase64>", value: "<value>" });
```

**.py**

```python
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_o_by_org_sign_by_token_fields_by_fieldid(org='org', token='token', field_id='fieldId', is_base64="<isBase64>", value="<value>")
```

**.go**

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

resp, _, err := client.EsignAPI.PostEsignOByOrgSignByTokenFieldsByFieldid(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
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_o_by_org_sign_by_token_fields_by_fieldid(&cfg, Default::default()).await?;
```

**.java**

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

The method above is the one at the current release of the document. `hanzoai@8.5.914` (PyPI) was generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. [SDKs →](https://docs.hanzo.ai/docs/sdks)

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/esign/o/<org>/sign/<token>/fields/<fieldId> \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "isBase64": "<isBase64>",
       "value": "<value>"
     }'
```

**MCP**

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:

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

---

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