Contracts

List the contract terms tracked on the workspace's documents, most recently updated first. Every filter is optional and only narrows the list. To catch up after a webhook that never arrived, page this list until the contracts are older than your last sync: every change to the terms, by a user or by the hourly run, moves updated_at. Each document's history of contract events is at GET /v1/documents/{documentId}/activities.

Copy as Markdown Open in ChatGPT Open in Claude

get/v1/accounts/{accountId}/contracts

Request

  • Base URL
    https://api.assinafy.com.br
  • URL
    https://api.assinafy.com.br/v1/accounts/{accountId}/contracts
  • Auth
    • HTTP bearer
    • or API key in header X-Api-Key

Path parameters

accountIdstring required

Workspace account ID.

Query parameters

statusstring[]

Contract status; several, comma-separated, match any of them.

counterpartystring

Part of the counterparty name, or its exact CPF/CNPJ.

searchstring
Example:Prestação de serviços

Part of the document's name.

end_date_fromstring date

Contracts ending on or after this date.

end_date_tostring date

Contracts ending on or before this date.

ending_within_daysinteger
Example:30

Contracts ending from today (the API's calendar day, Brasília time) to that many days later, both included; 0 is today. Any status: add status=active for the ones still in force.

external_systemstring

System of an external reference, e.g. hubspot.

external_idstring

ID of an external reference in that system.

sortstring
Example:end_date

end_date or updated_at; prefix with - for descending (-updated_at, the default). Contracts without an end date come last either way.

expandstring

document embeds each contract's document.

pageinteger
Example:1

Page number.

per-pageinteger
Example:25

Records per page (max 100).

Response

A page of contracts

statusinteger

HTTP status code, mirrored in the body.

messagestring

Human-readable message; empty on success.

Example response

{
  "status": 200,
  "data": [
    {
      "resource": "document_contract",
      "document_id": "66b2f0e1c3a4d5e6f7a8b9c0",
      "status": "active",
      "counterparty_name": "Acme Ltda",
      "counterparty_taxpayer_id": "11222333000181",
      "value": 120000.5,
      "currency": "BRL",
      "start_date": "2026-11-01",
      "end_date": "2027-10-31",
      "auto_renew": true,
      "renewal_term_months": 12,
      "notice_period_days": 30,
      "term": 1,
      "owner_id": "d6zqpbyog2v3xvxerwn8la94",
      "metadata": {
        "crm_stage": "won"
      },
      "external_references": [
        {
          "system": "hubspot",
          "id": "98765"
        }
      ],
      "document": {
        "resource": "document",
        "id": "615601fab04c0a3147bb1246",
        "account_id": "d199996981dbd199996981db",
        "name": "document.pdf",
        "status": "metadata_ready",
        "artifacts": {
          "original": "https://api.assinafy.com.br/v1/documents/doc1/download/original"
        },
        "signing_url": "https://api.assinafy.com.br/v1/sign/doc1",
        "verification_code": "a3f1c9e07b2d4e8f9a6c5b1d0e7f3a2c9b8d4e6f",
        "verification_url": "https://www.assinafy.com.br/verificador/a3f1c9e07b2d4e8f9a6c5b1d0e7f3a2c9b8d4e6f",
        "declined_by": {
          "resource": "signer",
          "id": "62d6ee35c7741ca4006b9e11",
          "full_name": "John Signer",
          "email": "john@email.com",
          "whatsapp_phone_number": "+5548999990000",
          "government_id": "39053344705"
        },
        "assignment": {
          "resource": "assignment",
          "id": "615606ef81d199996981dbce",
          "document_id": "615601fab04c0a3147bb1246",
          "created_at": "2026-06-03T03:54:16Z",
          "sender_email": "sender@example.com",
          "method": "virtual",
          "signers": [
            {
              "resource": "signer",
              "id": "62d6ee35c7741ca4006b9e11",
              "full_name": "John Signer",
              "email": "john@email.com",
              "whatsapp_phone_number": "+5548999990000",
              "government_id": "39053344705",
              "verification_method": "Email",
              "notification_methods": [
                "Email"
              ],
              "step": 1,
              "identity_verification_status": "InReview",
              "notification_history": [
                {
                  "event": "signature_request",
                  "status": "sent",
                  "sent_at": "2026-07-07T12:00:00Z"
                }
              ]
            }
          ],
          "items": [
            {
              "page": {
                "id": "615601faf166d6d1d8e7dc30",
                "number": 1,
                "height": 2100,
                "width": 1275,
                "download_url": "https://api.assinafy.com.br/v1/documents/doc1/pages/1a/download"
              }
            }
          ],
          "signing_urls": [
            {
              "url": "https://api.assinafy.com.br/v1/sign/doc1?email=joe@example.com"
            }
          ]
        },
        "pages": [
          {
            "id": "615601faf166d6d1d8e7dc30",
            "number": 1,
            "height": 2100,
            "width": 1275,
            "download_url": "https://api.assinafy.com.br/v1/documents/doc1/pages/1a/download"
          }
        ],
        "has_contract": true,
        "created_at": "2026-06-03T03:54:16Z",
        "updated_at": "2026-06-03T03:54:16Z"
      },
      "amendments": [
        {
          "resource": "document_contract_amendment",
          "document_id": "7c3d1e2f4a5b6c7d8e9f0a1b",
          "document_name": "Aditivo 1 - Contrato de prestação de serviços.pdf",
          "parent_document_id": "66b2f0e1c3a4d5e6f7a8b9c0",
          "relation_type": "amendment",
          "number": 1,
          "status": "pending",
          "document_status": "pending_signature",
          "currency": "BRL",
          "terms": {
            "value": 130000,
            "end_date": "2028-06-30"
          },
          "changes": {
            "value": {
              "from": 120000.5,
              "to": 130000
            },
            "end_date": {
              "from": "2027-10-31",
              "to": "2028-06-30"
            },
            "term": {
              "from": 1,
              "to": 2
            }
          },
          "created_at": "2026-10-23T12:00:00Z",
          "updated_at": "2026-10-23T12:00:00Z"
        }
      ],
      "created_at": "2026-10-23T12:00:00Z",
      "updated_at": "2026-10-23T12:00:00Z"
    }
  ]
}

Changes