Skip to content
For AI agents · task runbook

Publish a new document version and require re-acceptance

To publish a new document version and require re-acceptance, send the new text to Esign Comply with material_change set to true and a summary of changes. Then ask the signer status call, for each signed-in user, whether anything is outstanding, and show a blocking screen until the user accepts the current version in a new ceremony.

Paste the prompt into your AI agent, or follow the steps yourself. The whole flow is in the guide for AI agents.

Last updated

esigncomply-publish-version-reacceptance.md · 249 words
Publish a new version of our terms with Esign Comply and make signed-in users accept it before they continue.

Read these first and follow them exactly:
- https://esigncomply.com/agents/publish-version-reacceptance.md (this task, step by step)
- https://esigncomply.com/agents.md (every dashboard label and every account call)
- https://esigncomply.com/setup.md (the whole setup runbook)
- https://esigncomply.com/docs/guides/reacceptance.md (the gate and the blocking screen, with code)

What stays with me: I give you the final text. I decide whether the change is material, I approve the summary of changes, and I decide when the version takes effect. Ask me for all four before you publish. A published version cannot be edited.

What you do:
1. Publish the text I give you, unchanged, with POST /v1/documents/{id}/versions: material_change, summary_of_changes and effective_at as I told you.
2. Gate the signed-in part of the app on GET /v1/signers/{external_id}/status. Anything in "outstanding" sends the user to a blocking screen.
3. Build the blocking screen: the updated documents, the summary of changes, an unchecked box, the button "Accept and continue", and "Log out". No "Remind me later".
4. Run a ceremony with context.purpose set to policy_update, confirm the new record on the server, then let the user through.
5. Handle the signer.reacceptance_required webhook.
6. Test it with a test key first: publish a second version of a test document and check that the gate opens only after acceptance.

When it works, check that the block at https://esigncomply.com/rules.md is in this project's instruction file and add the blocking screen to its list of flows.

19 lines. Scroll inside the panel to read it, or copy the whole prompt with the button above.

Before step 1

What do you need before you publish a version and require re-acceptance?

  • The final text of the new version, from your person. A published version cannot be edited.
  • Your person's decision that the change is material. material_change: true is their statement that the change matters: Esign Comply does not read the text or judge the change.
  • The ID of the document (doc_…) and of the profile the acceptance flow uses.
  • A key that can publish: full_access or recording_access. Any key can read the signer status.
8 steps

How do you publish a version and require re-acceptance with Esign Comply, step by step?

  1. 01

    Find the document and who has accepted it

    List the documents to find the ID, then read the document. current_version is the version that current resolves to now, versions is the count, and signers_by_version is the number of distinct signers with a record on each version: the people the change reaches.

    curl -s "$ESIGNCOMPLY_API_URL/documents?type=terms&limit=20" \
      -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY"
    
    curl -s "$ESIGNCOMPLY_API_URL/documents/doc_8Hq2" \
      -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY"
  2. 02

    Publish the version as a material change

    material_change: true leaves earlier acceptances outstanding. summary_of_changes takes up to 2,000 characters and comes back in the status call, for the blocking screen. effective_at can be in the future: the version becomes current at that time, and earlier acceptances become outstanding at that time. Without it the version is effective now. In a browser: https://esigncomply.com/dashboard/documents, open the document, and under "Publish a version" fill "Version label", "Language", "Effective date (UTC)", "Format" and "Content", tick the box that starts "This is a material change.", fill "Summary of changes" and press "Publish version". The dashboard refuses a material change with no summary. A label that already exists answers 409 idempotency_conflict with param set to version_label.

    curl -s "$ESIGNCOMPLY_API_URL/documents/doc_8Hq2/versions" \
      -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY" -H "Content-Type: application/json" \
      -H "Idempotency-Key: tos-2027-02-01" \
      -d '{
        "version_label": "2027-02-01",
        "language": "en",
        "effective_at": "2027-02-01T00:00:00Z",
        "content": { "format": "markdown", "text": "# Terms of Service\n..." },
        "material_change": true,
        "summary_of_changes": "Added arbitration clause in section 14."
      }'
  3. 03

    Handle the two webhooks

    Publishing sends document.version_published, and one signer.reacceptance_required for each signer who has a record on an earlier version of the document. Its data holds signer_external_id, document_id and version_id. The webhook is sent at publication, even when effective_at is later: that gap is the window in which your app tells people about the change. Sending that notice is your app's job.

    The delivery body
    {
      "object": "event",
      "id": "whe_8Rt4",
      "type": "signer.reacceptance_required",
      "api_version": "2026-11-21",
      "livemode": true,
      "created_at": "2027-01-15T10:00:03.918Z",
      "data": { "signer_external_id": "user_7c1d", "document_id": "doc_8Hq2", "version_id": "dv_9Wc4" }
    }
  4. 04

    Ask who is outstanding

    Any secret key can make this call, a recording_access key included. outstanding holds the IDs of the documents the signer has to accept, and an empty array means nothing to do. Each entry of documents carries current_version, accepted_version, outstanding, reason (material_change, never_accepted or null) and summary_of_changes. Add ?documents=doc_8Hq2,doc_Pv71 to include documents the signer has never accepted.

    curl -s "$ESIGNCOMPLY_API_URL/signers/user_7c1d/status" \
      -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY"
  5. 05

    Gate signed-in users

    Call the status from the authenticated layout and send the user to /accept-updates when anything is outstanding. Check once per user every 5 minutes: the status changes only when you publish a version or the signer completes a ceremony. Put /accept-updates outside the gated layout, or the redirect loops. For actions that must not happen before re-acceptance, check in the server action or route handler as well.

  6. 06

    Build the blocking screen

    The screen shows the list of updated documents, each linked to its page, the summary of changes the API returned, an unchecked checkbox labelled "I agree to the updated [document titles]", a button labelled "Accept and continue", and "Log out" as the alternative. Do not offer "Remind me later", and do not treat continued use, scrolling or signing in as acceptance.

  7. 07

    Run the ceremony with the purpose policy_update

    Create one session for the outstanding documents with "version": "current" and context.purpose set to policy_update. One ceremony covers up to 10 updated documents. The page runs it like any acceptance: presentDocument for each version, observeAssent, then complete() from the user's real click.

    On the server
    curl -s "$ESIGNCOMPLY_API_URL/sessions" \
      -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY" -H "Content-Type: application/json" \
      -H "Idempotency-Key: update-user_7c1d-doc_8Hq2-1" \
      -d '{
        "profile": "prof_signup_4f1a",
        "signer": { "external_id": "user_7c1d", "email": "dana@example.org", "class": "consumer", "country": "US", "region": "US-CA" },
        "documents": [{ "document": "doc_8Hq2", "version": "current" }],
        "context": { "url": "http://localhost:3000/accept-updates", "purpose": "policy_update" }
      }'
  8. 08

    Confirm the record and clear the gate

    Read the new record on the server and require a status of recorded, timestamped or anchored, the expected signer and the versions the session pinned. Then drop the cached status for that user. The next status call answers "outstanding": []. The earlier record stays on file unchanged: a record is never edited to point at a newer version.

    On the server
    curl -s "$ESIGNCOMPLY_API_URL/records/rec_Z4m8" \
      -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY"
    
    curl -s "$ESIGNCOMPLY_API_URL/signers/user_7c1d/status" \
      -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY"

It worked when

GET /v1/signers/{external_id}/status lists the document in outstanding for a signer who accepted the earlier version, a page inside the gated layout redirects to the blocking screen, and after the user accepts the same call answers "outstanding": [].

What must a person do, and what must the agent never do?

The account belongs to a person. These limits hold in this task, as they do in every task an agent runs on Esign Comply.

The person does

  • Your person writes the new text. You publish it as they give it to you.
  • Your person decides whether the change is material, and approves the summary of changes.
  • Your person decides when the version takes effect and whether to tell people in advance.

The agent never does

  • Never edit a published version. For new text, publish a new version label.
  • Never write or change the text of a legal document.
  • Never set material_change on your own judgment. Ask your person.
  • Never offer "Remind me later", and never treat continued use, scrolling or signing in as acceptance.
  • Never pre-check the box on the blocking screen or accept for the user.
  • Never clear the gate on the browser's word. Confirm the new record on the server first.

Questions about this task: publish a version and require re-acceptance

Does every new version make people accept again?

No. Only a version published with material_change set to true leaves earlier acceptances outstanding. A version without it becomes current for new signers and asks nothing of the people who accepted an earlier one.

Who decides whether a change to the terms is material?

Your person does. The flag is their statement that the change matters: Esign Comply does not read the text or judge the change. The agent asks before it sets the flag.

Can I publish new terms now and have them take effect later?

Yes. Set effective_at to a future time: the version is published at once and becomes current at that time, and earlier acceptances become outstanding at that time. The signer.reacceptance_required webhook is sent at publication, so the gap is your window to tell people.

What happens to the earlier acceptance records?

They stay on file unchanged. A record is never edited to point at a newer version: each re-acceptance is a new record that names the exact versions presented.

Does a re-acceptance count as a signature event?

Yes. In live mode each re-acceptance is one signature event, and one ceremony that covers up to 10 updated documents still counts once. Re-acceptances made with a test key are not counted.

Does Esign Comply email people about the updated terms?

No. Telling people about a change before it takes effect is your app's job. Esign Comply tells your server who is outstanding, through the status call and the webhook.

Can I fix a typo in a version I already published?

No. A published version cannot be edited and there is no delete. Publish a new version label with the corrected text, and ask your person whether the correction is a material change.

What should the gate do when the status call fails?

Keep the last known answer and check again on the next request, or block every signed-in user until the check answers. The earlier acceptance is still on record either way. Choose one deliberately and write the choice down.

Your person signs up once. You do the rest.

Free plan: 10 live signatures a month and a full test mode. No card required.

Working with an AI tool? This page is also available as Markdown: /agents/publish-version-reacceptance.md