{
    "variable": [
        {
            "id": "baseUrl",
            "key": "baseUrl",
            "type": "string",
            "name": "string",
            "value": "https:\/\/elemza.com"
        }
    ],
    "info": {
        "name": "elEMZA \u2014 Public API v1",
        "_postman_id": "ece49359-2342-46fd-8c84-970822056dac",
        "description": "Public REST API for Contract creation and Electronic Signature lifecycle. Bilingual (fa\/en) errors. RFC 7807 problem+json envelope.",
        "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
    },
    "item": [
        {
            "name": "Companies",
            "description": "\nCheck a counterparty company before you send (Jibit P7, P6-P7-P16 design \u00a76.3).",
            "item": [
                {
                    "name": "Check a company signer",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/companies\/check",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/companies\/check"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"legal_national_code\":\"14001234567\",\"signer_national_code\":\"0012345678\"}"
                        },
                        "description": "Asks the companies registry, before you add a company signer, for the company's official name and state and\nwhether the person who will sign for it is on its current board. Changes nothing (no idempotency key). Every\nanswer \u2014 free or paid \u2014 counts toward 50 checks a day per account (429 `preflight_daily_cap`). You see one of\nthree outcomes for the person: `no_warning`, `not_on_board` or `not_checked`; `signer_basis` is added only when\nyour account is an active representative of that company. A test token answers `not_checked` (`test_mode`).\nWhen the registry service is not available: 503 `inquiry_temporarily_unavailable` with `Retry-After`, or 403\n`inquiry_not_available`.\n\nScope: `signers:write`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"data\": {\"legal_national_code\": \"140****4567\", \"registry_name\": \"\u0622\u0631\u06cc\u0646 \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u0631\u0633\", \"status\": \"active\", \"status_fa\": \"\u0641\u0639\u0627\u0644\", \"signer_check\": \"not_on_board\", \"checked_at\": \"2026-11-06T10:22:00.000000Z\", \"warnings\": [{\"code\": \"signer_not_on_board\", \"severity\": \"high\", \"title_fa\": \"\u0627\u06cc\u0646 \u0634\u062e\u0635 \u062f\u0631 \u0641\u0647\u0631\u0633\u062a\u0650 \u0641\u0639\u0644\u06cc\u0650 \u0647\u06cc\u0626\u062a\u200c\u0645\u062f\u06cc\u0631\u0647\u0654 \u0627\u06cc\u0646 \u0634\u0631\u06a9\u062a \u0646\u06cc\u0633\u062a.\", \"title_en\": \"This person is not on the company's current board.\"}]}}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\"status\": 422, \"code\": \"validation\", \"title_fa\": \"\u0645\u0642\u0627\u062f\u06cc\u0631 \u0627\u0631\u0633\u0627\u0644\u06cc \u0646\u0627\u0645\u0639\u062a\u0628\u0631 \u0627\u0633\u062a\", \"title_en\": \"Request body validation failed\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 429,
                            "body": "{\"status\": 429, \"code\": \"preflight_daily_cap\", \"title_fa\": \"\u0633\u0642\u0641\u0650 \u0631\u0648\u0632\u0627\u0646\u0647\u0654 \u0633\u0646\u062c\u0634\u0650 \u0634\u0631\u06a9\u062a \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u062d\u0633\u0627\u0628 \u067e\u0631 \u0634\u062f\u0647 \u0627\u0633\u062a.\", \"title_en\": \"The daily company-check limit for this account is reached.\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 503,
                            "body": "{\"status\": 503, \"code\": \"inquiry_temporarily_unavailable\", \"title_fa\": \"\u0627\u06cc\u0646 \u0627\u0633\u062a\u0639\u0644\u0627\u0645 \u0627\u0644\u0627\u0646 \u062f\u0631 \u062f\u0633\u062a\u0631\u0633 \u0646\u06cc\u0633\u062a\u061b \u06a9\u0645\u06cc \u0628\u0639\u062f \u062f\u0648\u0628\u0627\u0631\u0647 \u0627\u0645\u062a\u062d\u0627\u0646 \u06a9\u0646\u06cc\u062f.\", \"title_en\": \"This inquiry is temporarily unavailable.\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Contracts",
            "description": "",
            "item": [
                {
                    "name": "Public signed-URL download.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/dl",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/dl",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char public code."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Validates Laravel's `signed` middleware. No Bearer token required \u2014\nthe URL signature is the auth proof. The signature is generated by\n`downloadPdf()` after the bearer was verified, so this is functionally\nequivalent to a 24h time-bounded capability URL.\n\nRecords an `ApiRequestLog`-style entry via the underlying `ContractDownload`\naudit table (same trail as the user-panel signed-link download flow)."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG8TPHX5KAGZGRCCXFBXN"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG8TPHX5KAGZGRCCXFBXN\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "List contracts",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts",
                            "query": [
                                {
                                    "key": "status",
                                    "value": "waiting_signature",
                                    "description": "Filter by status: draft|waiting_signature|completed|voided|canceled.",
                                    "disabled": false
                                },
                                {
                                    "key": "signature_method",
                                    "value": "digital",
                                    "description": "Filter by signing method: electronic|digital.",
                                    "disabled": false
                                },
                                {
                                    "key": "created_after",
                                    "value": "2026-01-01T00:00:00Z",
                                    "description": "ISO 8601 datetime.",
                                    "disabled": false
                                },
                                {
                                    "key": "created_before",
                                    "value": "architecto",
                                    "description": "ISO 8601 datetime.",
                                    "disabled": false
                                },
                                {
                                    "key": "signer_mobile",
                                    "value": "09121234567",
                                    "description": "Iran mobile regex 09XXXXXXXXX. **Requires `signers:read_pii` scope.**",
                                    "disabled": false
                                },
                                {
                                    "key": "signer_national_code",
                                    "value": "architecto",
                                    "description": "10-digit Iran national code. **Requires `signers:read_pii` scope.**",
                                    "disabled": false
                                },
                                {
                                    "key": "template_id",
                                    "value": "16",
                                    "description": "Filter by template.",
                                    "disabled": false
                                },
                                {
                                    "key": "is_private",
                                    "value": "",
                                    "description": "Filter by privacy flag.",
                                    "disabled": true
                                },
                                {
                                    "key": "scope",
                                    "value": "org",
                                    "description": "Only accepted value: `org`. Adds the contracts of your organisation's owner and of every member (never private ones, never ones in a company's name), when the owner has granted you \u00absee the organisation's contracts\u00bb. Without that permission it returns the same list as no `scope`.",
                                    "disabled": false
                                },
                                {
                                    "key": "role",
                                    "value": "sent",
                                    "description": "Narrows the list to one side of the contract: `sent` \u2014 contracts you created (with `scope=org`: also those created by the members that scope shows you); `received` \u2014 contracts in which you are a signer and which you did not create; `all` \u2014 the default, exactly the list without `role`.",
                                    "disabled": false
                                },
                                {
                                    "key": "q",
                                    "value": "\u0627\u062c\u0627\u0631\u0647",
                                    "description": "Part of the title (1..120 chars), case-insensitive; Arabic \u00ab\u064a\/\u0643\u00bb and Persian \u00ab\u06cc\/\u06a9\u00bb are treated as the same letter, and `%`\/`_` are literal characters.",
                                    "disabled": false
                                },
                                {
                                    "key": "waiting_over_days",
                                    "value": "7",
                                    "description": "Contracts still `waiting_signature` whose signers were added more than this many days ago (1..3650).",
                                    "disabled": false
                                },
                                {
                                    "key": "updated_since",
                                    "value": "2026-10-23T08:30:00Z",
                                    "description": "ISO 8601 instant with an offset (`2026-10-23T08:30:00Z`, `\u2026+03:30`) or a date (`2026-10-23`, the start of that day in Tehran time); contracts whose `updated_at` is at or after it. Note: a signer signing does not by itself change a contract's `updated_at`.",
                                    "disabled": false
                                },
                                {
                                    "key": "ends_before",
                                    "value": "1405\/09\/30",
                                    "description": "Declared end date (`facts.end_date`) on or before this day. Jalali `1405\/08\/01` (Persian digits accepted) or ISO `2026-10-23`; any other shape is 422 \u2014 a Jalali year written with dashes is refused, never shifted.",
                                    "disabled": false
                                },
                                {
                                    "key": "ends_after",
                                    "value": "1405\/07\/01",
                                    "description": "Declared end date on or after this day; same formats as `ends_before`.",
                                    "disabled": false
                                },
                                {
                                    "key": "counterparty",
                                    "value": "\u0622\u0644\u0641\u0627",
                                    "description": "Part of the declared counterparty name (`facts.counterparty_name`), case-insensitive.",
                                    "disabled": false
                                },
                                {
                                    "key": "type",
                                    "value": "\u0627\u062c\u0627\u0631\u0647\n\n`signer_mobile`, `signer_national_code`, `counterparty`, `type`, `ends_before` and `ends_after` ask about what\nthe SENDER holds, so they only ever match contracts you sent (or see through your company or organisation):\na contract you only sign is left out of a list filtered on any of them.",
                                    "description": "The declared contract type (`facts.contract_type`), whole value, case-insensitive.",
                                    "disabled": false
                                },
                                {
                                    "key": "page",
                                    "value": "16",
                                    "description": "Default 1.",
                                    "disabled": false
                                },
                                {
                                    "key": "per_page",
                                    "value": "16",
                                    "description": "Max 100. Default 20.",
                                    "disabled": false
                                },
                                {
                                    "key": "sort",
                                    "value": "architecto",
                                    "description": "created_at | -created_at | completed_at | -completed_at. Default -created_at.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts?status=waiting_signature&signature_method=digital&created_after=2026-01-01T00%3A00%3A00Z&created_before=architecto&signer_mobile=09121234567&signer_national_code=architecto&template_id=16&is_private=&scope=org&role=sent&q=%D8%A7%D8%AC%D8%A7%D8%B1%D9%87&waiting_over_days=7&updated_since=2026-10-23T08%3A30%3A00Z&ends_before=1405%2F09%2F30&ends_after=1405%2F07%2F01&counterparty=%D8%A2%D9%84%D9%81%D8%A7&type=%D8%A7%D8%AC%D8%A7%D8%B1%D9%87%0A%0A%60signer_mobile%60%2C%20%60signer_national_code%60%2C%20%60counterparty%60%2C%20%60type%60%2C%20%60ends_before%60%20and%20%60ends_after%60%20ask%20about%20what%0Athe%20SENDER%20holds%2C%20so%20they%20only%20ever%20match%20contracts%20you%20sent%20%28or%20see%20through%20your%20company%20or%20organisation%29%3A%0Aa%20contract%20you%20only%20sign%20is%20left%20out%20of%20a%20list%20filtered%20on%20any%20of%20them.&page=16&per_page=16&sort=architecto"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"status\":\"draft\",\"signature_method\":\"electronic\",\"created_after\":\"2026-11-19T06:39:47\",\"created_before\":\"2026-11-19T06:39:47\",\"signer_mobile\":\"09564255931\",\"signer_national_code\":\"ikhwaykcmy\",\"template_id\":16,\"is_private\":true,\"scope\":\"org\",\"page\":22,\"per_page\":7,\"sort\":\"-created_at\",\"role\":\"received\",\"q\":\"z\",\"waiting_over_days\":17,\"updated_since\":\"i\",\"ends_before\":\"yvdljnikhwaykcmy\",\"ends_after\":\"uwpwlvqwrsitcpsc\",\"counterparty\":\"q\",\"type\":\"l\"}"
                        },
                        "description": "Returns the paginated contracts the token's user may see:\n\n- contracts they created;\n- contracts in which they are a signer;\n- if they manage members in an organisation (the organisation's owner, or a member's direct\n  manager): those members' contracts \u2014 except contracts marked private and contracts issued\n  in a company's name.\n\nWith `scope=org`, a member whose organisation owner has granted them \u00absee the organisation's\ncontracts\u00bb also receives the owner's and every other member's contracts, under the same two\nexclusions. Without that permission `scope=org` changes nothing and is not an error. The\ndefault (no `scope`) never widens, so an existing \u00abmy contracts\u00bb sync keeps receiving exactly\nwhat it received before the permission was granted.\n\nScope: `contracts:read`.\n\n**PII filter scope requirement:** filtering by `signer_mobile` or\n`signer_national_code` requires the additional `signers:read_pii` ability\non your token. Without it, those query parameters return\n**403 `scope_missing`**. This prevents a low-privilege `contracts:read`\ntoken from using the index as a confirmation oracle to check whether a\ngiven mobile\/national-code signs any contract on the owner's tree.\n\nThe `*` wildcard scope also passes the check."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG8YDY0XXC1SRA382NZ0D"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG8YDY0XXC1SRA382NZ0D\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 403,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/scope_missing\",\n  \"status\": 403,\n  \"code\": \"scope_missing\",\n  \"title_fa\": \"\u0627\u06cc\u0646 \u0641\u06cc\u0644\u062a\u0631 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0645\u062c\u0648\u0632 signers:read_pii \u062f\u0627\u0631\u062f\",\n  \"title_en\": \"This filter requires the signers:read_pii scope\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\"\n}",
                            "name": "PII filter without scope"
                        }
                    ]
                },
                {
                    "name": "Get contract",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "ABC1234567XYZ890",
                                    "description": "16-char public code (A-Z, 0-9)."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns full contract shape with embedded signers, per-page geometry,\nand template positions snapshot.\n\nScope: `contracts:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG8ZX94862188Q12E80ZJ"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG8ZX94862188Q12E80ZJ\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Download signed PDF",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/pdf",
                            "query": [
                                {
                                    "key": "format",
                                    "value": "url",
                                    "description": "redirect|url|stream. Default redirect.",
                                    "disabled": false
                                },
                                {
                                    "key": "ttl",
                                    "value": "16",
                                    "description": "Signed URL lifetime in seconds (60..86400). Default 86400. Ignored when `format=stream`.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/pdf?format=url&ttl=16",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char public code."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns the final signed PDF in one of three formats (Phase 3):\n\n- `format=redirect` (default) \u2014 `302 Found` to a signed URL (24h TTL).\n  The signed URL points at the unauthenticated `\/api\/v1\/contracts\/{code}\/dl`\n  route, which validates the signature and streams the file. Use this when\n  embedding in `<a href>` for partner-facing UIs.\n- `format=url` \u2014 JSON envelope with `url`, `expires_at`, `filename`, `size_bytes`,\n  `checksum_sha256`. Use this when the API client wants to hand the URL\n  to another system, embed in email, or pre-flight before downloading.\n- `format=stream` \u2014 streams the PDF inline (consumes API egress). Use when\n  the caller is a backend service that wants the bytes in one round-trip.\n\nScope: `contracts:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG90BPSV23D8MVNN9X59C"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG90BPSV23D8MVNN9X59C\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Poll processing status",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/processing",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/processing",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char contract code."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Lightweight (<200 bytes) status of the rasterization + signer-creation job.\n\n\ud83e\ude78 THIS DOCBLOCK USED TO SAY \u00abno DB hit\u00bb, AND THAT WAS FALSE \u2014 corrected 2026-08-31.\n   It reads one `SELECT` for the contract, `ContractPolicy::view()` then calls\n   `$user->hasRole([...])`, and the outermost middleware on this route\n   (`App\\Http\\Middleware\\Api\\LogApiRequest`) writes a synchronous `INSERT` into\n   `api_request_logs`. So the honest description is: at least two reads and one write,\n   per poll, and the load-lab measured this single endpoint taking **84.9% of all server\n   time** in a saturation run (1,494 calls at a fixed 1.5 s interval).\n\n   That mattered more than a wrong sentence usually does: a session reading \u00abno DB hit\u00bb\n   concludes this endpoint is already cheap and never looks at the expensive part, which\n   is not in this controller at all.\n\nTwo things went the same day: the `withCount('signers')` this query used to carry \u2014 a\ncorrelated sub-SELECT on every poll whose result the JSON below never returned \u2014 and the\ntwo redundant single-column indexes on `api_request_logs`.\n\n**Step values:** `files`, `signers`, `sms`, `done`, `error`.\n\nReturns `ready=true` when `step=done`. If progress key is gone (TTL expired)\nand contract has signers + pages, falls back to `ready=true` (job finished\nearlier and key was reaped).\n\n\ud83d\udd11 An integrator polling this in a loop is doing it the expensive way. The\n`contract.processing.completed` webhook fires from the same moment\n(`ProcessContractFilesJob` \u2192 `ContractProcessingCompletedApiEvent` \u2192\n`FanOutContractProcessingCompleted`) and removes the loop entirely.\n\nScope: `contracts:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG90TR4QAYYVF30NAAVSA"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG90TR4QAYYVF30NAAVSA\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Create contract",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "multipart\/form-data"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "title",
                                    "value": "\u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0628\u06cc\u0645\u0647 \u0634\u062e\u0635 \u062b\u0627\u0644\u062b",
                                    "type": "text",
                                    "description": "Contract title (1..255 chars \u2014 the same limit as the panel)."
                                },
                                {
                                    "key": "replaces",
                                    "value": "ABC1234567XYZ890",
                                    "type": "text",
                                    "description": "Optional \u2014 the 16-character code of YOUR waiting DIGITAL contract to send again as\n           electronic (see \u00abSend a stuck digital contract again as electronic\u00bb above). Sent alone: then `title` is not\n           required and every other field is refused (422 `replaces_conflict`)."
                                },
                                {
                                    "key": "discount_code",
                                    "value": "WELCOME10",
                                    "type": "text",
                                    "description": "Optional discount code (max 32 chars, case-insensitive). A code that is\n           unknown, inactive, expired, used up or not issued to your account is rejected with 422\n           `discount_code_invalid` and nothing is created \u2014 it is never silently dropped. Validity is\n           checked now and the amount is computed when signers are added; nothing is reserved in\n           between (see \u00abDiscount code\u00bb above for when a stored code gives no discount). A contract's\n           code cannot be changed after creation."
                                },
                                {
                                    "key": "signature_method",
                                    "value": "architecto",
                                    "type": "text",
                                    "description": "electronic|digital. Default electronic. `digital` = PADES\n           signature via the Pendar CA cloud-HSM. Requires the PKI feature to be enabled for\n           your account (pre-flight via `GET \/me` \u2192 `data.capabilities.pki`), otherwise\n           **403 `pki_not_available`**. The method is contract-wide (all signers sign the same\n           way) and IMMUTABLE after creation \u2014 to change it, cancel and recreate (ADR-0009)."
                                },
                                {
                                    "key": "all_pages_signature",
                                    "value": "",
                                    "type": "text",
                                    "description": "Default false. When true, every page must carry the signature element.\n           Refused (422) together with `signer_mode=multi`."
                                },
                                {
                                    "key": "signer_mode",
                                    "value": "multi",
                                    "type": "text",
                                    "description": "Only with `signature_method=digital`: `solo` (exactly one signer \u2014 electronic-style\n           placement, then one invisible digital seal) or `multi` (two or more signers, each adding one signature\n           in turn). Omit it and a digital contract behaves exactly as before \u2014 nothing below is checked. When\n           sent: with `electronic` it is 422; the signer count must fit (inline `signers` at creation, and the\n           `POST \/contracts\/{code}\/signers` batch later \u2014 422 `signer_mode_mismatch`, nothing added or charged);\n           with `multi` the template must suit a multi-signer digital contract (signers 2+ pin at most one\n           \u00absignature\u00bb each, no stamp\/name\/date, no \u00aball signers\u00bb box \u2014 422 `template_not_digital_compatible`)\n           and `all_pages_signature` must not be true."
                                },
                                {
                                    "key": "wet_signature_page",
                                    "value": "0",
                                    "type": "text",
                                    "description": "`0` = no visible signature mark: the signed PDF carries only the digital\n           signature, and each signer only confirms they read the document. Only with `signature_method=digital`\n           and `signer_mode=multi` (where the panel offers it); anywhere else 422. `-1` (or omitting it) keeps\n           the default \u2014 each signer places a visible signature."
                                },
                                {
                                    "key": "send_at",
                                    "value": "2026-11-20T06:30:00Z",
                                    "type": "text",
                                    "description": "Optional scheduled send: ISO-8601 date-time WITH an explicit offset (`Z` or `+03:30`),\n           strictly in the future and at most 3 months ahead (the panel's window); outside it is 422 and nothing\n           is created. The signers are added \u2014 and the send is charged \u2014 when they are added (inline or by\n           `POST \/contracts\/{code}\/signers`); only the signing SMS waits until this moment. Signers added after\n           it has passed get their SMS at once. With `send_at`, the bounds of `signing_deadline_at` are measured\n           from `send_at`, not from now."
                                },
                                {
                                    "key": "is_private",
                                    "value": "",
                                    "type": "text",
                                    "description": "Default false. When true, hides contract from org-ancestors."
                                },
                                {
                                    "key": "legal_entity_id",
                                    "value": "16",
                                    "type": "text",
                                    "description": "Optional \u2014 send this contract on behalf of one of your\n           registered companies. The signer's SMS, the signing page and the signed PDF then\n           carry that company's name instead of yours. List the ids you may use via\n           `GET \/api\/v1\/me` (`data.legal_entities`).\n\n           **Account default.** If you set a default company in the panel\n           (\u00ab\u0634\u0631\u06a9\u062a\u200c\u0647\u0627\u06cc \u0645\u0646\u00bb \u2192 \u00ab\u067e\u06cc\u0634\u200c\u0641\u0631\u0636\u0650 \u0645\u0646 \u0628\u0627\u0634\u062f\u00bb), OMITTING this field sends the contract on\n           behalf of that company \u2014 so an integration that always signs as the company needs\n           no code change at all. `GET \/api\/v1\/me` reports it as\n           `data.default_legal_entity_id`, so you can always tell which name a contract will\n           go out under BEFORE you create it. With no default set, omitting the field sends\n           under your own name, exactly as before.\n\n           **To send one contract personally while a default is set, pass `0`** (or `null`).\n           An absent field means \u00abuse my default\u00bb; an explicit `0` means \u00abme, personally\u00bb.\n           These are deliberately different \u2014 a caller that cannot say \u00abpersonally\u00bb would\n           have no way back out of the default."
                                },
                                {
                                    "key": "organisation_sender",
                                    "value": "",
                                    "type": "text",
                                    "description": "Optional \u2014 `true` sends this one contract under the name of the ORGANISATION you are a member of (its verified company), even when your account has a default company. Only for a member the organisation lends its name to (a full manager, or a member set to \u00ab\u0628\u0647\u200c\u0646\u0627\u0645\u0650 \u0633\u0627\u0632\u0645\u0627\u0646\u00bb), and only while the organisation has a verified company; otherwise 422 `organisation_not_available` and nothing is created. It cannot be sent together with `legal_entity_id` or `trade_name_id`, whatever their value (422 `sender_conflict`). Absent or `false`: nothing changes."
                                },
                                {
                                    "key": "trade_name_id",
                                    "value": "7",
                                    "type": "text",
                                    "description": "Optional \u2014 send this contract under one of your TRADE NAMES (\u0646\u0627\u0645\u0650 \u062a\u062c\u0627\u0631\u06cc, e.g. a shop name from your guild licence); the signer reads \u00ab\u0641\u0631\u0648\u0634\u06af\u0627\u0647 \u0645\u0647\u0631 (\u0639\u0644\u06cc \u0631\u0636\u0627\u06cc\u06cc)\u00bb in the SMS, e-mail and signing page. You remain the party of the contract, the signer and the invoice buyer. List the ids via `GET \/api\/v1\/me` \u2192 `data.trade_names` (`can_use`). **A trade name is never chosen by omitting this field**; `0` means \u00abme, personally\u00bb (and overrides an account default company). Another user's id \u2192 422 `trade_name_not_accessible`; yours but not usable now (licence ended, identity to be re-verified) \u2192 422 `trade_name_not_usable`; together with `legal_entity_id` > 0 \u2192 422 `sender_conflict`. The response carries `data.sender` {name, as, trade_name, legal_entity_id}.\n           `legal_entity_id: 0` now means \u00abpersonally\u00bb for organisation members too (it used to let an organisation's company speak for an Admin member who asked to be personal).\n\n           A company you do not actively represent is rejected with 422\n           `legal_entity_not_accessible`; one whose registered board term has expired with\n           422 `legal_entity_board_expired`. If your account default has itself become\n           unusable (representation revoked, company archived), creation fails with 422\n           `default_legal_entity_unusable` rather than silently reverting to your personal\n           name."
                                },
                                {
                                    "key": "template_id",
                                    "value": "26",
                                    "type": "text",
                                    "description": "Optional \u2014 must be owned by the caller or shared from the org root;\n           anything else is rejected with 422 `template_not_accessible` (never silently dropped).\n           List valid ids via `GET \/api\/v1\/templates`."
                                },
                                {
                                    "key": "template_enforcement",
                                    "value": "locked",
                                    "type": "text",
                                    "description": "locked|suggested (legacy aliases: strict|loose).\n           Defaults to `locked` when `template_id` is set."
                                },
                                {
                                    "key": "require_all_placements",
                                    "value": "",
                                    "type": "text",
                                    "description": "Default false. With a `locked` template: the signer must use\n           every slot the template pins for them (signature, stamp, name, date) before the signature is\n           recorded. Ignored without a `locked` template that pins a slot."
                                },
                                {
                                    "key": "redirect_url",
                                    "value": "https:\/\/partner.example\/contracts\/42\/signed",
                                    "type": "text",
                                    "description": "HTTPS URL to send the signer back to after they finish signing.\n  They see our confirmation first, then return automatically. Without it they stay on our\n  confirmation page."
                                },
                                {
                                    "key": "signers[0]",
                                    "value": "architecto",
                                    "type": "text",
                                    "description": ""
                                },
                                {
                                    "key": "payer_mode",
                                    "value": "signer",
                                    "type": "text",
                                    "description": "Who pays the signature fee. `creator` (default) \u2014 your wallet pays the whole\n           fee when signers are added, exactly as before. `signer` \u2014 the fee is split equally between ALL\n           signers and each pays their share on the signing page before signing. `designated` \u2014 split only\n           between the signers you flag with `is_payer: true`; everyone else signs for free.\n\n           In `signer` and `designated` your wallet is charged a **commitment** of half of each payer's\n           share when signers are added. It comes back to you when that signer pays. If a payer neither\n           pays nor signs within the settlement window, the contract is cancelled and that half is kept.\n           Check availability first via `GET \/me` \u2192 `data.capabilities.signer_pays`\n           (and `signer_pays_window_days`).\n\n           A sharing mode that is not available is rejected with 422 `payer_mode_unavailable` \u2014 it is\n           never silently switched to `creator`. `designated` with signers but no `is_payer` is 422\n           `payer_required`; `is_payer` in any other mode is 422 `payer_not_applicable`. Test (sandbox)\n           tokens record the mode but move no money and ask no signer to pay."
                                },
                                {
                                    "key": "signing_deadline_at",
                                    "value": "2026-11-05T14:30:00Z",
                                    "type": "text",
                                    "description": "Optional ISO-8601 date-time WITH an explicit offset (`Z` or `+03:30`) after which nobody new may sign \u2014 a zone-less or relative value (\u00abtomorrow\u00bb) is 422. At least\n           one hour and at most 180 days from now (the life of the signing link); outside that range is\n           422 `validation` and nothing is created. Omit it for no deadline (the default \u2014 exactly as\n           before). When it passes: a contract nobody has signed is cancelled (`contract.canceled` with\n           `reason: signing_deadline`, refund by the usual cancel rule); a contract someone has signed stays\n           `waiting_signature` but accepts no further signature until the owner extends the deadline in\n           the panel. Either way `contract.signing_deadline.passed` fires with `outcome` `canceled` or\n           `closed`. With `payer_mode` `signer`\/`designated` the payment window never ends later than this.\n           In the two-step flow the deadline is re-checked when the document or the signers arrive:\n           passed or less than an hour away \u21d2 422 `signing_deadline_passed`.\n           Returned as `signing_deadline_at` (and `signing_closed_at` once signing was closed)."
                                },
                                {
                                    "key": "facts[counterparty_name]",
                                    "value": "\u0634\u0631\u06a9\u062a \u0622\u0644\u0641\u0627",
                                    "type": "text",
                                    "description": ""
                                },
                                {
                                    "key": "facts[end_date]",
                                    "value": "1406\/07\/29",
                                    "type": "text",
                                    "description": ""
                                },
                                {
                                    "key": "facts[end_reminder_days]",
                                    "value": "30",
                                    "type": "text",
                                    "description": ""
                                },
                                {
                                    "key": "on_company_warning",
                                    "value": "refuse",
                                    "type": "text",
                                    "description": "With inline company signers: `continue` (default \u2014 sent, and the 202 carries\n           `meta.company_checks`) or `refuse` (409 `company_check_warning` on a high warning; nothing is created)."
                                },
                                {
                                    "key": "file",
                                    "src": [],
                                    "type": "file"
                                }
                            ]
                        },
                        "description": "Creates a new contract. Two modes:\n\n**One-shot** \u2014 multipart\/form-data with `file` field + metadata. File is\npersisted to staging and `ProcessContractFilesJob` is dispatched. Optional\n`signers[]` are added by the same job after page rasterization completes.\nResponse is **202 Accepted**; poll `_links.processing` until `ready=true`.\n\n**Multi-step** \u2014 JSON without `file`. Creates a `draft` contract row only.\nCaller then issues `POST \/contracts\/{code}\/files` to attach the document. Until it is attached the\ncontract cannot be sent: `POST \/contracts\/{code}\/signers` answers 422 `document_required` and adds,\ncharges and texts nothing. After the upload, wait until `GET \/contracts\/{code}\/processing` answers\n`ready=true` (or the `contract.processing.completed` webhook) and then add the signers \u2014 the signing\nSMS does not wait for the pages. To skip the wait, send `signers` inline with the file in one call.\n\n### Signature placement \u2014 `template_id` + `template_enforcement`\n\nPassing `template_id` snapshots that template's signature slots onto the new\ncontract. `template_enforcement` decides what those slots MEAN to the signer:\n\n- `locked` \u2014 each slot is pinned: the signer cannot drag the signature off it,\n  and cannot sign on a page the template never assigned them.\n  **This is the default whenever `template_id` is present.**\n- `suggested` \u2014 the signature merely *starts* on the slot; the signer may move\n  it anywhere, on any page.\n\n`strict` \/ `loose` are accepted as legacy aliases of `locked` \/ `suggested`\n(the spelling earlier revisions of this page advertised).\n\nIf the template pins slots on more than one page, send `all_pages_signature=true`\nas well \u2014 otherwise one signature on any allowed page completes the contract.\n\n`locked` fixes WHERE each mark goes; by itself it does not make the signer use every slot \u2014\none signature is enough and a pinned stamp, name or date slot may stay empty. Send\n`require_all_placements=true` to make every slot pinned for a signer a condition of signing:\nthe signing page puts the name and the date on their slots by itself, shows each empty slot,\nand refuses to record the signature until the signature and stamp slots are used too.\nIt is stored only beside a `locked` template that pins at least one slot (otherwise the\nresponse reports `false`), and it never applies to a signer the template pins nothing for.\n\nVerify what was applied on the create response (`template_id`,\n`template_enforcement`) or in full via `GET \/contracts\/{code}` \u2192 `template_positions`.\n\nEvery contract response also carries `facts` (what you declared, or `null`) and `via`: `null`, or\n`{client_name, kind}` when the contract was sent through an AI-assistant connection (MCP). `via`\ncannot be set from the request body or a header.\n\n### Discount code \u2014 `discount_code`\n\nSend the same code you would type in the panel. It is stored on the contract and applied when the\nsigners are added \u2014 by this call (one-shot) or by a later `POST \/contracts\/{code}\/signers`, which\ntakes no discount parameter of its own. It works in every `payer_mode`: with `creator` it lowers\nwhat your wallet is charged; with `signer` \/ `designated` it lowers the total the payers split.\nThe contract responses echo it as `discount_code`.\n\nWhat the code does NOT promise \u2014 the same rules as the panel:\n\n- **It is checked now and applied later, and nothing is reserved in between.** A code that expires, is\n  deactivated or reaches its usage limit before the signers are added gives no discount, and the send\n  is charged in full. With a limited-use code, add the signers in the same call.\n- **A send your package quota covers entirely costs nothing, so it gets no discount** and does not count\n  as a use of the code (`payer_mode=creator` only \u2014 the sharing modes do not use quota).\n- **With `payer_mode=creator`, every batch of signers you add is charged with the code**, and each\n  charge counts as one use of it.\n- A code with a minimum purchase applies only to a send that reaches it.\n\n`GET \/cost-estimate?signers=N&contract={code}` returns the amount that will actually be charged.\n\n### Send a stuck digital contract again as electronic \u2014 `replaces`\n\nWhen a signer of your waiting **digital** contract cannot get a certificate, send `replaces` with that\ncontract's code and nothing else (optionally `signature_method=electronic`). The waiting contract ends \u2014 `canceled`\nif nobody signed, `voided` with its signed pages kept if only your side signed (or a counterparty signed while\n\u00abwithdraw after signature\u00bb is enabled) \u2014 and a NEW **electronic** contract is created with the same document, the\nsame signers in the same order and the same signature boxes; the signing SMS goes again at each signer's turn. The\nold contract's `signature_method` never changes. This is exactly the panel's \u00ab\u0627\u0631\u0633\u0627\u0644\u0650 \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0627 \u0627\u0645\u0636\u0627\u06cc \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9\u00bb:\nthe same rule, the same price, one implementation.\n\n- **Money:** the old contract's payment carries to the new one. Half of today's price is charged only when\n  switching costs something \u2014 a signer who passed identity on the old contract must be checked again, or someone\n  already signed digitally. A certificate fee prepaid for a signer whose certificate never issued is refunded.\n- **Only your own** waiting digital contract (anyone else's \u2014 404 `not_found`), with the same kind of token that\n  created it (409 `sandbox_mode_mismatch`). Test contracts cannot be replaced.\n- Any other field beside `replaces` (`title`, `file`, `source`, `signers`, `payer_mode`, \u2026) is 422\n  `replaces_conflict`: the point is \u00abthe same document, the same people\u00bb.\n- A contract that can never be resent (already ended, not digital, a test contract, an attached document, made\n  from a form, signers pay) is 409 `replace_not_allowed`. A refusal that depends on something that can change\n  (the feature switched off, your identity verification, the company or trade name it was sent under, a\n  counterparty signed while \u00abwithdraw after signature\u00bb is off, the document missing) is 403\n  `replace_not_available` \u2014 not stored under your `Idempotency-Key`: fix the cause and send the same request.\n  A signature that landed during the call is 409 `replace_state_changed`; another resend of the same contract\n  in progress is 409 `replace_busy` \u2014 retry both with the same key. The reason is always in `title_fa`; nothing\n  is ended or charged.\n- `replaces` must be the only field of the body; a query-string parameter does not count.\n- With `X-Skip-Sms: true`, or when the old contract was already sent that way, nobody is texted: deliver each\n  signer's `signing_url` yourself, as before.\n- Webhooks: the old contract fires `contract.canceled` (and `contract.voided` when voided) with\n  `reason=replaced_by_electronic`; the new one fires `contract.created`. The responses carry the link both ways:\n  `replaces` \/ `replaced_by` on `GET \/contracts\/{code}`.\n- Send an `Idempotency-Key`: a retried request replays the first answer instead of finding the old contract ended.\n\nThe answer is 202 with the new contract (its `replaces` is the old code) and `meta.charged` \u2014 what this call\ndeducted from the wallet, in toman (0 when the payment carried \u2014 and 0 when the half was taken from your package\nquota instead) \u2014 and `meta.refunds_due`: the total of refunds the resend left due (a certificate pre-payment back to\nyou, AND a certificate fee back to the signer's own wallet who paid it), paid as soon as no enrolment can use them.\n\nScope: `contracts:write`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 402,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/insufficient_balance\",\n  \"status\": 402,\n  \"code\": \"insufficient_balance\",\n  \"title_fa\": \"\u0645\u0648\u062c\u0648\u062f\u06cc \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u06a9\u0627\u0641\u06cc \u0646\u06cc\u0633\u062a\",\n  \"title_en\": \"Insufficient wallet balance\",\n  \"meta\": {\"balance_toman\": 29750, \"required_toman\": 60500, \"shortfall_toman\": 30750}\n}",
                            "name": "one-shot send with signers, wallet cannot cover the fee \u2014 nothing is created; retrying will not help until the wallet is topped up"
                        },
                        {
                            "header": [],
                            "code": 403,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/replace_not_available\",\n  \"status\": 403,\n  \"code\": \"replace_not_available\",\n  \"title_fa\": \"\u0627\u0631\u0633\u0627\u0644\u0650 \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0627 \u0627\u0645\u0636\u0627\u06cc \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9 \u0641\u0639\u0644\u0627\u064b \u0641\u0639\u0627\u0644 \u0646\u06cc\u0633\u062a.\",\n  \"title_en\": \"This contract cannot be sent again as electronic right now; fix the cause and send the same request again\"\n}",
                            "name": "replaces: refused for a reason that can change (the switch, your verification or company, the withdraw rule) \u2014 nothing ended or charged; not stored under the Idempotency-Key"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/replace_not_allowed\",\n  \"status\": 409,\n  \"code\": \"replace_not_allowed\",\n  \"title_fa\": \"\u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0645\u0646\u062a\u0638\u0631\u0650 \u0627\u0645\u0636\u0627 \u0646\u06cc\u0633\u062a.\",\n  \"title_en\": \"This contract cannot be sent again as electronic in its current state\"\n}",
                            "name": "replaces: this contract can never be resent (e.g. signers pay, already ended) \u2014 nothing ended or charged"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/replace_busy\",\n  \"status\": 409,\n  \"code\": \"replace_busy\",\n  \"title_fa\": \"\u0647\u0645\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0647\u0645\u06cc\u0646 \u062d\u0627\u0644\u0627 \u062f\u0631 \u062d\u0627\u0644\u0650 \u0627\u0631\u0633\u0627\u0644\u0650 \u062f\u0648\u0628\u0627\u0631\u0647 \u0627\u0633\u062a\u061b \u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647\u0654 \u062f\u06cc\u06af\u0631 \u062f\u0648\u0628\u0627\u0631\u0647 \u0627\u0645\u062a\u062d\u0627\u0646 \u06a9\u0646\u06cc\u062f.\",\n  \"title_en\": \"This contract is being sent again by another request; retry shortly\"\n}",
                            "name": "replaces: another resend of the same contract is running \u2014 retry shortly"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/replace_state_changed\",\n  \"status\": 409,\n  \"code\": \"replace_state_changed\",\n  \"title_fa\": \"\u0647\u0632\u06cc\u0646\u0647\u0654 \u0646\u0633\u062e\u0647\u0654 \u062a\u0627\u0632\u0647 \u0627\u0632 \u0648\u0642\u062a\u06cc \u0627\u06cc\u0646 \u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632 \u0634\u062f \u0639\u0648\u0636 \u0634\u062f\u0647 \u0627\u0633\u062a\u061b \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0628\u06cc\u0646\u06cc\u062f.\",\n  \"title_en\": \"The contract changed while it was being sent again; nothing changed \u2014 send the same request again\"\n}",
                            "name": "replaces: a signature landed (or the price changed) while it was being sent \u2014 nothing ended or charged; not stored under the Idempotency-Key, send the same request again"
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/template_not_accessible\",\n  \"status\": 422,\n  \"code\": \"template_not_accessible\",\n  \"title_fa\": \"\u0642\u0627\u0644\u0628 \u0627\u0646\u062a\u062e\u0627\u0628\u200c\u0634\u062f\u0647 \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f \u06cc\u0627 \u062f\u0631 \u062f\u0633\u062a\u0631\u0633 \u0634\u0645\u0627 \u0646\u06cc\u0633\u062a\",\n  \"title_en\": \"The selected template does not exist or is not accessible to you\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\"\n}",
                            "name": "template_id not reachable by the caller"
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/discount_code_invalid\",\n  \"status\": 422,\n  \"code\": \"discount_code_invalid\",\n  \"title_fa\": \"\u06a9\u062f \u062a\u062e\u0641\u06cc\u0641 \u0645\u0639\u062a\u0628\u0631 \u0646\u06cc\u0633\u062a \u06cc\u0627 \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u062d\u0633\u0627\u0628 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u06cc\u0633\u062a\u061b \u0622\u0646 \u0631\u0627 \u0627\u0635\u0644\u0627\u062d \u06a9\u0646\u06cc\u062f \u06cc\u0627 \u0646\u0641\u0631\u0633\u062a\u06cc\u062f\",\n  \"title_en\": \"The discount code is not valid for this account; correct it or omit discount_code\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\",\n  \"errors\": [{\"field\": \"discount_code\", \"code\": \"invalid\", \"title_fa\": \"\u06a9\u062f \u062a\u062e\u0641\u06cc\u0641 \u0645\u0639\u062a\u0628\u0631 \u0646\u06cc\u0633\u062a\", \"title_en\": \"Invalid discount code\"}]\n}",
                            "name": "discount_code is unknown, inactive, expired, used up or not issued to this account \u2014 nothing is created"
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/replaces_conflict\",\n  \"status\": 422,\n  \"code\": \"replaces_conflict\",\n  \"title_fa\": \"\u0628\u0627 \u00abreplaces\u00bb \u0647\u0645\u0627\u0646 \u0633\u0646\u062f \u0648 \u0647\u0645\u0627\u0646 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u062f\u0648\u0628\u0627\u0631\u0647 \u0641\u0631\u0633\u062a\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f\u061b \u0641\u06cc\u0644\u062f\u0650 \u062f\u06cc\u06af\u0631\u06cc \u0646\u0641\u0631\u0633\u062a\u06cc\u062f\",\n  \"title_en\": \"With replaces the same document and signers are sent again; send no other field\",\n  \"errors\": [{\"field\": \"title\", \"code\": \"not_allowed_with_replaces\", \"title_fa\": \"\u0627\u06cc\u0646 \u0641\u06cc\u0644\u062f \u06a9\u0646\u0627\u0631\u0650 replaces \u067e\u0630\u06cc\u0631\u0641\u062a\u0647 \u0646\u0645\u06cc\u200c\u0634\u0648\u062f\", \"title_en\": \"Not allowed with replaces\"}]\n}",
                            "name": "replaces sent with another field \u2014 nothing is ended or created"
                        }
                    ]
                },
                {
                    "name": "Upload contract file(s) (two-step flow)",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/files",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/files",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char contract code."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "multipart\/form-data"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "file",
                                    "src": [],
                                    "type": "file"
                                }
                            ]
                        },
                        "description": "Attaches a file to an existing **draft** contract that has no pages yet.\nSame async pipeline as `POST \/contracts` one-shot: stages bytes, dispatches\n`ProcessContractFilesJob`, returns 202 with the `processing` link.\n\nA contract has exactly one document. Once one is attached \u2014 by `POST \/contracts` with a\n`file`\/`source`, or by an earlier call here, even while it is still processing \u2014 another\nupload is 409 `document_already_attached` and the recorded document is unchanged. To use a\ndifferent document, cancel the contract and create a new one. Use the same kind of token\n(live\/test) that created the contract, else 409 `sandbox_mode_mismatch`.\n\nThe one exception: a document that **could not be processed** (`GET \/contracts\/{code}\/processing` answers\n`step=error` and the contract has no pages) is no document. Upload the corrected file here; it replaces the\nfailed one. Signers sent inline with the failed one-shot request were never added \u2014 add them with\n`POST \/contracts\/{code}\/signers` once the new document is ready.\n\nAn electronic replacement (`replaces` set) takes no file here, in any state \u2014 its document is the replaced\ncontract's: 409 `replacement_document_fixed`. If it failed for good, the answer says so; cancel it or contact support.\n\nAfter the 202, wait for `GET \/contracts\/{code}\/processing` to answer `ready=true` (or for the\n`contract.processing.completed` webhook) before adding signers: the signing SMS does not wait for the pages.\n\nA contract created with `signing_deadline_at` is re-checked here against the CURRENT time: if the deadline\nhas passed or is less than an hour away the upload is 422 `signing_deadline_passed` and nothing is staged.\n\nScope: `contracts:write`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/document_already_attached\",\n  \"status\": 409,\n  \"code\": \"document_already_attached\",\n  \"title_fa\": \"\u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0642\u0628\u0644\u0627\u064b \u0633\u0646\u062f \u062f\u0627\u0631\u062f \u0648 \u0633\u0646\u062f\u0634 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u0646\u0645\u06cc\u200c\u0634\u0648\u062f\u061b \u0628\u0631\u0627\u06cc \u0633\u0646\u062f\u0650 \u062f\u06cc\u06af\u0631\u060c \u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0631\u0627 \u0644\u063a\u0648 \u0648 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u0650 \u062a\u0627\u0632\u0647 \u0628\u0633\u0627\u0632\u06cc\u062f\",\n  \"title_en\": \"This contract already has its document and it cannot be replaced; cancel it and create a new contract for another document\"\n}",
                            "name": "the contract already has its document (attached at creation or by an earlier upload)"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/replacement_document_fixed\",\n  \"status\": 409,\n  \"code\": \"replacement_document_fixed\",\n  \"title_fa\": \"\u0633\u0646\u062f\u0650 \u0627\u06cc\u0646 \u0646\u0633\u062e\u0647\u0654 \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9 \u0647\u0645\u0627\u0646 \u0633\u0646\u062f\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u0650 \u0642\u0628\u0644\u06cc \u0627\u0633\u062a \u0648 \u0633\u0627\u0645\u0627\u0646\u0647 \u062e\u0648\u062f\u0634 \u0622\u0646 \u0631\u0627 \u0622\u0645\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f\u061b \u0641\u0627\u06cc\u0644\u0650 \u062f\u06cc\u06af\u0631\u06cc \u067e\u0630\u06cc\u0631\u0641\u062a\u0647 \u0646\u0645\u06cc\u200c\u0634\u0648\u062f.\",\n  \"title_en\": \"This electronic replacement's document is the replaced contract's and is prepared by the system; another file is not accepted.\"\n}",
                            "name": "an electronic replacement (`replaces` set): its document is the replaced contract's and is prepared by the system \u2014 no file is accepted, in any state"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/replacement_document_fixed\",\n  \"status\": 409,\n  \"code\": \"replacement_document_fixed\",\n  \"title_fa\": \"\u0633\u0646\u062f\u0650 \u0627\u06cc\u0646 \u0646\u0633\u062e\u0647\u0654 \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9 \u0622\u0645\u0627\u062f\u0647 \u0646\u0634\u062f \u0648 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646\u0634 \u0645\u0646\u062a\u0642\u0644 \u0646\u0645\u06cc\u200c\u0634\u0648\u0646\u062f\u061b \u0635\u0628\u0631\u06a9\u0631\u062f\u0646 \u06a9\u0645\u06a9\u06cc \u0646\u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0631\u0627 \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f \u06cc\u0627 \u0628\u0627 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u062a\u0645\u0627\u0633 \u0628\u06af\u06cc\u0631\u06cc\u062f.\",\n  \"title_en\": \"This electronic replacement's document could not be prepared; another file is not accepted. Cancel it or contact support.\"\n}",
                            "name": "an electronic replacement whose document could not be prepared \u2014 waiting will not help; cancel it or contact support"
                        }
                    ]
                },
                {
                    "name": "Cancel contract",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char public code."
                                }
                            ]
                        },
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Cancels a contract in `draft` or `waiting_signature` state. Refunds the\nbilled amount to the original wallet (100% if no signer signed, 50% if any\nShahkar was consumed). Deletes contract files from storage. Waiting signers\nreceive an SMS notifying them the contract was canceled.\n\nUse the same kind of token (live\/test) that created the contract: a test token on a live\ncontract, or a live token on a test one, is 409 `sandbox_mode_mismatch` and nothing is\ncancelled, deleted, refunded or sent.\n\nScope: `contracts:write`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"code\": \"ABC1234567XYZ890\",\n    \"status\": \"canceled\",\n    \"canceled_at\": \"2026-05-11T10:00:00.000Z\",\n    \"refund\": { \"amount\": 60000, \"currency\": \"IRT\" },\n    \"end_reason\": \"manual\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/sandbox_mode_mismatch\",\n  \"status\": 409,\n  \"code\": \"sandbox_mode_mismatch\",\n  \"title_fa\": \"\u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0628\u0627 \u062a\u0648\u06a9\u0646\u0650 \u0632\u0646\u062f\u0647 \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647\u061b \u0622\u0646 \u0631\u0627 \u0628\u0627 \u0647\u0645\u0627\u0646 \u0646\u0648\u0639 \u062a\u0648\u06a9\u0646 \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f\",\n  \"title_en\": \"This contract was created with a live token; cancel it with the same kind of token\"\n}",
                            "name": "token of the other mode (test token, live contract \u2014 or the reverse); nothing changed"
                        }
                    ]
                },
                {
                    "name": "Withdraw contract",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/withdraw",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/withdraw",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char public code."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"reason\":\"\u0645\u0628\u0644\u063a\u0650 \u0628\u0646\u062f\u0650 \u062f\u0648\u0645 \u0627\u0634\u062a\u0628\u0627\u0647 \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u0628\u0648\u062f.\"}"
                        },
                        "description": "Takes a contract back **after at least one signer has signed and before the last one has** \u2014 the\nsender changed his mind, or found a mistake the signers must not sign. Until everyone has signed\nnothing is binding, so no one else's consent is needed. Use `DELETE \/contracts\/{code}` instead\nwhile nobody has signed.\n\nThe contract becomes `voided` with `end_reason` `withdrawn_by_sender`. The signed pages are KEPT\n(they are evidence), the refund and the package quota follow the same rule as a cancel, waiting\nsigners receive the cancellation SMS, and signers who already signed are told. Your `reason` is\nstored for your own records and the audit trail; it is not sent to the signers or in the webhook.\nThe `contract.voided` webhook fires \u2014 the specific event \u2014 and `contract.canceled` fires too, with\n`reason` `withdrawn_by_sender`, so an integration that only knows `contract.canceled` still learns the\ncontract ended. Handle `contract.voided` and ignore a `contract.canceled` whose `reason` is\n`withdrawn_by_sender` if you subscribe to both.\n\nOnly the account that created the contract may withdraw it. The feature is switched off until it\nis enabled for the platform; while off, every call is 403 `withdraw_not_available`. With a test\ntoken on a test contract nothing is charged, refunded or texted.\n\nScope: `contracts:write`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"code\": \"ABC1234567XYZ890\",\n    \"status\": \"voided\",\n    \"voided_at\": \"2026-10-29T10:00:00.000Z\",\n    \"refund\": { \"amount\": 30000, \"currency\": \"IRT\", \"reason\": \"contract_withdrawn\" },\n    \"end_reason\": \"withdrawn_by_sender\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 403,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/policy_denied\",\n  \"status\": 403,\n  \"code\": \"policy_denied\",\n  \"title_fa\": \"\u0641\u0642\u0637 \u0641\u0631\u0633\u062a\u0646\u062f\u0647\u0654 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0622\u0646 \u0631\u0627 \u067e\u0633 \u0628\u06af\u06cc\u0631\u062f.\",\n  \"title_en\": \"Only the contract's creator can withdraw it\"\n}",
                            "name": "not the contract's creator"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/not_withdrawable\",\n  \"status\": 409,\n  \"code\": \"not_withdrawable\",\n  \"title_fa\": \"\u0647\u0645\u0647\u0654 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u0627\u0645\u0636\u0627 \u06a9\u0631\u062f\u0647\u200c\u0627\u0646\u062f\u061b \u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u062f\u06cc\u06af\u0631 \u067e\u0633\u200c\u06af\u0631\u0641\u062a\u0646\u06cc \u0646\u06cc\u0633\u062a.\",\n  \"title_en\": \"The contract cannot be withdrawn in its current state\"\n}",
                            "name": "nobody has signed yet, everyone has signed, or the contract has ended"
                        }
                    ]
                },
                {
                    "name": "Declare or correct a contract's facts",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/facts",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/facts",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "ABC1234567XYZ890",
                                    "description": "16-char public code."
                                }
                            ]
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"counterparty_name\":\"\u0634\u0631\u06a9\u062a \u0622\u0644\u0641\u0627\",\"contract_type\":\"\u0627\u062c\u0627\u0631\u0647\",\"start_date\":\"1405\\\/08\\\/01\",\"end_date\":\"1406\\\/07\\\/30\",\"amount_toman\":120000000,\"auto_renew\":false,\"notes\":\"\u062a\u0645\u062f\u06cc\u062f \u0628\u0627 \u062a\u0648\u0627\u0641\u0642 \u06a9\u062a\u0628\u06cc\",\"end_reminder_days\":30,\"confirm\":true}"
                        },
                        "description": "Merges into what is already declared: a key you leave out is unchanged, a key sent as `null`\nis cleared. Only the contract's creator may declare \u2014 a signer can read the facts on\n`GET \/contracts\/{code}`, not change them. Every change clears `confirmed_at` (a confirmation\nwas of the old values). When every field ends up empty the facts are removed and `data` is\n`null`.\n\nSend `confirm: true` to mark the declared facts as confirmed \u2014 e.g. once the contract has gone\nout with them. Alone it changes no field (and not `source`); with changes in the same body it\nconfirms the new values. Confirming again keeps the first `confirmed_at`. With nothing declared\nthere is nothing to confirm: `data` is `null`. Any value other than `true` is 422.\n\nDates: Jalali `1405\/08\/01` (Persian digits accepted) or ISO `2026-10-23`; stored as the\nGregorian day and returned in both calendars. A Jalali year written with dashes\n(`1405-08-01`) is refused, never shifted six centuries.\n\nScope: `contracts:write`. Send an `Idempotency-Key` to make a retry safe."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"counterparty_name\": \"\u0634\u0631\u06a9\u062a \u0622\u0644\u0641\u0627\", \"contract_type\": \"\u0627\u062c\u0627\u0631\u0647\",\n    \"start_date\": \"2026-10-23\", \"start_date_jalali\": \"1405\/08\/01\",\n    \"end_date\": \"2027-10-21\", \"end_date_jalali\": \"1406\/07\/29\",\n    \"amount_toman\": 120000000, \"auto_renew\": false, \"notes\": null,\n    \"source\": \"api\", \"confirmed\": false, \"confirmed_at\": null, \"confirmed_at_jalali\": null,\n    \"declared\": true\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 403,
                            "body": "{\"type\": \"https:\/\/docs.elemza.com\/errors\/policy_denied\", \"status\": 403, \"code\": \"policy_denied\", \"title_fa\": \"\u0641\u0642\u0637 \u0633\u0627\u0632\u0646\u062f\u0647\u0654 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u0650 \u0622\u0646 \u0631\u0627 \u0627\u0639\u0644\u0627\u0645 \u06a9\u0646\u062f\", \"title_en\": \"Only the contract's creator can declare its facts\"}",
                            "name": "you can see it (e.g. as a signer) but did not create it"
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\"type\": \"https:\/\/docs.elemza.com\/errors\/not_found\", \"status\": 404, \"code\": \"not_found\", \"title_fa\": \"\u0642\u0631\u0627\u0631\u062f\u0627\u062f \u06cc\u0627\u0641\u062a \u0646\u0634\u062f\", \"title_en\": \"Contract not found\"}",
                            "name": "unknown code, or a contract you cannot see"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Digital certificates (PKI)",
            "description": "\nIssuing a certificate is not something an API can do on somebody's behalf: the law wants an OTP\nthat person typed and a live face check they attended. So these endpoints do the part an API\nlegitimately can \u2014 start the enrolment, hand back a link for the person, and let the integrator\nfollow it to the end.",
            "item": [
                {
                    "name": "Certificate status for one of your people",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/certificates",
                            "query": [
                                {
                                    "key": "national_code",
                                    "value": "0010350829",
                                    "description": "The person's national code.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/certificates?national_code=0010350829"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Answers \"can this person sign digitally yet?\" for somebody you have enrolled.\n\n**Privacy** \u2014 this is not a lookup service for arbitrary national codes. It only answers for\npeople you yourself started an enrolment for; anyone else returns 404, so the endpoint cannot\nbe used to discover whether a given Iranian holds a certificate.\n\nScope required: `certificates:read`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"national_code\": \"0010350829\",\n    \"status\": \"active\",\n    \"valid_from\": \"2026-07-30T09:12:00.000Z\",\n    \"valid_until\": \"2027-07-30T09:12:00.000Z\",\n    \"mode\": \"live\"\n  }\n}",
                            "name": "Active certificate"
                        },
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": { \"national_code\": \"0010350829\", \"status\": \"pending_ekyc\", \"valid_from\": null, \"valid_until\": null, \"mode\": \"live\" }\n}",
                            "name": "Enrolment still in progress"
                        }
                    ]
                },
                {
                    "name": "One enrolment request",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/certificates\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/certificates\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "01jqk8x2m4n6p8r0s2t4v6w8y0",
                                    "description": "The `request_id` from the onboarding call."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "The state of a single enrolment you started, by the `request_id` you received.\n\nScope required: `certificates:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG9758NSZWEFCPQ3SPB8K"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG9758NSZWEFCPQ3SPB8K\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Start a certificate enrolment",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/certificates\/onboarding",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/certificates\/onboarding"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"national_code\":\"0010350829\",\"mobile\":\"09121234567\",\"first_name\":\"\u0639\u0644\u06cc\",\"last_name\":\"\u0631\u0636\u0627\u06cc\u06cc\",\"pay_by\":\"issuer\",\"redirect_url\":\"https:\\\/\\\/partner.example\\\/done\",\"ttl_minutes\":120}"
                        },
                        "description": "Creates a short-lived, single-use link for one of your users to obtain a digital certificate.\nSend them to `onboarding_url`; they complete the SMS code, the identity form and the video\ncheck on our pages, and you learn the outcome from `certificate.issued` \/ `certificate.failed`\n(or by polling `GET \/api\/v1\/certificates\/{request_id}`).\n\n**Who pays** \u2014 `pay_by: \"issuer\"` charges YOUR wallet for the one-time issuance fee right now\nand refunds it automatically if no certificate is ever issued. `pay_by: \"subject\"` (default)\nlets the person pay on the page.\n\n**Idempotency** \u2014 while an enrolment for the same national code is still open you get the SAME\nlink back, not a second one. Pendar treats an open enrolment as a single order.\n\nScope required: `certificates:write`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 201,
                            "body": "{\n  \"data\": {\n    \"request_id\": \"01jqk8x2m4n6p8r0s2t4v6w8y0\",\n    \"onboarding_url\": \"https:\/\/elemza.com\/pki\/onboarding\/01jqk8x2m4n6p8r0s2t4v6w8y0?expires=...&signature=...\",\n    \"expires_at\": \"2026-07-30T12:00:00.000Z\",\n    \"status\": \"pending\",\n    \"pay_by\": \"issuer\",\n    \"mode\": \"live\"\n  }\n}",
                            "name": "Link created"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Endpoints",
            "description": "",
            "item": [
                {
                    "name": "Invoke the controller method.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/documentation",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/documentation"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG9DWE7WEE3KA8MTMPXY1"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "x-ratelimit-limit",
                                    "value": "30"
                                },
                                {
                                    "key": "x-ratelimit-remaining",
                                    "value": "29"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                },
                                {
                                    "key": "set-cookie",
                                    "value": "XSRF-TOKEN=eyJpdiI6ImoxL1phaWMwZUdRK0RQQWxzUm1aL2c9PSIsInZhbHVlIjoiR083RGtUMHRKOXpqZHhwbGVpek5NL01aZXBMVG5xZ1FkYTc1aUN5ZWFHb1Zud1BHZXdZR1dHVE9kcmk3Smg0aEVNak8rQnV1MHJ2eDJtSG92T3RidHA0aG9ZaDdOVk4vZ3A3QXhTaXc1eUh0aHZiR1QzSUhzeXM4d2htcHhQTzMiLCJtYWMiOiI1NzgxNjRiNzY0YTQwYjc2MGQwNDZlM2ViM2I2MzhlNmU3MzcyYzFhYzI1OGI0YTNlOGYxM2E2NGM1NjFiOGEyIiwidGFnIjoiIn0%3D; expires=Thu, 19 Nov 2026 05:09:48 GMT; Max-Age=7200; path=\/; samesite=lax; emza_session=eyJpdiI6IkVuWFllc1RudFBwWEI2YnZxMFVMUEE9PSIsInZhbHVlIjoiV3dSMkQ2L2U4Um8wOHp3YnphOURwbXVlVHFvNVlUWVQ2VDhoc1hyL3FWV096Q3FjeDJOc05zeFdpcUxBR3Y0emFZY0g4bEtLM1R6bDFDQ0o0RTlndzJYbEozSGkvVFFKVHM0Y1V5bnNoS0ozOUR1WHoyNGk3SnFjNnBhNHkxMmMiLCJtYWMiOiI1YWUyYjVjNTI0ZWIzZmU5YmVhMTcyOTBhZjAxOGEwMThlNGEwNzEyMWJmYmNmYzlhMmYxMmQ0ZmVjZGZiZDdiIiwidGFnIjoiIn0%3D; expires=Thu, 19 Nov 2026 05:09:48 GMT; Max-Age=7200; path=\/; httponly; samesite=lax"
                                }
                            ],
                            "code": 500,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/internal_error\",\"status\":500,\"code\":\"internal_error\",\"title_fa\":\"\\u062e\\u0637\\u0627\\u06cc \\u062f\\u0627\\u062e\\u0644\\u06cc \\u0633\\u0631\\u0648\\u0631\",\"title_en\":\"Internal server error\",\"request_id\":\"01M7RWG9DWE7WEE3KA8MTMPXY1\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Form submissions \u2014 fill a form through the API (ADR-0029)",
            "description": "\nSubmit-once semantics: no draft\/resume, no edit-after-submit (FB SCOPE-CONTRACT rows 6\/7).\nOwnership: every endpoint requires the form to BELONG to the token owner (v2 schema only) \u2014\nthe integrator drives fills of their OWN forms; end users never hold tokens.",
            "item": [
                {
                    "name": "Public signed-URL download twin (no Bearer \u2014 the URL signature is the auth proof,\nminted by downloadPdf() after the bearer was verified). Mirrors contracts \/dl.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/form-submissions\/:code\/dl",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/form-submissions\/:code\/dl",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char submission code."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG8WEN7FG20F0QQ53D2A9"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG8WEN7FG20F0QQ53D2A9\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Public signed-URL twin for a single field file (no Bearer \u2014 the signature is the auth\nproof, minted by downloadFieldFile() only after the bearer was verified).",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/form-submissions\/:code\/files\/:field\/dl",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/form-submissions\/:code\/files\/:field\/dl",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char submission code."
                                },
                                {
                                    "id": "field",
                                    "key": "field",
                                    "value": "architecto",
                                    "description": "The field's technical `name`."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG8WN0SYK2DV0P3HVRFEV"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG8WN0SYK2DV0P3HVRFEV\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "List submissions",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug\/submissions",
                            "query": [
                                {
                                    "key": "status",
                                    "value": "architecto",
                                    "description": "draft|pending_payment|submitted|processing|completed|signed.",
                                    "disabled": false
                                },
                                {
                                    "key": "submitted_after",
                                    "value": "architecto",
                                    "description": "ISO 8601.",
                                    "disabled": false
                                },
                                {
                                    "key": "submitted_before",
                                    "value": "architecto",
                                    "description": "ISO 8601.",
                                    "disabled": false
                                },
                                {
                                    "key": "has_contract",
                                    "value": "",
                                    "description": "Only submissions that bridged to a contract that is still live (true), or that have none \u2014 never made, or cancelled\/withdrawn (false).",
                                    "disabled": true
                                },
                                {
                                    "key": "reference",
                                    "value": "wc:shop.ir:1234",
                                    "description": "Only the submission(s) you stored under this `reference` (exact match).",
                                    "disabled": false
                                },
                                {
                                    "key": "per_page",
                                    "value": "16",
                                    "description": "Max 100, default 20.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug\/submissions?status=architecto&submitted_after=architecto&submitted_before=architecto&has_contract=&reference=wc%3Ashop.ir%3A1234&per_page=16",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "architecto",
                                    "description": "The form's slug."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"status\":\"signed\",\"submitted_after\":\"2026-11-19T06:39:48\",\"submitted_before\":\"2026-11-19T06:39:48\",\"has_contract\":false,\"reference\":\"b\",\"page\":22,\"per_page\":7}"
                        },
                        "description": "Paginated, newest first. Scope: `forms:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG94TETS16W58DNC7KJH0"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG94TETS16W58DNC7KJH0\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get one submission",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug\/submissions\/:code",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug\/submissions\/:code",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "architecto",
                                    "description": "The form's slug."
                                },
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char submission code."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Scope: `forms:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG95490WW1DTM1VVFS9K4"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG95490WW1DTM1VVFS9K4\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Download submission PDF",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug\/submissions\/:code\/pdf",
                            "query": [
                                {
                                    "key": "format",
                                    "value": "architecto",
                                    "description": "redirect|url|stream. Default redirect.",
                                    "disabled": false
                                },
                                {
                                    "key": "ttl",
                                    "value": "16",
                                    "description": "Signed URL lifetime seconds (60..86400). Default 86400.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug\/submissions\/:code\/pdf?format=architecto&ttl=16",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "architecto",
                                    "description": "The form's slug."
                                },
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char submission code."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Image-overlay forms render a final PDF per submission (queued at submit). Same\nsigned-URL family as the contracts PDF endpoint:\n\n- `format=redirect` (default) \u2014 302 to a signed URL (anon-safe, forwardable)\n- `format=url` \u2014 JSON envelope with url\/expiry\/checksum\n- `format=stream` \u2014 bytes in this response\n\nScope: `forms:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG95H331GN5Z7EBX17BW5"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG95H331GN5Z7EBX17BW5\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Download one uploaded field file",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug\/submissions\/:code\/files\/:field",
                            "query": [
                                {
                                    "key": "format",
                                    "value": "architecto",
                                    "description": "redirect|url|stream. Default redirect.",
                                    "disabled": false
                                },
                                {
                                    "key": "ttl",
                                    "value": "16",
                                    "description": "Signed URL lifetime seconds (60..86400). Default 86400.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug\/submissions\/:code\/files\/:field?format=architecto&ttl=16",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "architecto",
                                    "description": "The form's slug."
                                },
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char submission code."
                                },
                                {
                                    "id": "field",
                                    "key": "field",
                                    "value": "architecto",
                                    "description": "The field's technical `name`."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Serves whatever the submission actually holds for `{field}`: a stored `forms\/\u2026` path,\nOR an inline `data:\u2026;base64,\u2026` URI. Both shapes are real and both are served \u2014 the\ndata-URI is what a drawn signature is, and what API callers necessarily wrote before\nan uploads endpoint existed, so refusing it would orphan real historical data.\n\nThe field's type is resolved from the submission's OWN schema snapshot, not the live\nform: editing a form must never change what an already-recorded submission is\nunderstood to contain.\n\nSame three formats as the submission PDF endpoint.\n\nScope: `forms:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG95WYM35P3RBTJD7S2X5"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG95WYM35P3RBTJD7S2X5\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "POST api\/v1\/forms\/{slug}\/submissions",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug\/submissions",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug\/submissions",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "1M0Y5PxXpaeres8a264wcFQJ_2-vyw7Mlim6DnL",
                                    "description": "The slug of the form."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": []
                },
                {
                    "name": "Upload a file for a `file` \/ `image` field",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug\/uploads",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug\/uploads",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "architecto",
                                    "description": "The form's slug."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "multipart\/form-data"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "field",
                                    "value": "national_card",
                                    "type": "text",
                                    "description": "The target field's technical `name` (see `\/schema`)."
                                },
                                {
                                    "key": "file",
                                    "src": [],
                                    "type": "file"
                                }
                            ]
                        },
                        "description": "Multipart, ONE file per call. The returned `path` is what you then put in\n`data.{field}` on `POST \/forms\/{slug}\/submissions`. The bytes land in the form's own\nfolder byte-identically to what the web fill flow produces, so the submissions table,\nthe answer sheet and the image-overlay PDF all render it the same way \u2014 an API fill\nand a browser fill become indistinguishable downstream, which is the whole point.\n\nSize and type come from the FIELD's own config (`max_size_kb` \/ `allowed_mimes` as the\ndesigner set them), clamped to the server ceiling, and the MIME is read from the\nfile's magic bytes \u2014 never from its name or extension.\n\n`signature` is deliberately not accepted here: it is drawn, and the canvas yields a\n`data:image\/png;base64,\u2026` value that goes straight into `data`.\n\nScope: `forms:write` + `Idempotency-Key` supported."
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Forms \u2014 read-only access to v2 forms owned by the authenticated user.",
            "description": "\nPhase 5 MVP: list + show + stats. Submissions endpoint will land in Phase 5b\nwith proper pagination + transformer.",
            "item": [
                {
                    "name": "List forms (v2 only \u2014 schema_version='2.0')",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms",
                            "query": [
                                {
                                    "key": "page",
                                    "value": "16",
                                    "description": "Page number. Default 1.",
                                    "disabled": false
                                },
                                {
                                    "key": "per_page",
                                    "value": "16",
                                    "description": "Items per page. Max 100. Default 50.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/forms?page=16&per_page=16"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Paginated list of v2-schema forms owned by the calling user, most recent\nfirst. Form Builder v1 records are excluded \u2014 use the dashboard for those.\nReturns the standard `data` + `meta` + `links` envelope, consistent with the\nother list endpoints (API-G1, audit 2026-06 \u2014 previously a silent limit(100)).\n\nScope required: `forms:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG93P8VG474862STXRZ61"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG93P8VG474862STXRZ61\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Show one form (metadata only \u2014 schema available via dedicated \/schema endpoint in future)",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "frm-e7465df28dd45785",
                                    "description": "The form's public slug."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Scope required: `forms:read`.\n\n`cost` (added 2026-08-24) answers \u00abwhat does ONE response to this form cost me?\u00bb from the\nsame engine that takes the money \u2014 `weight` is the signature units a response consumes\n(1 for a single signer, +0.5 per extra signer, 0.5 for an \u0627\u0633\u062a\u0639\u0644\u0627\u0645-only form) and\n`unit_cost` is the Toman amount after your quota and package discount. It is present only\non this endpoint, never on the list: it costs a quota and a wallet read per form.\n\n\u26a0\ufe0f `is_estimate: true` on a `payer = filler` form \u2014 a different person pays each response,\nso the figure is the price on YOUR tariff, not one anybody will actually be charged.\n`ok: false` means the figures could not be computed; the zeros then mean \u00abunknown\u00bb, not\n\u00abfree\u00bb."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"id\": 142,\n    \"slug\": \"frm-e7465df28dd45785\",\n    \"title\": \"\u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0647\u0645\u06a9\u0627\u0631\u06cc\",\n    \"status\": \"published\",\n    \"renderer_type\": \"online\",\n    \"requires_signature\": true,\n    \"payer\": \"owner\",\n    \"signature_method\": \"electronic\",\n    \"submission_count\": 23,\n    \"views_count\": 187,\n    \"created_at\": \"2026-05-10T14:32:00.000Z\",\n    \"cost\": {\n      \"ok\": true,\n      \"is_free\": false,\n      \"weight\": 1.5,\n      \"unit_cost\": 30000,\n      \"currency\": \"IRT\",\n      \"is_estimate\": false,\n      \"quota_unlimited\": false,\n      \"quota_remaining\": 13,\n      \"responses_left_on_quota\": 8\n    }\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/form_not_found\",\n  \"status\": 404,\n  \"code\": \"form_not_found\",\n  \"title_fa\": \"\u0641\u0631\u0645 \u06cc\u0627\u0641\u062a \u0646\u0634\u062f \u06cc\u0627 \u0645\u062a\u0639\u0644\u0642 \u0628\u0647 \u0634\u0645\u0627 \u0646\u06cc\u0633\u062a\",\n  \"title_en\": \"Form not found or not owned by the caller\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\"\n}",
                            "name": "Not found or not owned"
                        }
                    ]
                },
                {
                    "name": "Form analytics (views\/starts\/submissions\/conversion rates).",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug\/stats",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug\/stats",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "frm-e7465df28dd45785",
                                    "description": "The form's public slug."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Aggregated funnel counters for one form: lifetime totals plus 7-day and 30-day windows, so\nyou can chart trends without additional queries.\n\n\u26a0\ufe0f Two engines count submissions here, and the response names both.\n\n- `submissions` \u2014 the lifetime counter, incremented once per accepted submission. It never\n  decreases, so a deleted submission stays counted, and it is written in exactly one place,\n  so a row created by any other path is invisible to it. **This is the v1 meaning and it\n  does not change without a version bump.** `submissions_recorded` is the same integer under\n  a name that says so.\n- `submissions_stored` \u2014 non-draft rows held right now. This is the number the owner sees in\n  their panel, and it can differ from `submissions` in either direction.\n\n`abandons`, `completion_rate` and `abandon_rate` all derive from `submissions`, so the funnel\nadds up. `completion_rate_stored` is `null` when stored rows exceed recorded starts: the two\ncounters disagree, and a ratio across them would be drift rather than a measurement.\n\nAdded 2026-08-20 \u2014 `submissions_recorded`, `submissions_stored`, `completion_rate_stored`.\nPurely additive; no existing field changed meaning or value.\n\nScope required: `forms:read`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"views\": 187,\n    \"starts\": 41,\n    \"abandons\": 18,\n    \"submissions\": 23,\n    \"submissions_recorded\": 23,\n    \"submissions_stored\": 25,\n    \"start_rate\": 21.9,\n    \"completion_rate\": 56.1,\n    \"completion_rate_stored\": 61.0,\n    \"abandon_rate\": 43.9,\n    \"last_submission_at\": \"2026-08-19T11:02:44+00:00\",\n    \"submissions_last_7d\": 4,\n    \"submissions_last_30d\": 21\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/form_not_found\",\n  \"status\": 404, \"code\": \"form_not_found\",\n  \"title_fa\": \"\u0641\u0631\u0645 \u06cc\u0627\u0641\u062a \u0646\u0634\u062f \u06cc\u0627 \u0645\u062a\u0639\u0644\u0642 \u0628\u0647 \u0634\u0645\u0627 \u0646\u06cc\u0633\u062a\",\n  \"title_en\": \"Form not found or not owned by the caller\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\"\n}",
                            "name": "Not found or not owned"
                        }
                    ]
                },
                {
                    "name": "Form schema (fillable-field catalog)",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug\/schema",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug\/schema",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "architecto",
                                    "description": "The form's public slug."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Everything an integrator needs to build their own fill UI and construct a valid\n`POST \/forms\/{slug}\/submissions` payload: field names, types, labels, required flags,\noptions, pages, visibility conditions, and \u2014 per field \u2014 the SHAPE its value must take\n(`value_format`).\n\n`supported` used to report `false` for file\/image \"because the web fill flow does not\nsupport them either\". Both halves were wrong: the web renderer has had real uploads\nsince 2026-06-22, and nothing ever rejected an inline base64 value on the API side. It\nnow reports true for every fillable field, and `value_format` carries the real answer:\n\n - `upload_path_or_data_uri` \u2014 file\/image: either the `path` from\n   `POST \/forms\/{slug}\/uploads`, or an inline `data:<mime>;base64,\u2026`\n - `data_uri` \u2014 signature: what the canvas produces\n - `verify_field_result` \u2014 query fields: from `POST \/forms\/{slug}\/verify-field`\n - `rows` \u2014 \u00ab\u062c\u062f\u0648\u0644\u0650 \u0631\u062f\u06cc\u0641\u200c\u062f\u0627\u0631\u00bb (`line_items`): a JSON ARRAY of row objects, each keyed\n   by the column keys in `config.columns` \u2014 `[{\"desc\":\"\u06cc\u062e\u0686\u0627\u0644\",\"qty\":1,\"price\":450000}]`.\n   Send only the columns whose `type` is not `formula`: computed columns are derived\n   server-side and any you send are dropped. `config.max_rows` is a hard limit \u2014 more\n   rows are REJECTED, never silently trimmed.\n - `scalar` \u2014 everything else\n\n**`id` is the key to keep.** It is generated once and never changes \u2014 not when the\nfield is renamed, relabelled, reordered or moved. Key your local copy of a form by\n`id`, never by `name`: a client keyed by name cannot tell a RENAME apart from \"one\nfield deleted, one added\", and those call for opposite actions. `repeat.config.ref`\nand the `fill_flow` sections both reference fields by this same id.\n\n`pages` describes what each field's `page` points at, and is never empty.\n\n`fill_flow` is present only for `image_overlay` forms (null otherwise) and says\nwhich of the two presentations the owner chose: `document` draws fields at absolute\ncoordinates on a page bitmap, while `guided` turns them into ordered question cards\n\u2014 with `doc` saying whether the document is shown alongside. Only `guided` is\nreasonable to reproduce outside our own renderer.\n\nScope required: `forms:read`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"form\": { \"slug\": \"frm-e7465df28dd45785\", \"title\": \"\u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0647\u0645\u06a9\u0627\u0631\u06cc\", \"version\": 12 },\n    \"pages\": [\n      { \"id\": \"page_a1b2c3d4e5f60718\", \"title\": \"\u0645\u0634\u062e\u0635\u0627\u062a \u0641\u0631\u062f\u06cc\", \"description\": null,\n        \"sort_order\": 0, \"visibility_condition\": null }\n    ],\n    \"fill_flow\": null,\n    \"fields\": [\n      {\n        \"id\": \"fld_9a3f1c72e4b58d06\",\n        \"name\": \"full_name\",\n        \"type\": \"text\",\n        \"label\": \"\u0646\u0627\u0645 \u0648 \u0646\u0627\u0645 \u062e\u0627\u0646\u0648\u0627\u062f\u06af\u06cc\",\n        \"required\": true,\n        \"is_input\": true,\n        \"supported\": true,\n        \"value_format\": \"scalar\",\n        \"page\": \"page_a1b2c3d4e5f60718\",\n        \"help_text\": null,\n        \"placeholder\": null,\n        \"default_value\": null,\n        \"options\": null,\n        \"config\": {},\n        \"has_visibility_condition\": false,\n        \"visibility_condition\": null,\n        \"is_formula\": false,\n        \"formula\": null,\n        \"validations\": [],\n        \"sort_order\": 0\n      }\n    ]\n  }\n}",
                            "name": "An online form with one text field"
                        }
                    ]
                },
                {
                    "name": "Verify a query field (Shahkar \/ legal entity)",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/forms\/:slug\/verify-field",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/forms\/:slug\/verify-field",
                            "variable": [
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "architecto",
                                    "description": "The form's public slug."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"field\":\"architecto\",\"values\":{\"mobile\":\"09121234567\",\"national_code\":\"0010350829\"}}"
                        },
                        "description": "Runs the SAME server-side verification the web renderer's \u00ab\u0627\u0633\u062a\u0639\u0644\u0627\u0645\u00bb buttons run, and\nwrites the same server-side binding that `POST \/forms\/{slug}\/submissions` checks \u2014 echo\nthe returned `value` back inside `data.{field}` when you submit, FROM THE SAME IP.\n\nThe form OWNER's daily Shahkar quota pays for the lookup (identical to web). Sandbox\ntokens short-circuit to `matched=true` without any provider call.\n\nEvery lookup (Shahkar, civil, postal, legal entity, and the company \/ owner inquiries:\n`query_company_iban`, `query_sayad_cheque` with the form owner as holder) counts against the\nform's hourly lookup ceiling, shared with the public form page. Past it the answer is `429`\nwith code `inquiry_rate_limited`; retry later. Sandbox lookups are not counted.\n\nEvery lookup is billed to the form owner and counts against the owner's daily inquiry\nallowance; past it the answer is `422` `verify_failed` (\u00ab\u0633\u0642\u0641\u0650 \u0627\u0645\u0631\u0648\u0632\u0650 \u0627\u0633\u062a\u0639\u0644\u0627\u0645\u0650 \u0641\u0631\u0645\u200c\u0647\u0627\u06cc \u0634\u0645\u0627 \u067e\u0631 \u0634\u062f\u0647 \u0627\u0633\u062a\u00bb).\n\nAn inquiry ABOUT A PERSON (`query_guild_licence`, `query_iban_owner`, `query_military_service`,\n`query_sana`, `query_card_owner`, `query_bounced_cheques`, and `query_sayad_cheque` with the\nfiller as holder \u2014 its schema `value_format` is `form_page_only`) runs only on the form page,\nwith that person's own confirmation: the answer is `409` with code `inquiry_requires_form_page`\nand `meta.public_url`. Send the respondent there.\n\nScope required: `forms:write`."
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Meta \u2014 health, identity, quota, cost",
            "description": "",
            "item": [
                {
                    "name": "Health check",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/health",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/health"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Liveness + shallow dependency probe. **No authentication required.**\nReturns 200 when every dependency answers, 503 when one does not.\n\n\u2500\u2500 \ud83e\ude78 \u0686\u0631\u0627 \u0627\u06cc\u0646 \u0645\u062a\u062f \u0639\u0648\u0636 \u0634\u062f (\u06f1\u06f4\u06f0\u06f5\/\u06f0\u06f6\/\u06f0\u06f9) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n\u062a\u0627 \u0627\u0645\u0631\u0648\u0632 \u0627\u06cc\u0646 \u06a9\u0646\u062a\u0631\u0644\u0631 \u06f3\u06f6 \u062e\u0637 \u0628\u0648\u062f \u0648 **\u0647\u0645\u06cc\u0634\u0647 \u06f2\u06f0\u06f0** \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f\u060c \u0628\u062f\u0648\u0646\u0650 \u06cc\u06a9 \u062a\u0645\u0627\u0633 \u0628\u0627 \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633\u060c\n\u0631\u062f\u06cc\u0633 \u06cc\u0627 \u0635\u0641. \u067e\u0627\u0633\u062e\u0650 \u0632\u0646\u062f\u0647\u0654 \u062f\u06cc\u0631\u0648\u0632:\n\n    {\"status\":\"ok\",\"time\":\"2026-08-30T20:43:08.244Z\",\"version\":\"v1.0.0\"}\n\n\u06cc\u0639\u0646\u06cc \u062a\u0646\u0647\u0627 \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u062b\u0627\u0628\u062a \u0645\u06cc\u200c\u06a9\u0631\u062f \u0627\u06cc\u0646 \u0628\u0648\u062f \u06a9\u0647 php-fpm \u0632\u0646\u062f\u0647 \u0627\u0633\u062a \u0648 \u0645\u0633\u06cc\u0631\u06cc\u0627\u0628\u06cc \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06af\u0631\n\u067e\u0633\u062a\u06af\u0631\u0633 \u0645\u06cc\u200c\u062e\u0648\u0627\u0628\u06cc\u062f\u060c \u0627\u06cc\u0646 endpoint \u0647\u0645\u0686\u0646\u0627\u0646 `\"status\":\"ok\"` \u0645\u06cc\u200c\u06af\u0641\u062a \u2014 \u0648 \u0627\u0648\u0644\u06cc\u0646 \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u06cc\u06a9\n\u0645\u0634\u062a\u0631\u06cc\u0650 \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647\u200c\u0633\u0627\u0632 \u0628\u0647 \u0622\u0646 \u0648\u0635\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f \u0647\u0645\u06cc\u0646 \u0627\u0633\u062a. \u06cc\u06a9 probe\u0650 \u0633\u0644\u0627\u0645\u062a\u06cc \u06a9\u0647 \u0646\u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0646\u0627\u0633\u0627\u0644\u0645\n\u0628\u06af\u0648\u06cc\u062f\u060c \u0627\u0632 \u0646\u062f\u0627\u0634\u062a\u0646\u0634 \u0628\u062f\u062a\u0631 \u0627\u0633\u062a\u060c \u0686\u0648\u0646 \u06a9\u0633\u06cc \u0628\u0647 \u0622\u0646 \u062a\u06a9\u06cc\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f.\n\n\u2500\u2500 \u0622\u0646\u0686\u0647 \u0627\u06cc\u0646 \u0639\u0645\u062f\u0627\u064b **\u0646\u0645\u06cc\u200c\u0633\u0646\u062c\u062f** \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n\u0633\u0644\u0627\u0645\u062a\u0650 \u0639\u0645\u06cc\u0642 (\u067e\u0646\u062f\u0627\u0631\u060c \u062c\u06cc\u0628\u06cc\u062a\u060c \u06a9\u0627\u0648\u0647\u200c\u0646\u06af\u0627\u0631\u060c \u0641\u0636\u0627\u06cc \u062f\u06cc\u0633\u06a9) \u0627\u06cc\u0646\u200c\u062c\u0627 \u0646\u06cc\u0633\u062a. \u0622\u0646 \u0646\u06cc\u0627\u0632\u0650 \u06cc\u06a9 \u0645\u0633\u06cc\u0631\u0650\n**\u0627\u062d\u0631\u0627\u0632\u0634\u062f\u0647\u0654** \u062c\u062f\u0627 \u0627\u0633\u062a\u060c \u0648 \u0627\u0641\u0632\u0648\u062f\u0646\u0650 \u0645\u0633\u06cc\u0631 \u06cc\u0639\u0646\u06cc \u0646\u0648\u0634\u062a\u0646 \u062f\u0631 `routes\/api.php` \u06a9\u0647 \u0645\u0627\u0644\u06a9\u06cc\u062a\u0650\n\u0628\u0633\u062a\u0647\u0654 \u06f2 \u0627\u0633\u062a. \u062a\u0627 \u0622\u0646\u200c\u0648\u0642\u062a\u060c \u067e\u0627\u0633\u062e\u0650 \u0627\u06cc\u0646\u200c\u062c\u0627 \u0635\u0631\u06cc\u062d\u0627\u064b \u0645\u06cc\u200c\u06af\u0648\u06cc\u062f \u0686\u0647 \u0686\u06cc\u0632\u06cc \u0631\u0627 \u067e\u0648\u0634\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f\n(`\"scope\":\"shallow\"`) \u062a\u0627 \u06a9\u0633\u06cc \u0622\u0646 \u0631\u0627 \u0639\u0645\u06cc\u0642\u200c\u062a\u0631 \u0627\u0632 \u0622\u0646\u0686\u0647 \u0647\u0633\u062a \u0646\u062e\u0648\u0627\u0646\u062f.",
                        "auth": {
                            "type": "noauth"
                        }
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"status\": \"ok\",\n  \"time\": \"2026-05-11T11:53:29.399Z\",\n  \"version\": \"v1.0.0\",\n  \"scope\": \"shallow\",\n  \"checks\": {\"database\": \"ok\", \"cache\": \"ok\", \"queue\": \"ok\"}\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 503,
                            "body": "{\n  \"status\": \"degraded\",\n  \"time\": \"2026-05-11T11:53:29.399Z\",\n  \"version\": \"v1.0.0\",\n  \"scope\": \"shallow\",\n  \"checks\": {\"database\": \"fail\", \"cache\": \"ok\", \"queue\": \"unknown\"}\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Caller identity",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/me",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/me"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns information about the authenticated token, its owner user, and\nthe billing context (wallet balance, org root). Any valid token can call this \u2014\nno specific scope required.\n\nUse the `token.mode` field to confirm whether your token is in **live** mode\n(charges your wallet, real KYC\/SMS) or **test** sandbox mode (zero wallet\nimpact, mocked side effects). `wallet_balance` is always in tomans (IRR\/10).\n\n\ud83e\ude78 You do not have to call this endpoint to find out. **Every** authenticated API\nresponse carries `X-Emza-Mode: live|test`, including error envelopes \u2014 so an\nintegration can assert on it continuously rather than checking once at setup.\nThat header was added on 1405\/06\/10 after a live site ran for seven hours on a\nsandbox token: every response was a 200, every contract was mocked, no SMS reached\nany signer, and nothing on the wire said so."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"token\": {\n      \"id\": \"42\",\n      \"name\": \"production-server-2026\",\n      \"mode\": \"live\",\n      \"scopes\": [\"contracts:read\", \"contracts:write\", \"webhooks:manage\"],\n      \"ip_whitelist\": [\"203.0.113.5\/32\"],\n      \"expires_at\": \"2027-01-01T00:00:00.000Z\",\n      \"last_used_at\": \"2026-05-13T18:00:42.000Z\"\n    },\n    \"user\": {\n      \"id\": 1234,\n      \"name\": \"\u0622\u0631\u0634 \u0628\u0646\u0627\u0626\u06cc\u0627\u0646 \u0686\u0645\u0644\u0647\",\n      \"type\": \"personal\",\n      \"is_org_root\": false,\n      \"org_root_id\": null\n    },\n    \"billing_actor_user_id\": 1234,\n    \"wallet_balance\": 849310\n  }\n}",
                            "name": "Live token"
                        },
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"token\": {\n      \"id\": \"13\",\n      \"name\": \"ci-tests-sandbox\",\n      \"mode\": \"test\",\n      \"scopes\": [\"*\"],\n      \"ip_whitelist\": [],\n      \"expires_at\": null,\n      \"last_used_at\": \"2026-05-13T17:52:23.000Z\"\n    },\n    \"user\": {\n      \"id\": 1234,\n      \"name\": \"\u0622\u0631\u0634 \u0628\u0646\u0627\u0626\u06cc\u0627\u0646 \u0686\u0645\u0644\u0647\",\n      \"type\": \"personal\",\n      \"is_org_root\": false,\n      \"org_root_id\": null\n    },\n    \"billing_actor_user_id\": 1234,\n    \"wallet_balance\": 849310\n  }\n}",
                            "name": "Sandbox\/test token"
                        }
                    ]
                },
                {
                    "name": "Current quota",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/quota",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/quota"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns the caller's current-month signature quota usage + remaining,\npackage tier, and today's Shahkar verification credits.\n\n**Quota semantics:**\n- `free_quota` is the per-period allowance from the user's active package\n  (Free=3 lifetime, Bronze=100\/mo, Silver=300\/mo, Gold=600\/mo \u2014 verify against\n  live `\/admin\/packages`, these are the 2026-06 tariff). Returns 0 if the package\n  is expired or unset.\n- `used`\/`remaining` may be FRACTIONAL: additional signers on one contract count\n  as half a unit each (a 2-signer contract consumes 1.5). Whole values serialize\n  as integers; a half consumes serializes as e.g. `1.5`.\n- `used` is total signature-units recorded since `package_started_at` (so\n  pre-purchase usage doesn't deplete a freshly-bought plan). Free tier counts\n  lifetime (no monthly reset).\n- `remaining = free_quota - used` for limited plans. **null** means\n  genuinely unlimited (`signature_limit` IS NULL).\n- When `remaining` reaches 0, signatures still work \u2014 billed as overage from the\n  wallet at `base \u00d7 (1 \u2212 overage_discount)`; the OVERAGE discount is\n  Free=0%, Bronze=5%, Silver=15%, Gold=25% (separate from, and smaller than, the\n  10\/20\/30% in-package discount encoded in the package price).\n\n**Shahkar credits** are separate from signature quota. Daily allowance\nby package (Free=3, Bronze=5, Silver=10, Gold=20). Once exhausted, the\nclient must purchase batch top-ups before further Shahkar verifications.\n\nScope required: `contracts:read`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"service\": \"electronic_signature\",\n    \"period_start\": \"2026-05-01T00:00:00.000Z\",\n    \"period_end\": \"2026-05-31T23:59:59.999Z\",\n    \"package\": { \"slug\": \"bronze\", \"name\": \"\u0628\u0631\u0646\u0632\u06cc\" },\n    \"free_quota\": 30,\n    \"used\": 17,\n    \"remaining\": 13,\n    \"shahkar\": {\n      \"free_limit\": 5,\n      \"used_today\": 2,\n      \"free_remaining\": 3,\n      \"extra_credits\": 0,\n      \"extra_remaining\": 0,\n      \"allowed\": true\n    }\n  }\n}",
                            "name": "Bronze user mid-month"
                        },
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"service\": \"electronic_signature\",\n    \"period_start\": \"2026-05-01T00:00:00.000Z\",\n    \"period_end\": \"2026-05-31T23:59:59.999Z\",\n    \"package\": { \"slug\": \"gold\", \"name\": \"\u0637\u0644\u0627\u06cc\u06cc\" },\n    \"free_quota\": 0,\n    \"used\": 412,\n    \"remaining\": null,\n    \"shahkar\": {\n      \"free_limit\": 20, \"used_today\": 4,\n      \"free_remaining\": 16, \"extra_credits\": 0,\n      \"extra_remaining\": 0, \"allowed\": true\n    }\n  }\n}",
                            "name": "Gold (unlimited)"
                        },
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"service\": \"electronic_signature\",\n    \"period_start\": \"2026-05-01T00:00:00.000Z\",\n    \"period_end\": \"2026-05-31T23:59:59.999Z\",\n    \"package\": null,\n    \"free_quota\": 0,\n    \"used\": 0,\n    \"remaining\": 0,\n    \"shahkar\": {\n      \"free_limit\": 0, \"used_today\": 0,\n      \"free_remaining\": 0, \"extra_credits\": 0,\n      \"extra_remaining\": 0, \"allowed\": false\n    }\n  }\n}",
                            "name": "No active package (pay-per-use)"
                        }
                    ]
                },
                {
                    "name": "Cost estimate",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/cost-estimate",
                            "query": [
                                {
                                    "key": "signers",
                                    "value": "3",
                                    "description": "Number of NEW signers in this send (1-20).",
                                    "disabled": false
                                },
                                {
                                    "key": "discount_code",
                                    "value": "WELCOME10",
                                    "description": "Optional discount code \u2014 the one you will pass to `POST \/contracts`.",
                                    "disabled": false
                                },
                                {
                                    "key": "signature_method",
                                    "value": "electronic",
                                    "description": "`electronic` (default) or `digital`.",
                                    "disabled": false
                                },
                                {
                                    "key": "is_private",
                                    "value": "false",
                                    "description": "A private contract is paid from the caller's own wallet only, never the organisation's: `true`\/`false`\/`1`\/`0`.",
                                    "disabled": false
                                },
                                {
                                    "key": "payer_mode",
                                    "value": "creator",
                                    "description": "Who pays: `creator` (default), `signer` (split among all signers) or `designated` (split among `payers` of them).",
                                    "disabled": false
                                },
                                {
                                    "key": "payers",
                                    "value": "1",
                                    "description": "Only with `payer_mode=designated`: how many of the signers pay (1..signers).",
                                    "disabled": false
                                },
                                {
                                    "key": "creator_is_signer",
                                    "value": "false",
                                    "description": "You are one of the `signers` yourself (your own row will carry `is_creator` on `POST \/contracts\/{code}\/signers`): `true`\/`false`\/`1`\/`0`. It changes the figure only when the cost is shared: with `payer_mode=signer` you then pay your own share in full at send, plus the reserve for the others. The figure assumes your own row is the FIRST of the paying rows you send; elsewhere in the list it can differ by the rounding remainder (at most `payers \u2212 1` toman).",
                                    "disabled": false
                                },
                                {
                                    "key": "creator_pays",
                                    "value": "false",
                                    "description": "With `creator_is_signer=true` and `payer_mode=designated`: your own row is one of the `payers` (`is_payer`); at least one payer must be someone else. In the other modes it only states what is already true (`signer`: every signer pays, you included \u2014 `false` is refused; `creator`: you pay everything).",
                                    "disabled": false
                                },
                                {
                                    "key": "contract",
                                    "value": "ABCD1234EFGH5678",
                                    "description": "A draft contract YOU created (16-char code): its current signers are counted as existing (extra signers are priced as such), and its signature method, privacy and payer mode are used. An explicit parameter that contradicts the contract \u21d2 422 `estimate_contract_mismatch`; someone else's or unknown \u21d2 404.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/cost-estimate?signers=3&discount_code=WELCOME10&signature_method=electronic&is_private=false&payer_mode=creator&payers=1&creator_is_signer=false&creator_pays=false&contract=ABCD1234EFGH5678"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "What sending a contract to N signers will debit, computed by the same engine the send uses\n(`SendCost` \u2014 the charge's own price function and wallet decision), without committing anything.\nUse it before `POST \/contracts` or `POST \/contracts\/{code}\/signers`.\n\nScope required: `contracts:read`.\n\n**The old shape is unchanged.** Called with only `signers` (and optionally `discount_code`) the\nresponse is exactly what it always was: an electronic signature, the caller's own wallet, no\nprivacy. Passing any of `signature_method`, `is_private`, `payer_mode`, `payers` or `contract`\nadds `service_type`, `payer_mode`, `existing_signers`, `share` and `payment_plan`.\n\n**`payment_plan.can_cover` is the truthful \u00abwill this send go through\u00bb.** `sufficient_balance`\nkeeps its old meaning \u2014 the caller's OWN wallet against `total_cost` \u2014 so a member of an\norganisation whose send the organisation wallet pays reads `sufficient_balance: false` and\n`payment_plan: {source: \"parent_wallet\", can_cover: true}`. The organisation wallet's balance is\nnever returned.\n\n**`total_cost` is what leaves a wallet at send time.** In `payer_mode=creator` it is the creator's\ncharge (free quota applied). In `signer` \/ `designated` it is the creator's commitment \u2014 the\nadvance the creator puts down for the other signers' shares (quota is not used in these modes,\nso the quota\/tariff keys are null); the split is in `share`.\n\n**Discount codes.** The send applies the code stored on the contract \u2014 the one given as\n`discount_code` to `POST \/contracts` (or typed in the panel). With `contract` the estimate reads\nthat code itself, so it is the amount that will be charged. Without `contract`, `discount_code`\nprices a send for a contract you would create with that code; here an unusable code is not an\nerror \u2014 it simply gives `discount_amount: 0` \u2014 whereas `POST \/contracts` rejects it."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"data\":{\"tariff_cost\":55000,\"quota_used\":0,\"billable_units\":1,\"overage_cost\":55000,\"discount_amount\":0,\"tax_amount\":5500,\"total_cost\":60500,\"currency\":\"IRT\",\"discount_code\":null,\"package\":null,\"wallet_balance\":20000,\"wallet_balance_after\":0,\"sufficient_balance\":false,\"service_type\":\"electronic_signature\",\"payer_mode\":\"creator\",\"existing_signers\":0,\"share\":null,\"payment_plan\":{\"source\":\"parent_wallet\",\"can_cover\":true,\"blocked_reason\":null,\"message_fa\":\"\u0645\u0648\u062c\u0648\u062f\u06cc \u0634\u0645\u0627 \u06a9\u0627\u0641\u06cc \u0646\u06cc\u0633\u062a \u2014 \u0647\u0632\u06cc\u0646\u0647 \u0627\u0632 \u06a9\u06cc\u0641\u0650 \u0633\u0627\u0632\u0645\u0627\u0646 \u067e\u0631\u062f\u0627\u062e\u062a \u062e\u0648\u0627\u0647\u062f \u0634\u062f.\"}}}",
                            "name": "extended (any new parameter)"
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\"type\":\"https:\/\/docs.elemza.com\/errors\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\u0642\u0631\u0627\u0631\u062f\u0627\u062f \u06cc\u0627\u0641\u062a \u0646\u0634\u062f\",\"title_en\":\"Contract not found\",\"request_id\":\"01J...\"}",
                            "name": "contract not yours \/ unknown"
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\"type\":\"https:\/\/docs.elemza.com\/errors\/estimate_contract_mismatch\",\"status\":422,\"code\":\"estimate_contract_mismatch\",\"title_fa\":\"\u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0650 \u0627\u0631\u0633\u0627\u0644\u06cc \u0628\u0627 \u062e\u0648\u062f\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0646\u0645\u06cc\u200c\u062e\u0648\u0627\u0646\u062f\",\"title_en\":\"A parameter contradicts the contract\",\"errors\":[{\"field\":\"signature_method\",\"code\":\"mismatch\",\"title_fa\":\"\u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f digital \u0627\u0633\u062a\",\"title_en\":\"This contract is digital\"}],\"request_id\":\"01J...\"}",
                            "name": "parameter contradicts the contract"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Signers",
            "description": "\nSigner endpoints for a contract.\n\nPhase 1 = read-only (index + show). Resend + delete = Phase 2 (mutations).\n\nSpec: docs\/api-master-plan\/02-endpoint-surface.md (Signer endpoints).",
            "item": [
                {
                    "name": "List signers",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/signers",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/signers",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char contract code."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Lists all signers on a contract. PII (mobile, national_code) is masked\nunless the caller's token has `signers:read_pii` scope.\n\nScope: `contracts:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG92AFXQAXH954QHS42A6"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG92AFXQAXH954QHS42A6\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get signer",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/signers\/:slug",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/signers\/:slug",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char contract code."
                                },
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "DEF456GHJ789KLM",
                                    "description": "Per-signer slug."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Detailed view of a single signer. PII masked unless token has `signers:read_pii`.\n\nScope: `contracts:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG92KFSNW8561ASM220XZ"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG92KFSNW8561ASM220XZ\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Add signers",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/signers",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/signers",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char contract code."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"signers\":[\"architecto\"],\"on_company_warning\":\"refuse\"}"
                        },
                        "description": "Adds one or more signers to a draft contract. Runs **mandatory** Shahkar\npre-validation (mobile \u2194 national_code match) per signer in production.\nOn success, contract transitions to `waiting_signature` and SMS dispatch\njobs are queued for first-order signers.\n\n**The contract must have its document first.** A contract created as JSON without `file`\/`source` (the\nmulti-step flow) has none until `POST \/contracts\/{code}\/files`; adding signers to it is 422\n`document_required` \u2014 no signer is added, nothing is charged, nobody is texted, and the contract stays a\n`draft` (`meta.reason: no_document`). A document that could not be processed (`GET \/contracts\/{code}\/processing`\nanswers `step=error`) is no document either (`meta.reason: document_failed`): upload a corrected file with\n`POST \/contracts\/{code}\/files`. **Add signers once the document is ready:** after the upload, wait until\n`GET \/contracts\/{code}\/processing` answers `ready=true` (or the `contract.processing.completed` webhook) \u2014 the\nsigning SMS does not wait for the pages, so a signer reached earlier can open a page that is not ready yet. To\nskip the wait, send the signers inline with the file in one `POST \/contracts`. A `template_id` gives a contract\nsignature boxes, not a document. Like every 4xx this answer is stored under your `Idempotency-Key`: attach the\ndocument, then send the signers with a new key.\n\nA contract created with `signing_deadline_at` is re-checked here against the CURRENT time: if the deadline\nhas passed or is less than an hour away this is 422 `signing_deadline_passed` \u2014 no signer is added, charged\nor texted.\n\nAn attached document \u2014 an amendment or a rescission of a completed contract (`parent_contract` set) \u2014 takes no\nsigners here, in any status: its signers are the original contract's parties, fixed when it is made. 409\n`attached_document_signers_fixed`, before any other check; nothing is added, charged or texted.\n\nAn electronic replacement of a digital contract (`POST \/contracts` with `replaces`; its `replaces` is set) takes\nno signers here while it is a draft: its roster is the replaced contract's, copied by the system once the\ndocument is processed \u2014 409 `replacement_signers_pending`; nothing is added, charged or texted. Once the roster\nhas arrived the contract is waiting for signatures and, like any such contract, takes no new batch.\n\nA digital contract created with `signer_mode` checks this batch against it: `solo` takes exactly one signer,\n`multi` at least two \u2014 otherwise 422 `signer_mode_mismatch`, before any identity check, charge or row.\n\nWhen the identity registry itself does not answer (an outage \u2014 nothing is known about the signers), the\nanswer is 503 `identity_service_unavailable` with `Retry-After`: no signer was added and nothing was charged,\nand the same request can simply be sent again. 422 `shahkar_mismatch` is only for an answer that says the\nmobile and the national code do not belong together.\n\nWhen your account's DAILY identity-inquiry quota is used up (each mismatch the registry answers counts against\nit), nobody is asked and the answer is 429 `identity_inquiry_quota_exhausted` with `Retry-After` (seconds until\nthe quota opens at the start of the next day) and `meta.resets_at`: no signer was added and nothing was charged.\nIt says nothing about the signers' data. Like every 429 it is not stored under your `Idempotency-Key` \u2014 send the\nsame request again after the reset, or sooner once an inquiry batch is bought in the panel (`GET \/quota` \u2192\n`shahkar.allowed`). An account whose daily allowance is ZERO (every day starts used up) gets no promise of a reset: 403\n`identity_inquiry_quota_exhausted` with `meta.resets: false` and no `Retry-After` \u2014 buy an inquiry batch in the panel,\nthen send the same request again (it is not stored under your `Idempotency-Key`).\n\nScope: `signers:write`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 403,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/identity_inquiry_quota_exhausted\",\n  \"status\": 403,\n  \"code\": \"identity_inquiry_quota_exhausted\",\n  \"title_fa\": \"\u062d\u0633\u0627\u0628\u0650 \u0634\u0645\u0627 \u0633\u0647\u0645\u06cc\u0647\u0654 \u0631\u0627\u06cc\u06af\u0627\u0646\u0650 \u0631\u0648\u0632\u0627\u0646\u0647 \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0639\u0644\u0627\u0645\u0650 \u0647\u0648\u06cc\u062a \u0646\u062f\u0627\u0631\u062f\u060c \u067e\u0633 \u0647\u0648\u06cc\u062a\u0650 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u0627\u0633\u062a\u0639\u0644\u0627\u0645 \u0646\u0634\u062f \u2014 \u0627\u06cc\u0646 \u067e\u0627\u0633\u062e \u062f\u0631\u0628\u0627\u0631\u0647\u0654 \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u0650 \u0622\u0646\u200c\u0647\u0627 \u0646\u06cc\u0633\u062a. \u0647\u06cc\u0686 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u0647\u200c\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u0646\u0634\u062f \u0648 \u0647\u0632\u06cc\u0646\u0647\u200c\u0627\u06cc \u06a9\u0633\u0631 \u0646\u0634\u062f. \u0627\u06cc\u0646 \u0633\u0642\u0641 \u0628\u0627 \u06af\u0630\u0634\u062a\u0650 \u0631\u0648\u0632 \u0628\u0627\u0632 \u0646\u0645\u06cc\u200c\u0634\u0648\u062f\u061b \u062f\u0631 \u067e\u0646\u0644\u060c \u062f\u0631 \u0635\u0641\u062d\u0647\u0654 \u0633\u0627\u062e\u062a\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u060c \u0628\u0633\u062a\u0647\u0654 \u0627\u0633\u062a\u0639\u0644\u0627\u0645\u0650 \u0627\u0636\u0627\u0641\u0647 \u0628\u062e\u0631\u06cc\u062f \u0648 \u0633\u067e\u0633 \u0647\u0645\u06cc\u0646 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0631\u0627 \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0641\u0631\u0633\u062a\u06cc\u062f.\",\n  \"title_en\": \"Your account has no daily identity-inquiry allowance, so the signers' identities were not checked \u2014 this says nothing about their data. No signer was added and nothing was charged. Waiting will not open it: buy an inquiry batch in the panel, then send the same request again.\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\",\n  \"meta\": {\"resets\": false}\n}",
                            "name": "your account has NO daily identity-inquiry allowance (every day starts used up) \u2014 nobody asked, nothing added or charged; no Retry-After: buy an inquiry batch in the panel, then send the same request again"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/replacement_signers_pending\",\n  \"status\": 409,\n  \"code\": \"replacement_signers_pending\",\n  \"title_fa\": \"\u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0646\u0633\u062e\u0647\u0654 \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9\u0650 \u06cc\u06a9 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u0650 \u062f\u06cc\u062c\u06cc\u062a\u0627\u0644 \u0627\u0633\u062a \u0648 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646\u0634 \u0647\u0645\u0627\u0646 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u0650 \u0642\u0628\u0644\u06cc\u200c\u0627\u0646\u062f \u06a9\u0647 \u0633\u0627\u0645\u0627\u0646\u0647 \u067e\u0633 \u0627\u0632 \u067e\u0631\u062f\u0627\u0632\u0634\u0650 \u0633\u0646\u062f \u062e\u0648\u062f\u0634 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f\u061b \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u0647\u200c\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u0646\u0634\u062f. \u0635\u0628\u0631 \u06a9\u0646\u06cc\u062f \u062a\u0627 GET \/contracts\/{code}\/processing \u0622\u0645\u0627\u062f\u0647\u200c\u0628\u0648\u062f\u0646 \u0631\u0627 \u0628\u06af\u0648\u06cc\u062f.\",\n  \"title_en\": \"This contract is the electronic replacement of a digital one; its signers are the replaced contract's, added by the system once the document is processed, so no signer was added. Wait for GET \/contracts\/{code}\/processing to say ready.\"\n}",
                            "name": "an electronic replacement (`replaces` set) whose roster the system is still copying \u2014 nothing added, charged or texted"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/attached_document_signers_fixed\",\n  \"status\": 409,\n  \"code\": \"attached_document_signers_fixed\",\n  \"title_fa\": \"\u0627\u06cc\u0646 \u0633\u0646\u062f \u067e\u06cc\u0648\u0633\u062a\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u0650 \u062f\u06cc\u06af\u0631\u06cc \u0627\u0633\u062a (\u0627\u0644\u062d\u0627\u0642\u06cc\u0647 \u06cc\u0627 \u0627\u0642\u0627\u0644\u0647\u200c\u0646\u0627\u0645\u0647)\u061b \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646\u0634 \u0647\u0645\u0627\u0646 \u0637\u0631\u0641\u06cc\u0646\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u0650 \u0627\u0635\u0644\u06cc\u200c\u0627\u0646\u062f \u0648 \u0647\u0646\u06af\u0627\u0645\u0650 \u0633\u0627\u062e\u062a\u0650 \u0633\u0646\u062f \u062a\u0639\u06cc\u06cc\u0646 \u0634\u062f\u0647\u200c\u0627\u0646\u062f\u060c \u067e\u0633 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u0647\u200c\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u0646\u0634\u062f.\",\n  \"title_en\": \"This is an attached document (an amendment or a rescission) of another contract; its signers are the parties of the original contract, fixed when it was made, so no signer was added.\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\"\n}",
                            "name": "an attached document (an amendment or a rescission of a completed contract) \u2014 its signers are fixed; nothing added, charged or texted"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/wrong_contract_status\",\n  \"status\": 409,\n  \"code\": \"wrong_contract_status\",\n  \"title_fa\": \"\u0641\u0642\u0637 \u0631\u0648\u06cc \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u062f\u0631 \u0648\u0636\u0639\u06cc\u062a \u067e\u06cc\u0634\u200c\u0646\u0648\u06cc\u0633 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u0647 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\",\n  \"title_en\": \"Only draft contracts accept new signers\"\n}",
                            "name": "the contract is no longer a draft \u2014 signers were already added (waiting for signatures) or it has ended; also the loser of two batches sent at the same moment \u2014 nothing added, charged or texted"
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/document_required\",\n  \"status\": 422,\n  \"code\": \"document_required\",\n  \"title_fa\": \"\u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0647\u0646\u0648\u0632 \u0633\u0646\u062f\u06cc \u0646\u062f\u0627\u0631\u062f\u061b \u0627\u0628\u062a\u062f\u0627 \u0641\u0627\u06cc\u0644\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0631\u0627 \u067e\u06cc\u0648\u0633\u062a \u06a9\u0646\u06cc\u062f \u2014 \u0628\u0627 \u0641\u06cc\u0644\u062f\u0650 file (multipart) \u062f\u0631 \u0647\u0645\u0627\u0646 POST \/contracts\u060c \u06cc\u0627 \u0628\u0627 POST \/contracts\/{code}\/files \u2014 \u0648 \u0648\u0642\u062a\u06cc GET \/contracts\/{code}\/processing \u0622\u0645\u0627\u062f\u0647\u200c\u0628\u0648\u062f\u0646 (ready) \u0631\u0627 \u06af\u0641\u062a\u060c \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f\u061b \u06cc\u0627 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u0631\u0627 \u0647\u0645\u0631\u0627\u0647\u0650 \u0641\u0627\u06cc\u0644 \u062f\u0631 \u0647\u0645\u0627\u0646 POST \/contracts \u0628\u0641\u0631\u0633\u062a\u06cc\u062f. \u0647\u06cc\u0686 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u0647\u200c\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u0646\u0634\u062f\u060c \u067e\u06cc\u0627\u0645\u06a9\u06cc \u0646\u0631\u0641\u062a \u0648 \u0647\u0632\u06cc\u0646\u0647\u200c\u0627\u06cc \u06a9\u0633\u0631 \u0646\u0634\u062f.\",\n  \"title_en\": \"This contract has no document yet. Attach it \u2014 the multipart `file` field of POST \/contracts, or POST \/contracts\/{code}\/files \u2014 and add the signers once GET \/contracts\/{code}\/processing says ready; or send the signers inline with the file in one POST \/contracts. No signer was added, nothing was charged and nobody was texted.\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\",\n  \"meta\": {\"reason\": \"no_document\", \"contract_status\": \"draft\", \"files\": \"https:\/\/elemza.com\/api\/v1\/contracts\/ABCD1234EFGH5678\/files\"}\n}",
                            "name": "the contract has no document yet (created as JSON without file or source) \u2014 nothing added, charged or texted; the contract stays draft"
                        },
                        {
                            "header": [],
                            "code": 429,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/identity_inquiry_quota_exhausted\",\n  \"status\": 429,\n  \"code\": \"identity_inquiry_quota_exhausted\",\n  \"title_fa\": \"\u0633\u0642\u0641\u0650 \u0631\u0648\u0632\u0627\u0646\u0647\u0654 \u0627\u0633\u062a\u0639\u0644\u0627\u0645\u0650 \u0647\u0648\u06cc\u062a\u0650 \u062d\u0633\u0627\u0628\u0650 \u0634\u0645\u0627 \u067e\u0631 \u0634\u062f\u0647 \u0627\u0633\u062a\u060c \u067e\u0633 \u0647\u0648\u06cc\u062a\u0650 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u0627\u0633\u062a\u0639\u0644\u0627\u0645 \u0646\u0634\u062f \u2014 \u0627\u06cc\u0646 \u067e\u0627\u0633\u062e \u062f\u0631\u0628\u0627\u0631\u0647\u0654 \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u0650 \u0622\u0646\u200c\u0647\u0627 \u0646\u06cc\u0633\u062a. \u0647\u06cc\u0686 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u0647\u200c\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u0646\u0634\u062f \u0648 \u0647\u0632\u06cc\u0646\u0647\u200c\u0627\u06cc \u06a9\u0633\u0631 \u0646\u0634\u062f. \u0633\u0642\u0641 \u062f\u0631 \u0622\u063a\u0627\u0632\u0650 \u0631\u0648\u0632\u0650 \u0628\u0639\u062f \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0627\u0632 \u0645\u06cc\u200c\u0634\u0648\u062f (\u0632\u0645\u0627\u0646\u0634 \u062f\u0631 Retry-After \u0648 meta.resets_at)\u061b \u06cc\u0627 \u062f\u0631 \u067e\u0646\u0644\u060c \u062f\u0631 \u0635\u0641\u062d\u0647\u0654 \u0633\u0627\u062e\u062a\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u060c \u0628\u0633\u062a\u0647\u0654 \u0627\u0633\u062a\u0639\u0644\u0627\u0645\u0650 \u0627\u0636\u0627\u0641\u0647 \u0628\u062e\u0631\u06cc\u062f. \u0633\u067e\u0633 \u0647\u0645\u06cc\u0646 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0631\u0627 \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0641\u0631\u0633\u062a\u06cc\u062f.\",\n  \"title_en\": \"Your account's daily identity-inquiry quota is used up, so the signers' identities were not checked \u2014 this says nothing about their data. No signer was added and nothing was charged. The quota opens again at the start of the next day (Retry-After, meta.resets_at), or sooner after buying an inquiry batch in the panel; then send the same request again.\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\",\n  \"meta\": {\"retry_after_seconds\": 30512, \"resets_at\": \"2026-11-19T00:00:00+03:30\"}\n}",
                            "name": "your account's daily identity-inquiry quota is used up \u2014 nobody was asked, nothing added or charged; header Retry-After: seconds until the reset"
                        }
                    ]
                },
                {
                    "name": "Resend signing link SMS",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/signers\/:slug\/resend",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/signers\/:slug\/resend",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char contract code."
                                },
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "architecto",
                                    "description": "Per-signer slug."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Re-sends the signing-link SMS to a waiting signer. Rate-limited to 3 per\n5 minutes per signer (returns 429 `rate_limit_exceeded`). Use the same kind of token\n(live\/test) that created the contract, else 409 `sandbox_mode_mismatch` and nothing is sent.\nA contract with no document gets no signing link: 422 `document_required`, nothing sent, no resend spent.\n\nScope: `signers:write`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/document_required\",\n  \"status\": 422,\n  \"code\": \"document_required\",\n  \"title_fa\": \"\u0633\u0646\u062f\u0650 \u0627\u06cc\u0646 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u067e\u0631\u062f\u0627\u0632\u0634 \u0646\u0634\u062f \u0648 \u0628\u062f\u0648\u0646\u0650 \u0633\u0646\u062f \u0628\u0631\u0627\u06cc \u0627\u0645\u0636\u0627 \u0641\u0631\u0633\u062a\u0627\u062f\u0647 \u0646\u0645\u06cc\u200c\u0634\u0648\u062f\u061b \u0641\u0627\u06cc\u0644\u0650 \u062f\u0631\u0633\u062a \u0631\u0627 \u0628\u0627 POST \/contracts\/{code}\/files \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0641\u0631\u0633\u062a\u06cc\u062f \u0648 \u0648\u0642\u062a\u06cc GET \/contracts\/{code}\/processing \u0622\u0645\u0627\u062f\u0647\u200c\u0628\u0648\u062f\u0646 (ready) \u0631\u0627 \u06af\u0641\u062a\u060c \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f. \u0647\u06cc\u0686 \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u0647\u200c\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u0646\u0634\u062f\u060c \u067e\u06cc\u0627\u0645\u06a9\u06cc \u0646\u0631\u0641\u062a \u0648 \u0647\u0632\u06cc\u0646\u0647\u200c\u0627\u06cc \u06a9\u0633\u0631 \u0646\u0634\u062f.\",\n  \"title_en\": \"This contract's document could not be processed, so it has no document. Upload a corrected file with POST \/contracts\/{code}\/files, wait until GET \/contracts\/{code}\/processing says ready, then add the signers. No signer was added, nothing was charged and nobody was texted.\",\n  \"meta\": {\"reason\": \"document_failed\", \"contract_status\": \"waiting_signature\", \"files\": \"https:\/\/elemza.com\/api\/v1\/contracts\/ABCD1234EFGH5678\/files\"}\n}",
                            "name": "the contract has no document (never attached, or it could not be processed) \u2014 no SMS sent, no resend spent"
                        }
                    ]
                },
                {
                    "name": "Remove signer",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/contracts\/:code\/signers\/:slug",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/contracts\/:code\/signers\/:slug",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "architecto",
                                    "description": "16-char contract code."
                                },
                                {
                                    "id": "slug",
                                    "key": "slug",
                                    "value": "architecto",
                                    "description": "Per-signer slug."
                                }
                            ]
                        },
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Removes a signer from a contract. Only allowed when:\n- Signer status is `waiting` (not yet signed)\n- Contract status is `draft` or `waiting_signature`\n- The token is of the same kind (live\/test) that created the contract, else 409\n  `sandbox_mode_mismatch` and nothing is removed\n- The contract is not an attached document (an amendment or a rescission of a completed contract): its\n  signers are the original contract's parties and none can be removed \u2014 409 `attached_document_signers_fixed`;\n  cancel the whole document instead\n- The contract is not an electronic replacement whose copied roster has not arrived yet (a draft with\n  `replaces` set) \u2014 409 `replacement_signers_pending`. After it has arrived, removing works as on any contract.\n\nScope: `signers:write`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 204,
                            "body": "{}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/replacement_signers_pending\",\n  \"status\": 409,\n  \"code\": \"replacement_signers_pending\",\n  \"title_fa\": \"\u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646\u0650 \u0627\u06cc\u0646 \u0646\u0633\u062e\u0647\u0654 \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9 \u0647\u0646\u0648\u0632 \u0627\u0632 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u0650 \u0642\u0628\u0644\u06cc \u0645\u0646\u062a\u0642\u0644 \u0646\u0634\u062f\u0647\u200c\u0627\u0646\u062f\u061b \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u0647\u200c\u0627\u06cc \u062d\u0630\u0641 \u0646\u0634\u062f. \u067e\u0633 \u0627\u0632 \u0622\u0645\u0627\u062f\u0647\u200c\u0634\u062f\u0646\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f \u062f\u0648\u0628\u0627\u0631\u0647 \u0627\u0645\u062a\u062d\u0627\u0646 \u06a9\u0646\u06cc\u062f.\",\n  \"title_en\": \"This replacement's signers have not been copied from the replaced contract yet; no signer was removed. Try again once the contract is ready.\"\n}",
                            "name": "an electronic replacement whose roster the system is still copying \u2014 nothing removed"
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/attached_document_signers_fixed\",\n  \"status\": 409,\n  \"code\": \"attached_document_signers_fixed\",\n  \"title_fa\": \"\u0627\u06cc\u0646 \u0633\u0646\u062f \u067e\u06cc\u0648\u0633\u062a\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u0650 \u062f\u06cc\u06af\u0631\u06cc \u0627\u0633\u062a (\u0627\u0644\u062d\u0627\u0642\u06cc\u0647 \u06cc\u0627 \u0627\u0642\u0627\u0644\u0647\u200c\u0646\u0627\u0645\u0647)\u061b \u0627\u0645\u0636\u0627\u06a9\u0646\u0646\u062f\u06af\u0627\u0646\u0634 \u0647\u0645\u0627\u0646 \u0637\u0631\u0641\u06cc\u0646\u0650 \u0642\u0631\u0627\u0631\u062f\u0627\u062f\u0650 \u0627\u0635\u0644\u06cc\u200c\u0627\u0646\u062f \u0648 \u0647\u06cc\u0686\u200c\u06a9\u062f\u0627\u0645 \u062d\u0630\u0641 \u0646\u0645\u06cc\u200c\u0634\u0648\u062f. \u0627\u06af\u0631 \u0646\u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u062f \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u06cc\u062f\u060c \u06a9\u0644\u0650 \u0633\u0646\u062f \u0631\u0627 \u0644\u063a\u0648 \u06a9\u0646\u06cc\u062f.\",\n  \"title_en\": \"This is an attached document (an amendment or a rescission) of another contract; its signers are the parties of the original contract and none can be removed. Cancel the whole document instead.\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\"\n}",
                            "name": "an attached document (an amendment or a rescission of a completed contract) \u2014 none of its signers can be removed; cancel the whole document instead"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Templates",
            "description": "\nTemplate endpoints \u2014 read-only in v1.0. CRUD lands in v1.x.\n\nSpec: docs\/api-master-plan\/02-endpoint-surface.md (Template endpoints).",
            "item": [
                {
                    "name": "List templates",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/templates",
                            "query": [
                                {
                                    "key": "view_scope",
                                    "value": "architecto",
                                    "description": "self | shared_from_parent | all_org. Default self.",
                                    "disabled": false
                                },
                                {
                                    "key": "active",
                                    "value": "",
                                    "description": "Filter by active status.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "16",
                                    "description": "",
                                    "disabled": false
                                },
                                {
                                    "key": "per_page",
                                    "value": "16",
                                    "description": "Max 100. Default 20.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/templates?view_scope=architecto&active=&page=16&per_page=16"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Lists contract templates the caller can use.\n\n`view_scope` options:\n- `self` \u2014 own templates only (default)\n- `shared_from_parent` \u2014 own + templates shared by org parent\/root\n- `all_org` \u2014 entire org tree (org root only)\n\nScope: `templates:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG97SP3A7BXDG6GEM9PAE"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG97SP3A7BXDG6GEM9PAE\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get template",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/templates\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/templates\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "architecto",
                                    "description": "The ID of the template."
                                },
                                {
                                    "id": "template",
                                    "key": "template",
                                    "value": 16,
                                    "description": "Template ID."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Full template shape with embedded positions + page geometry + sample preview link.\n\nScope: `templates:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG983V8QES7ZAACGMA3EP"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 404,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\\u0645\\u0646\\u0628\\u0639 \\u06cc\\u0627\\u0641\\u062a \\u0646\\u0634\\u062f\",\"title_en\":\"Resource not found\",\"request_id\":\"01M7RWG983V8QES7ZAACGMA3EP\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Template page preview",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/templates\/:template\/preview\/:page",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/templates\/:template\/preview\/:page",
                            "variable": [
                                {
                                    "id": "template",
                                    "key": "template",
                                    "value": 16,
                                    "description": "Template ID."
                                },
                                {
                                    "id": "page",
                                    "key": "page",
                                    "value": 16,
                                    "description": "Page number (1-indexed)."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "**NOT IMPLEMENTED YET** \u2014 returns `501 preview_not_available`. The signed\npage-preview URL lands in a later phase (Storage::temporaryUrl). Documented\nas a stub so merchants do not code against a fake `url:null` 200.\n\nScope: `templates:read`."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG98AXEH2KSPYMJT94TW5"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG98AXEH2KSPYMJT94TW5\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 501,
                            "body": "{\"status\":501,\"code\":\"preview_not_available\"}",
                            "name": "Stub \u2014 not implemented"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Verification",
            "description": "",
            "item": [
                {
                    "name": "Verify a tracking code",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/verify\/:code",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/verify\/:code",
                            "variable": [
                                {
                                    "id": "code",
                                    "key": "code",
                                    "value": "ABCD1234EFGH5678",
                                    "description": "The document's tracking code."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Public \u2014 no token. The same answer as the \u00ab\u0627\u0633\u062a\u0639\u0644\u0627\u0645 \u0633\u0646\u062f\u00bb page on elemza.com: whether a document\nwith this tracking code exists, its status, and \u2014 only when it is completed \u2014 its title, completion\ntime, signer count and the platform seal's time.\n\n**`valid` is true only for a completed contract that is not a test (sandbox) contract.** A test\ncontract was signed under a `pat_test_*` token with no real identity check; it answers\n`is_test: true, valid: false` whatever its status. A contract that is not completed returns its\nstatus only.\n\n`company_signatures` (completed, non-test contracts only) lists, for each signature made on behalf of a\ncompany, the company and the basis the platform recorded for that signer's authority \u2014 never a person's name.\n\n`identity_summary` (completed, non-test contracts only) counts how the signers' identities were checked \u2014\n`category` is one of `registry` (Shahkar and the civil registry), `registry_no_mobile` (the civil registry; the\nmobile \u2194 national-code match was not made at signing), `foreigners`, `otp_only`, `manual`, `account`,\n`guardian` \u2014 with a Persian `label`. Counts only, never a name.\n\nNo signer names, mobiles or national codes are ever returned. Dates are ISO-8601 with a Jalali\ntwin (`Y\/m\/d H:i`, Tehran time). Rate limit: 60 requests per minute per IP (`throttle:api-anon`).",
                        "auth": {
                            "type": "noauth"
                        }
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"data\":{\"code\":\"ABCD1234EFGH5678\",\"found\":true,\"status\":\"completed\",\"is_test\":false,\"valid\":true,\"completed_at\":\"2026-08-20T10:00:00+03:30\",\"completed_at_jalali\":\"1405\/05\/29 10:00\",\"signers_count\":2,\"sealed_at\":null,\"sealed_at_jalali\":null,\"title\":\"\u0642\u0631\u0627\u0631\u062f\u0627\u062f \u0647\u0645\u06a9\u0627\u0631\u06cc\",\"company_signatures\":[{\"company\":\"\u00ab\u0622\u0631\u06cc\u0646 \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u0631\u0633\u00bb\",\"basis\":\"\u062d\u0642\u0650 \u0627\u0645\u0636\u0627\u06cc \u0645\u0646\u0641\u0631\u062f \u0637\u0628\u0642\u0650 \u0645\u0631\u062c\u0639\u0650 \u062b\u0628\u062a\"}],\"identity_summary\":[{\"category\":\"registry\",\"label\":\"\u0634\u0627\u0647\u06a9\u0627\u0631 \u0648 \u062b\u0628\u062a\u200c\u0627\u062d\u0648\u0627\u0644\",\"count\":2}]}}",
                            "name": "completed"
                        },
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"data\":{\"code\":\"ABCD1234EFGH5678\",\"found\":true,\"status\":\"completed\",\"is_test\":true,\"valid\":false,\"completed_at\":\"2026-08-20T10:00:00+03:30\",\"completed_at_jalali\":\"1405\/05\/29 10:00\",\"signers_count\":1,\"sealed_at\":null,\"sealed_at_jalali\":null,\"title\":\"\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc\",\"company_signatures\":[],\"identity_summary\":[]}}",
                            "name": "test contract"
                        },
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"data\":{\"code\":\"ABCD1234EFGH5678\",\"found\":true,\"status\":\"waiting_signature\",\"is_test\":false,\"valid\":false,\"completed_at\":null,\"completed_at_jalali\":null,\"signers_count\":null,\"sealed_at\":null,\"sealed_at_jalali\":null,\"title\":null,\"company_signatures\":[],\"identity_summary\":[]}}",
                            "name": "not completed"
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\"type\":\"https:\/\/docs.elemza.com\/errors\/not_found\",\"status\":404,\"code\":\"not_found\",\"title_fa\":\"\u0633\u0646\u062f\u06cc \u0628\u0627 \u0627\u06cc\u0646 \u06a9\u062f \u0631\u0647\u06af\u06cc\u0631\u06cc \u062b\u0628\u062a \u0646\u0634\u062f\u0647 \u0627\u0633\u062a\",\"title_en\":\"No document has this tracking code\",\"request_id\":\"01J...\"}",
                            "name": "unknown code"
                        },
                        {
                            "header": [],
                            "code": 429,
                            "body": "{\"type\":\"https:\/\/docs.elemza.com\/errors\/rate_limit_exceeded\",\"status\":429,\"code\":\"rate_limit_exceeded\",\"title_fa\":\"\u062a\u0639\u062f\u0627\u062f \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0627\u0632 \u062d\u062f \u0645\u062c\u0627\u0632 \u0641\u0631\u0627\u062a\u0631 \u0631\u0641\u062a\",\"title_en\":\"Rate limit exceeded\",\"request_id\":\"01J...\"}",
                            "name": "too many requests"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Webhooks",
            "description": "\nOutbound webhook subscriptions. Customers create one or more endpoints, each\nfiltered by an array of event names. Deliveries are signed with HMAC-SHA256\nvia the secret returned at create-time (shown only once).\n\nScope: `webhooks:manage`.",
            "item": [
                {
                    "name": "List webhook subscriptions",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/webhooks",
                            "query": [
                                {
                                    "key": "active",
                                    "value": "",
                                    "description": "Filter by active state.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "16",
                                    "description": "",
                                    "disabled": false
                                },
                                {
                                    "key": "per_page",
                                    "value": "16",
                                    "description": "Max 100.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/webhooks?active=&page=16&per_page=16"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"active\":false,\"page\":16,\"per_page\":22}"
                        },
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG9AV9ZC2F3Q3D3JBPXMQ"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG9AV9ZC2F3Q3D3JBPXMQ\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get webhook subscription",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/webhooks\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/webhooks\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "B8c6F7NNfcj9m6RJYC6RtkmZN6",
                                    "description": "The ID of the webhook."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG9B17S595X9G04BMPX6D"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG9B17S595X9G04BMPX6D\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "List webhook deliveries",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/webhook-deliveries",
                            "query": [
                                {
                                    "key": "subscription_id",
                                    "value": "architecto",
                                    "description": "Filter by subscription.",
                                    "disabled": false
                                },
                                {
                                    "key": "event_name",
                                    "value": "architecto",
                                    "description": "Filter by event name.",
                                    "disabled": false
                                },
                                {
                                    "key": "status",
                                    "value": "architecto",
                                    "description": "pending|delivered|failed|dead-letter",
                                    "disabled": false
                                },
                                {
                                    "key": "page",
                                    "value": "16",
                                    "description": "",
                                    "disabled": false
                                },
                                {
                                    "key": "per_page",
                                    "value": "16",
                                    "description": "Max 100.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/webhook-deliveries?subscription_id=architecto&event_name=architecto&status=architecto&page=16&per_page=16"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG9BEZ238YA5TWR04PH6P"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG9BEZ238YA5TWR04PH6P\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get webhook delivery",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/webhook-deliveries\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/webhook-deliveries\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "B8c6F7NNfcj9m6RJYC6RtkmZN6",
                                    "description": "The ID of the webhook delivery."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Shows full payload, response code, error message, attempt history."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "x-request-id",
                                    "value": "01M7RWG9BM0SBP422S36W750BD"
                                },
                                {
                                    "key": "x-emza-api-version",
                                    "value": "v1"
                                },
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/problem+json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                },
                                {
                                    "key": "access-control-expose-headers",
                                    "value": "X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, X-Emza-API-Version, X-Idempotent-Replay"
                                }
                            ],
                            "code": 401,
                            "body": "{\"type\":\"https:\\\/\\\/docs.elemza.com\\\/errors\\\/token_invalid\",\"status\":401,\"code\":\"token_invalid\",\"title_fa\":\"\\u062a\\u0648\\u06a9\\u0646 \\u0646\\u0627\\u0645\\u0639\\u062a\\u0628\\u0631 \\u0627\\u0633\\u062a\",\"title_en\":\"Invalid token\",\"request_id\":\"01M7RWG9BM0SBP422S36W750BD\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Create webhook subscription",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/webhooks",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/webhooks"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"url\":\"https:\\\/\\\/example.com\\\/webhooks\\\/emza\",\"events\":[\"contract.completed\",\"contract.signer.signed\"],\"active\":false}"
                        },
                        "description": "Registers an HTTPS endpoint to receive event deliveries. We POST each\nmatching event to your URL and sign it with HMAC-SHA256:\n\n    X-Emza-Timestamp: <unix seconds>\n    X-Emza-Signature: sha256=<hex hash_hmac('sha256', \"{timestamp}.{raw_body}\", secret)>\n\nCompare with `hash_equals`, and reject anything whose timestamp is more than 5 minutes old.\n\nNOTE: this docblock is published to customers by Scribe. Until 2026-07-31 it described a\nStripe-style `X-Emza-Signature: t=<unix>,v1=<hex>` header that this platform has never sent \u2014\nsee App\\Services\\Webhook\\WebhookSigner, which is the only authority on the wire format, and\ntests\/Feature\/Sdk\/SdkWebhookVerificationTest, which pins the two together.\n\n**The plain signing `secret` is returned ONCE \u2014 store it immediately.**\nSubsequent reads (`index`, `show`) omit the secret entirely. Use\n`PATCH \/webhooks\/{id}` with `rotate_secret=true` to issue a fresh secret\n(invalidates the previous one immediately).\n\n**URL validation (SSRF guard):** the `url` field is rejected with `422`\nif it fails any of:\n  - Non-HTTPS scheme (`http:\/\/`, `ftp:\/\/`, `javascript:`, `file:\/\/`)\n  - Loopback IPs (`127.0.0.0\/8`, `::1`)\n  - RFC 1918 private (`10\/8`, `172.16\/12`, `192.168\/16`)\n  - Link-local + cloud metadata (`169.254.0.0\/16`, `100.100.100.200`)\n  - IPv6 link-local (`fe80::\/10`) or unique-local (`fc00::\/7`)\n  - Hostname suffix `.local`, `.internal`, `.private`, `.lan` or `localhost`\n  - Hostname whose DNS resolves to any of the above\n\n**Allowed event names** (set in `events` array \u2014 use `[\"*\"]` for all):\n`contract.created`, `contract.processing.completed`, `contract.processing.failed`,\n`contract.signer.added`, `contract.signer.authenticated`, `contract.signer.signed`,\n`contract.signer.rejected`, `contract.completed`, `contract.canceled`,\n`contract.voided`, `contract.refunded`,\n`form.submission.created`, `form.submission.completed`, `form.submission.bridged`,\n`form.submission.bridge_failed`,\n`certificate.issued`, `certificate.failed`, `certificate.expiring`,\n`certificate.expired`, `certificate.revoked`,\n`contract.signature.failed`, `signer.certificate.missing`,\n`contract.signing_deadline.passed`,\n`contract.amendment.completed`, `contract.rescinded`,\nplus `*` (wildcard).\n\nNOTE: this list is typed by hand because Scribe publishes the docblock verbatim and cannot\nread a constant. It is pinned to `ALLOWED_EVENTS` by\n`ApiDocsFreshnessTest::test_the_webhook_docblock_lists_exactly_the_allowed_events` \u2014 until\n1405\/06\/18 it advertised ten of the twenty events and had been half a product behind since\nthe form and certificate workstreams shipped.\n\nIf `*` is present alongside specific events, the specifics are dropped\n(the wildcard makes them redundant). Same event listed twice is deduped.\n\nScope: `webhooks:manage`. Idempotency-Key required (24h replay window)."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 201,
                            "body": "{\n  \"data\": {\n    \"id\": \"01krh7z0e8a4n39gf2ary73xbj\",\n    \"url\": \"https:\/\/example.com\/webhooks\/emza\",\n    \"events\": [\"contract.completed\", \"contract.signer.signed\"],\n    \"active\": true,\n    \"disabled_at\": null,\n    \"failed_deliveries_count\": 0,\n    \"last_delivery_at\": null,\n    \"last_delivery_status\": null,\n    \"created_at\": \"2026-05-13T18:00:42.000Z\",\n    \"updated_at\": \"2026-05-13T18:00:42.000Z\",\n    \"secret\": \"35ada3b45aa00df901b74b2b483114315a0c21f7c096f17e0bb29ab7d907fe32\",\n    \"_warning\": \"Save this secret now \u2014 it will NOT be shown again.\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 409,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/subscription_exists\",\n  \"status\": 409,\n  \"code\": \"subscription_exists\",\n  \"title_fa\": \"\u0627\u06cc\u0646 \u0646\u0634\u0627\u0646\u06cc \u0627\u0632 \u0642\u0628\u0644 \u062b\u0628\u062a \u0634\u062f\u0647 \u0627\u0633\u062a\",\n  \"title_en\": \"This URL already has an active subscription\",\n  \"detail_en\": \"Reuse subscription 01krh7z0e8a4n39gf2ary73xbj, or DELETE it and create a new one. If you lost its signing secret, call PATCH \/webhooks\/01krh7z0e8a4n39gf2ary73xbj with rotate_secret=true.\",\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\",\n  \"meta\": {\n    \"subscription_id\": \"01krh7z0e8a4n39gf2ary73xbj\",\n    \"url\": \"https:\/\/example.com\/webhooks\/emza\",\n    \"events\": [\"contract.completed\"],\n    \"created_at\": \"2026-05-13T18:00:42.000Z\"\n  }\n}",
                            "name": "URL already subscribed"
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"type\": \"https:\/\/docs.elemza.com\/errors\/validation\",\n  \"status\": 422,\n  \"code\": \"validation\",\n  \"title_fa\": \"\u0627\u0639\u062a\u0628\u0627\u0631\u0633\u0646\u062c\u06cc \u0648\u0631\u0648\u062f\u06cc \u0634\u06a9\u0633\u062a \u062e\u0648\u0631\u062f\",\n  \"title_en\": \"Request validation failed\",\n  \"errors\": {\n    \"url\": [\"\u0622\u062f\u0631\u0633\u200c\u0647\u0627\u06cc \u062f\u0627\u062e\u0644\u06cc \u0634\u0628\u06a9\u0647 (localhost \/ *.local \/ *.internal) \u0645\u062c\u0627\u0632 \u0646\u06cc\u0633\u062a\u0646\u062f.\"]\n  },\n  \"request_id\": \"01KRH8JRC4Y855P10CYC1C0AYS\"\n}",
                            "name": "SSRF blocked URL"
                        }
                    ]
                },
                {
                    "name": "Update webhook subscription",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/webhooks\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/webhooks\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "01krh7z0e8a4n39gf2ary73xbj",
                                    "description": "Webhook subscription ULID."
                                }
                            ]
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"url\":\"http:\\\/\\\/www.bailey.biz\\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",\"events\":[\"architecto\"],\"active\":false,\"rotate_secret\":false}"
                        },
                        "description": "Partial update \u2014 any field omitted is left unchanged. New `url` values\npass through the same SSRF guard as `POST \/webhooks` (see Create endpoint).\n\nWhen `rotate_secret=true`, a fresh HMAC signing secret is generated and\nreturned in the response \u2014 the previous secret is invalidated immediately,\nso any in-flight or already-sent webhook deliveries signed with the old\nsecret will fail verification on the receiver side. Plan rotations during\na quiet period or pause via `active=false` first.\n\nScope: `webhooks:manage`. Idempotency-Key required (24h replay window)."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"id\": \"01krh7z0e8a4n39gf2ary73xbj\",\n    \"url\": \"https:\/\/example.com\/webhooks\/emza\",\n    \"events\": [\"*\"],\n    \"active\": false,\n    \"failed_deliveries_count\": 2,\n    \"last_delivery_at\": \"2026-05-13T17:30:00.000Z\",\n    \"last_delivery_status\": \"delivered\"\n  }\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Delete webhook subscription",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/webhooks\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/webhooks\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "B8c6F7NNfcj9m6RJYC6RtkmZN6",
                                    "description": "The ID of the webhook."
                                }
                            ]
                        },
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Soft-deletes the subscription. In-flight deliveries that have already\nbeen queued will complete; no new deliveries are dispatched."
                    },
                    "response": []
                },
                {
                    "name": "Send a synthetic test event",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/webhooks\/:id\/test",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/webhooks\/:id\/test",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "B8c6F7NNfcj9m6RJYC6RtkmZN6",
                                    "description": "The ID of the webhook."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Fires a `webhook.test` event to verify the endpoint is reachable + signed\ncorrectly. Counts toward `webhook_deliveries` like a real event."
                    },
                    "response": []
                },
                {
                    "name": "Replay webhook delivery",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/webhook-deliveries\/:id\/replay",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/webhook-deliveries\/:id\/replay",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "B8c6F7NNfcj9m6RJYC6RtkmZN6",
                                    "description": "The ID of the webhook delivery."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Creates a NEW delivery row with the same payload + subscription. The\noriginal row keeps its terminal status (failed \/ dead-letter \/ delivered)."
                    },
                    "response": []
                }
            ]
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "Authorization",
                "type": "string"
            }
        ]
    }
}