Declines to sign, with an optional reason.
Declines to sign, with an optional reason.
POST /v1/esign/o/{org}/sign/{token}/reject
| Address | https://api.hanzo.ai/v1/esign/o/{org}/sign/{token}/reject |
| Method | POST |
| Operation | post_esign_o_by_org_sign_by_token_reject |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Declines to sign, with an optional reason.
It records this recipient's refusal and moves the WHOLE DOCUMENT to REJECTED — one declining signer ends it for everyone, and there is no route back: the document cannot then be signed or completed. An optional reason is stored and written onto the audit trail with the rejection, which is what the sender sees.
A document not out for signature is a 409, and so is a recipient who has already signed or already rejected — a refusal cannot be taken back or repeated. The token is the whole credential; one that does not resolve under the org segment is a 404.
Request
3 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
org | path | string | yes | |
token | path | string | yes | |
reason | body | any | — | Reason is why the signer is declining. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | esignRejection | ok |
200 body — 2 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
recipientId | body | string | — | RecipientID is the recipient who declined. |
status | body | string | — | Status is REJECTED — one declining signer ends the document for everyone, and there is no route back. |
Failure carries the platform error shape — see Errors.
Examples
hanzo esign o sign reject <org> <token>import { Configuration, EsignApi } from 'hanzoai';
const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postEsignOByOrgSignByTokenReject({ org: 'org', token: 'token', reason: "<reason>" });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_reject(org='org', token='token', reason="<reason>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.EsignAPI.PostEsignOByOrgSignByTokenReject(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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_reject(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EsignApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new EsignApi(client).postEsignOByOrgSignByTokenReject();The method above is the one at the current release of the document. [email protected] (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 →
curl -X POST https://api.hanzo.ai/v1/esign/o/<org>/sign/<token>/reject \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "<reason>"
}'The door reaches esign through the esign tool, which names its 9 operations with its own verbs — this one among them, under a name only the door 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"
}
}
}'How is this guide?