# Assinafy Contracts API

**Canonical:** https://apis.io/apis/assinafy-com-br/assinafy-com-br-contracts-api/  
**Provider:** Assinafy — https://apis.io/providers/assinafy-com-br/  
**Base URL:** https://api.assinafy.com.br  
**Documentation:** https://www.assinafy.com.br/api

Assinafy Contracts API is one of 14 APIs that [Assinafy](https://apis.io/providers/assinafy-com-br/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. This API exposes 6 JSON Schema definitions. Tagged areas include Contracts. The published artifact set on APIs.io includes an OpenAPI specification and 6 JSON Schemas.

Contract terms tracked on documents: counterparty, value, dates and renewal terms. A contract always belongs to a document of the workspace, and tracking it never changes how that document is uploaded, sent or signed. ### How the flow works 1. **Have the document first.** Upload it with `POST /v1/accounts/{accountId}/documents`, or pick one already in the workspace, and keep its `id`. No call creates a document and its contract terms together. 2. **Set its terms.** `PUT /v1/accounts/{accountId}/documents/{documentId}/contract` with the terms. Any time: right after the upload, while the document is out for signature, or long after it was signed. A contract that ended before it was tracked is registered as it ended (`expired` with a past `end_date`, or `terminated`). A cancelled, declined or expired document takes no new terms. If this call fails, the document stays uploaded and the terms can be sent again. 3. **Record a change with a signed instrument** (optional). Upload the amendment, renewal or termination document, then `PUT` its own `.../contract` with `parent_document_id` (the contract's document), `relation_type` and the terms it changes. The change applies to the contract once that document is signed (at once if it already is), and `document_contract_amended` is recorded. 4. **Let the hourly run keep it current.** Every active contract is walked by the Brasília calendar day: the renewal notice when the notice period starts, warnings 45 and 30 days before the end date, and, the day after it, the next term for an auto-renew contract or `expired` for the others. Each records its `document_contract_*` event and e-mails the contract's owner. The same run hands the contracts of an owner who left the workspace, however they left, to the first owner still an active member. 5. **Or change it directly.** `PUT` edits the terms, `POST .../renew` starts the next term and `POST .../terminate` closes the contract. 6. **Read it.** `GET /v1/accounts/{accountId}/contracts` lists the workspace's contracts; `GET .../documents/{documentId}/contract` reads one with its amendments; `GET /v1/documents/{documentId}` says whether a document has one (`has_contract`). Every change is an event on the document's activities and a webhook. ### Who can write Writes need a plan with contract tracking; reads do not. Any active member of the workspace, owner or organizer, may set terms, link amendments, renew and terminate; an OAuth app needs `documents:write` to write and `documents:read` to read. ### Errors and conflicts A refused write lists every problem in `errors`, each with its `field` and a stable `code`; the codes and the rules behind them are in the `400` response. A write that sends the `updated_at` it read is refused with `409` if the contract changed meanwhile. ### When the plan lapses While the workspace's plan lacks contract tracking (its subscription expired or was cancelled; a payment past due inside the grace period keeps it), the hourly run leaves its contracts as they are and signed amendments wait. The first run after the plan returns catches up: a contract past its end date moves to the term running that day, on its own renewal cycle, or expires; waiting amendments apply in signing order; alerts whose window passed meanwhile are not sent.

## Operations (6)

| Method | Path | Summary |
|---|---|---|
| GET | `/v1/accounts/{accountId}/contracts` | List contracts |
| GET | `/v1/accounts/{accountId}/documents/{documentId}/contract` | Get a document's contract terms |
| PUT | `/v1/accounts/{accountId}/documents/{documentId}/contract` | Set a document's contract terms |
| GET | `/v1/accounts/{accountId}/documents/{documentId}/contract/related` | List the contracts related to a document |
| POST | `/v1/accounts/{accountId}/documents/{documentId}/contract/renew` | Renew a contract |
| POST | `/v1/accounts/{accountId}/documents/{documentId}/contract/terminate` | Terminate a contract |

## Machine-readable artifacts (7)

- **OpenAPI** — https://artifacts.apis.io/assinafy-com-br/openapi/assinafy-com-br-contracts-api-openapi.yml
- **JSONSchema** — https://artifacts.apis.io/assinafy-com-br/json-schema/assinafy-com-br-document-contract-input-schema.json
- **JSONSchema** — https://artifacts.apis.io/assinafy-com-br/json-schema/assinafy-com-br-document-schema.json
- **JSONSchema** — https://artifacts.apis.io/assinafy-com-br/json-schema/assinafy-com-br-document-contract-amendment-schema.json
- **JSONSchema** — https://artifacts.apis.io/assinafy-com-br/json-schema/assinafy-com-br-signer-identity-review-schema.json
- **JSONSchema** — https://artifacts.apis.io/assinafy-com-br/json-schema/assinafy-com-br-document-contract-schema.json
- **JSONSchema** — https://artifacts.apis.io/assinafy-com-br/json-schema/assinafy-com-br-webhook-dispatch-schema.json

## Other Assinafy APIs (12)

- [Assinafy Accounts API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-accounts-api/)
- [Assinafy Assignments API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-assignments-api/)
- [Assinafy Authentication API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-authentication-api/)
- [Assinafy Documents API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-documents-api/)
- [Assinafy Fields API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-fields-api/)
- [Assinafy OAuth API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-oauth-api/)
- [Assinafy Signers API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-signers-api/)
- [Assinafy Signing API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-signing-api/)
- [Assinafy Tags API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-tags-api/)
- [Assinafy Templates API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-templates-api/)
- [Assinafy Users API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-users-api/)
- [Assinafy Webhook Payloads API](https://apis.io/apis/assinafy-com-br/assinafy-com-br-webhook-payloads-api/)

## Tags

Contracts

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/assinafy-com-br/assinafy-com-br-contracts-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/assinafy-com-br/.
