CoreSign

API reference

The CoreSign API is for accounts on the Essentials, Pro and Business plans. With an API key your software can upload templates, prepare envelopes from them, follow each one through signing, and download the signed document and its evidence. Sending an envelope to its signers is always done by a person, signed in to the CoreSign console: your integration prepares, someone presses Send.

Authentication

Every live API key belongs to a registered client. A client is whatever calls the API: an AI agent, a script, an integration, or an app a person connected through OAuth (below). Register it at Settings → Agents while signed in: give it a name, say whether it is an agent with its own Ed25519 key pair or a script or integration, set what it may prepare (its grant), and choose whether it must sign every request. Registering needs your current password and a confirmed email address. Its key is shown once; CoreSign keeps only a hash of it. Recorded under its agt_… id: on that page, the client's activity — its registration, each key issued for it, each change to its grant, each suspension, resumption or revocation, each draft it prepares, and each request refused for its grant or for a route a client may not use; and on each draft it prepares, prepared_by_agent_id and the history's created event. Its other requests count toward its request limit and are not recorded one by one.

How many clients. Your plan sets how many clients may be active at once: Free 0, Essentials 1, Pro 2, Business 10. Suspended and revoked clients do not count. Past the number, registering or resuming a client is refused (403, client_allowance_reached), and connecting a new app through OAuth stops at the consent page, which says the plan's clients are all in use (below). The plan is read on every request: if the account has more active clients than its plan includes, after a downgrade or a lapsed payment, the ones registered last are refused (403, client_over_allowance, naming the plan and the number) until one is suspended or revoked or the plan includes them again. Nothing is deleted.

Bearer or signed. A client's key works as a Bearer token, unless the person who registered it required signed requests: then it works only in requests the client signs with its own key pair, and a copied key alone is no use (signing a request). A live key that belongs to no client, such as one made on the API keys page before 5 October 2026, is refused (401, client_not_registered); a test key belongs to no client and is the one key that works without one. Settings → API keys now makes only test keys, and lists every key so an old one can be revoked.

What a client's key may do: prepare drafts, and read. A registered client's key, Bearer or signed, may use only these routes:

Every other route answers a client's key 403, and the refusal is recorded under the client's id:

{"detail": {"error": "client_route_not_allowed",
            "message": "A client's key prepares drafts and reads envelopes and templates. This is done by a person, in the CoreSign console."}}

That includes sending, voiding, resending a signing email, reminders, deleting a template, webhooks, the plan and the account: a person does those, signed in to the console. A test key is not a client's and has its own routes; a signed request reaches three routes; an app connected through OAuth works at /mcp.

The sandbox, on every plan. A test key (csk_test_…, made at Settings → API keys; an account can hold 10 at once) tries the whole flow without signing anything real. Everything it makes is a TEST envelope: it goes only to this account's own verified addresses (400, test_recipient_not_allowed otherwise), is never counted toward the plan, is never anchored, carries "TEST — NOT A SIGNED AGREEMENT" on every page of its signed PDF and certificate, says "is_test": true inside its sealed record, so the offline checker answers it TEST rather than VERIFIED, and is removed 30 days after it was made. A test key reaches the template routes: it lists, reads and makes test envelopes from every template, and a template it uploads or makes from text is a test template ("is_test": true); it changes only test templates (deletes one; adds, edits, removes or replaces its fields), and on any other is answered 403, test_key_template_not_its_own. It creates, lists, reads and deletes test envelopes, and downloads a completed test envelope's signed PDF, certificate, certificate record and sealed payload (a live envelope's answer 404), and may call GET /api/v1/auth/me. Every other route on this page that is not public answers it 403, test_key_route_not_allowed, and so do the billing routes; the routes that manage the account and its settings (password, profile, keys, agents, webhooks) answer it 401, as in the table below. A person sends a test envelope from the console, as any other. Envelopes carry is_test, and so does every webhook event about one.

Send the key on every request as a bearer token:

Authorization: Bearer csk_…
StatusWhenBody
401No key, an unknown or revoked key, or an inactive account{"detail": "authentication required"}
401A live key that belongs to no registered client{"detail": {"error": "client_not_registered", "message": …, "register_at": "/settings/agents"}}
403The client is beyond the number of active clients the account's plan includes{"detail": {"error": "client_over_allowance", "message": …, "plan", "included", "position"}}
403The client requires signed requests, and this one is not signed{"detail": {"error": "agent_key_requires_signature", "message": …}}
403A person on the account suspended the client{"detail": {"error": "agent_suspended", "message": …}}
429The client's own request limit, below{"detail": {"error": "client_rate_limited", "message": …}}
429The account's test keys' request limit, below{"detail": {"error": "sandbox_rate_limited", "message": …}}
403A client's key on a route a client may not use (above){"detail": {"error": "client_route_not_allowed", "message": …}}
403A test key outside the sandbox's routes{"detail": {"error": "test_key_route_not_allowed", "message": …}}
403A valid key on an account whose plan does not include API access{"detail": "this account is not entitled to API access"}
401A test key on a route that manages the account or its settings, webhooks included{"detail": "this is managed from a signed-in browser session, not with an API key"}

GET /api/v1/auth/me

Which account a key belongs to — a safe first call. Returns account_id, via ("api_key"), api_access and client_id, the client the key belongs to.

Conventions

Rate limits are counted per account, per client, or per envelope for resends, over 15 minutes. Past one, the route answers 429 with a sentence saying so and a Retry-After header: the seconds until you may try again (to the end of the 15 minutes; for a draft cap, to midnight UTC). Wait that long and retry.

Every request a client's key or a test key makes, and every request at /mcp, says where it stands in its request limit, in three headers: X-RateLimit-Limit, the requests the 15 minutes allow; X-RateLimit-Remaining, how many are left; X-RateLimit-Reset, when they start again, in Unix seconds. A 429 carries them too, with X-RateLimit-Remaining: 0.

WhatLimit per 15 minutes
Requests by one client, any route, and at /mcp600 per client; at /mcp every request counts, and tool calls also have their own 120 within it
Requests by test keys, any route300 per account, every test key together
Creating envelopes60 per account
Drafts prepared by one agent30 per agent, within its account's limit
Uploading templates20 per account
Resending a signing email3 per envelope

The flow

  1. Upload a PDF, a Word file, or photos of a paper document, as a template and place its fields — where each signer signs, initials or dates.
  2. Create an envelope from the template, naming the signers in the order they sign. It is a draft.
  3. A person sends it from the envelope's page in the console. The first signer is emailed a link. A draft with no signers, or with no field for any of them, cannot be sent (below).
  4. Each signer signs in turn; when one signs, the next is emailed. When the last signs, every signer is emailed their copy and the envelope is completed and sealed.
  5. Download the signed document and its evidence.

Envelope states:

StatusMeaning
draftPrepared, not sent. Can be deleted.
pendingSent; nobody has signed yet.
signedSome, not all, signers have signed.
completedEveryone signed. Final and sealed.
declinedA signer declined. Final.
voidedWithdrawn by the sender. Final.

An envelope whose deadline has passed keeps its status, but its links stop working and it can no longer be signed: compare expires_at with the time. Void it and create a new one if it is still needed.

Templates

A template is a PDF plus the fields placed on it. Positions and sizes are percentages of the page, from its top-left corner; pages count from 0.

POST /api/v1/templates/upload

Multipart form: file (the PDF), and optionally name and description. The file must be a PDF — its contents must start with %PDF- — of at most 50 MB. Answers 201 with the template.

Or photos of a paper document: one to 30 JPEG or PNG images, each its own file part, in page order, at most 50 MB together. They become one PDF, a US Letter page each, each photo turned upright and saved again without what was written in it (where it was taken among it), at most 10 MB each once saved. That PDF meets every check an uploaded one does. A PDF cannot be sent together with photos. One document is made from photos at a time: if another is being made, the answer is 503, and trying again a moment later works.

Or one Word file (.docx), on its own: it is converted to PDF, and that PDF meets every check an uploaded one does; the Word file is not kept. A file with macros, one protected with a password, one that unpacks to far more than its size, and one that is not a Word document are refused with 400 before it is converted. One Word file is converted at a time: if another is, or the converter cannot be reached, the answer is 503; a PDF still uploads. Check the converted pages: fonts and layout can differ from Word's.

A client's key may upload unless its grant names particular templates (403, grant_templates_fixed), as for a template from text.

curl -X POST https://sign.coresignapp.com/api/v1/templates/upload \
  -H "Authorization: Bearer $CORESIGN_KEY" \
  -F "file=@agreement.pdf" -F "name=Services agreement"

curl -X POST https://sign.coresignapp.com/api/v1/templates/upload \
  -H "Authorization: Bearer $CORESIGN_KEY" \
  -F "file=@page-1.jpg" -F "file=@page-2.jpg" -F "name=Lease (from the paper copy)"

POST /api/v1/templates/from-text

A template from text, with no PDF to make: CoreSign lays it out on A4 and places a field wherever you put an anchor. Body {"name", "text", "description"}; the text is at most 20000 characters. Understood: #, ## and ### headings, paragraphs (a blank line ends one; a line with an anchor is always a line of its own), - bullets, 1. numbered items and **bold**; italic is shown upright, and anything else is printed as written. Anchors: {{signature:1}}, {{initials:1}}, {{date:1}}, {{name:1}} and {{text:1:Job title}}, where the number is the signer in signing order. At least one signature anchor is required. Answers 201 with the template and its fields. Counts toward the template upload limit. An agent may call it unless its grant names particular templates (grant_templates_fixed).

{"name": "Mutual NDA", "text": "# Mutual NDA\n\nThe parties agree to keep each other's information confidential.\n\nSigned: {{signature:1}} Date: {{date:1}}\n\nSigned: {{signature:2}} Date: {{date:2}}"}

GET /api/v1/templates

Your templates, at most 50: {"ok", "count", "templates": [...]}.

GET /api/v1/templates/{template_id}

One template: template_id, name, description, filename, page_count, file_size, file_hash (SHA-256 of the PDF), created_at, updated_at and fields. 404 if it is not yours.

GET /api/v1/templates/{template_id}/pages/{page_index}

A page rendered as a PNG image, for placing fields.

GET /api/v1/templates/{template_id}/suggested-fields

Fields the PDF appears to ask for, read from its own text and lines: a label such as Signature, By, Name, Date or Initials beside a blank. Nothing is saved — each suggestion has the shape of a field for fields/batch, with assigned_to guessed from reading order (two blocks side by side are signer_1 and signer_2). Answers {"ok", "suggestions": [...], "pages_read", "text_found"}; text_found is false for a scanned PDF, which has no text to read.

POST /api/v1/templates/{template_id}/fields

Add one field. Answers 201 with the field. A client's key changes the fields only of a template its grant allows, here and in the three routes below (403, grant_template_not_allowed).

FieldTypeMeaning
page_indexinteger, default 0The page, from 0
field_typestring, default signatureEvery kind is drawn onto the signed PDF. Their marks: signature, initials. Filled in by CoreSign: name, email (the address the envelope names), date (the day they sign). Answered by the signer before signing, each one line of at most 200 characters: text; checkbox (drawn as a tick when ticked); radio and dropdown, one of the field's choices; number; date_input, a date they enter; and attachment, a file they attach while signing (a PDF, or a photo as JPEG or PNG, at most 10 MB; at most 5 for one signer), answered as its name and SHA-256 and drawn as "Attached: " and its name. A photo is kept re-saved without its hidden data, such as where it was taken
field_labelstringShown to the signer — for a kind they answer, the question ("Title"); for a checkbox, what they tick ("I agree to the terms")
optionsobject or nullOnly for a kind the signer answers, and only the keys that kind takes; any other key is refused 422. radio and dropdown: choices, required, 2 to 20 different strings of at most 60 characters. number: min and max, each optional, sent as a number or a string and answered as a string ("2.5"). text: preset, one of email, us_phone or us_zip, and min_length and max_length, whole numbers from 1 to 200. Every field answers with options, null when it has none. On PUT, {} removes them, and a field whose kind changes keeps none unless they are sent again. A field shown only while another answer is given (Pro and Business): a checkbox, radio or dropdown may carry key, 1 to 40 lower-case letters, digits and underscores, starting with a letter, unique in the template; any kind the signer answers may carry show_if, {"key": "has_guarantor", "is": "checked"} for a checkbox or {"key": "plan", "is_one_of": ["Gold"]} for a radio or drop-down, naming a field of the same signer. The signer is asked it only while that answer is given; a hidden field is never required, and an answer sent for one is not kept. One level only: a field with a key takes no show_if, and a field others depend on cannot be deleted. Adding or changing a rule needs Pro or Business (403); rules already saved keep working
x_percent, y_percentnumbersTop-left corner, as a percentage of the page
width_percent, height_percentnumbers, default 30 and 10Size, as a percentage of the page
assigned_tostringsigner_1, signer_2, … — the first to sign, the second, … — or a signer's email address
requiredboolean, default trueFor a kind the signer answers, whether they must; for a checkbox, whether they must tick it
filled_bystring, default signersender for a field you fill in before sending: a text or date_input field, given by its merge_key in prefill when you prepare an envelope. It is printed on the document before anyone signs, shown to signers as filled in by you, and is no signer's: it takes no assigned_to, and field_mapping cannot name it. Any other kind is refused. Every field answers with filled_by
merge_keystring or nullA sender field's name, 1 to 40 lower-case letters, digits and underscores, starting with a letter (client_name). Several fields may share one, and one value fills them all; they must be the same kind. A signer's field has none

POST /api/v1/templates/{template_id}/fields/batch

Replace all of a template's fields with the array in the body (each shaped as above).

PUT /api/v1/templates/{template_id}/fields/{field_id}

Change a field. Send only what changes.

DELETE /api/v1/templates/{template_id}/fields/{field_id}

DELETE /api/v1/templates/{template_id}

By a person in the console, or with a test key for a template a test key made (on any other, 403, test_key_template_not_its_own). A client's key is answered 403, client_route_not_allowed: a client changes a template's fields, and does not delete the template.

Deleting a template does not affect envelopes already made from it. Each envelope keeps its own copy of the document, taken when the envelope is created.

Envelopes

POST /api/v1/envelope/create-from-template

Prepare an envelope. Answers 201 with the envelope, as a draft, and warnings: a list, empty when there is nothing to say. Each {"code": "fields_without_signer", "for", "fields", "message"} names template fields no signer of this envelope will fill — fields for signer_3 when there are two signers, or mapped to an address that is not a signer. They are left empty; the envelope is still created. no_fields says no field is for any signer, so nothing they sign will appear on the document; signer_without_signature names a signer (for is their address) with no signature field. Both are warnings, and the envelope is still created. A draft with no_fields cannot be sent: the console refuses it (send), as it refuses a draft with no signers. The other warnings never stop a send.

FieldTypeMeaning
template_idstring, requiredOne of your templates
signersarray, required, 1 to 25Each {"email", "name", "order"}. An empty list is refused 422: an envelope nobody signs could never be sent. Optionally, what a signer is asked for when they open their link: access_code, 4 to 32 characters you give them another way, kept only as a one-way hash and never shown again; and email_code, true to email them a six-digit code then, valid for 10 minutes. After 5 wrong codes their link locks, and you are emailed: Resend signing email gives them a new one. An access code from an agent is refused 400 access_code_not_for_agents: an agent may ask for email_code only
document_namestringWhat signers see; defaults to one naming the template
sender_namestringWho is asking. Emails come from CoreSign and show this name. A signer's reply goes to your account's email address — sender_email is no longer read
messagestringA note for the signers
expire_daysinteger, 1 to 3650, default 7How long signers have, counted from when it is sent
remindersbooleanEmail the signer whose turn it is a reminder 3 days after their last email, at most 3 times, and once more when 2 days are left. Default: your account's setting (Profile), which starts on. Turn it off here, or later with /api/v1/envelope/reminders
copiesarrayOptional: people sent the signed document and its certificate when everyone has signed, each {"email", "name"}. They sign nothing and are sent nothing before, so a voided or declined envelope never reaches them. Signers and copies together are at most 25: more is refused 400 too_many_recipients. A copy at an address that signs is refused 400 copy_is_a_signer (they are sent it anyway), and one address twice copy_given_twice. Each copy is named on the certificate and in the sealed record. An agent cannot add copies yet: 400 copies_not_for_agents
viewersarrayOptional: people who may READ the document while it is being signed, each {"email", "name"}. Each is emailed a link at send that reads it until the envelope completes, is voided, declined or expires; they are then sent the finished copy, as a copy is. They sign nothing and take no turn. They count with signers and copies toward the 25, and meet the same refusals (copy_is_a_signer, copy_given_twice, copies_not_for_agents). Each viewer, and how many pages they read, is on the certificate and in the sealed record
field_mappingobjectOptional: {field_id: signer_email}, overriding a field's assigned_to
prefillobjectOptional: {merge_key: value} for the template's fields you fill in before sending (filled_by: sender), each a string: one line of at most 200 characters for text (and its preset, if it has one), YYYY-MM-DD for date_input. The values are printed into the envelope's copy of the document before anyone signs, shown to signers, sealed (the record's prefilled and prefilled_values_sha256) and listed on the certificate as yours, never as a signer's answers. Refused 400, saying which: a key the template has no field for, a required value missing, or a value of the wrong form. With an Idempotency-Key, different values are a different request. The answer's prefilled lists the values kept, each {"merge_key", "label", "value"} (and "kind": "date_input" for a date) in the document's order, [] when there are none: check it if your values matter
brand_namestringThe name at the top of the signing page and emails (Pro and Business). Your account's colour and logo, set in the console, go with it
client_profile_idstringOptional: one of your client profiles, cli_…, as its page in the console (Clients) shows it. The envelope is kept in that client profile's history; nothing else changes, and the signers are the ones you send. One that is not yours is refused 400, as an unknown template is

Signing goes in steps. A signer's order is their step. Everyone at a step is asked at once and signs in any order; the next step starts when they all have. The steps must run 1, 2, 3 with no gap, any number of signers on each, and one address signs once per step — or give no orders, and they sign one after another in the order listed. Anything else is refused with 400, saying which rule. A field for signer_N is filled by the Nth signer once they are sorted by step (in the order listed, within a step): their position.

curl -X POST https://sign.coresignapp.com/api/v1/envelope/create-from-template \
  -H "Authorization: Bearer $CORESIGN_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: acme-services-1042" \
  -d '{"template_id": "tpl_…", "document_name": "Services agreement — Acme",
       "signers": [{"email": "buyer@example.com", "name": "Sam Buyer"},
                   {"email": "cfo@example.com", "name": "Lee Approver"}]}'

The envelope carries envelope_id, document_name, status, current_order (the open step: everyone at it who has not acted is being waited on; 0 before it is sent and once it is done), sender_name, sender_email, brand_name, brand_accent and brand_logo (the colour, #rrggbb, and the SHA-256 of the logo its signers' pages and emails show, each null for CoreSign's; Pro and Business set them in the console, and a document keeps those it was created with), chain_seal (set once sealed), created_at, updated_at, expires_at and signers — each with email, name, order (their step), position (their place, 1 to N, as above), action (awaiting, signed or declined) and signed_at. This answer, the status and the list also carry client_profile_id, the client profile it was made for, or null, and origin, null for an envelope made in the console or through the API, and recurring for a draft one of your recurring schedules prepared (schedules are set up in the console; a person sends each draft there), and batch for one a batch sent; the status also carries the client profile's name, client_profile_name, for a recurring draft recurring_schedule_id and recurring_on, the date it was prepared for, and for a batch's envelope batch_id and batch_reference, its row's reference.

A client's draft waits for a person. When a client prepared it (any request with a client's key, Bearer or signed), the envelope also carries prepared_by_agent_id, the client's id, and approval_state: awaiting until a signed-in person sends it (then approved) or rejects it (then rejected, with rejected_at and rejected_reason — read them to learn why). For an envelope a person made, or a test key, all four are null. The account holder is emailed that drafts are waiting, at most once every 10 minutes; the email links to the console and approves nothing.

Retrying safely. Send an Idempotency-Key header — a value you choose, 1 to 255 visible characters, one per envelope you mean to make. A retry with the same key and the same body within 24 hours is answered 200 with the envelope the first request made, "replayed": true and the header Idempotent-Replayed: true. Nothing new is created, and it does not count toward the limit on creating envelopes. It is still a request: by a client's key it counts toward that client's 600 requests per 15 minutes, as every request does. The same key with a different body is refused 409, {"error": "idempotency_key_reused"}; while the first request is still running, 409, idempotency_key_in_flight — retry in a few seconds. Keys are your account's alone, and deleting a draft frees its key. An empty Idempotency-Key is refused 400, as is one with a space or over the length — it is never read as "no key". To send no key, leave the header out. Without the header, a retry after a timeout can make a second envelope: list your drafts and delete the extra one.

POST /api/v1/envelope/create

For signed-in people, not keys. With a key, prepare every envelope from a template, with create-from-template above. A client's key is answered 403, client_route_not_allowed (Authentication); a test key, 403, test_key_route_not_allowed.

POST /api/v1/envelope/send

Not with a key. Sending needs a signed-in person, from the envelope's page in the console. A client's key is answered 403, client_route_not_allowed; a request a client signs, 403, human_authorisation_required (agents); a test key, 403, test_key_route_not_allowed.

What is not sent. A draft that gives nobody anything to sign. A draft with no signers is refused 400, {"detail": {"error": "no_signers", "message": …}}, and a draft where no field is for any of its signers, 400, no_fields, the code that draft's warnings carried. Either stays a draft: delete it, and prepare it again. Any other warning is shown to the person, and the draft can be sent.

GET /api/v1/envelope/status/{envelope_id}

The envelope, plus current_signer (the first still to sign at the open step, or null), current_signers (everyone still to sign there, each {"email", "name", "order", "position"}; one unless signers share the step) and audit_trail — its history, each event with event_type, actor, ip_address and created_at. viewers lists each viewer as {"email", "name", "link_sent_at", "opened_at", "pages_read", "sent_at"}. copies lists each copy as {"email", "name", "sent_at", "email_delivery"}, sent_at null until everyone has signed; [] when there are none. Each signer carries field_values: their answers to the fields they answer, [{"field_id", "question", "value"}], empty until they sign. Every value is a string: a checkbox is checked or not checked, a number its plain decimal ("7.5"), a date_input YYYY-MM-DD; every kind but text also carries kind. Each signer also carries attachments, the files they attached to attachment fields, [{"field_id", "name", "type", "bytes", "sha256"}], [] until they sign; download each from /api/v1/envelope/attachments/{envelope_id}/{field_id}. A signer who declined carries decline_reason, their own words as they typed them ("" when they gave none), and declined_at; both are null for everyone else. Show the reason as text, never as markup. reminders is {"on", "next_kind", "next_at", "sent", "max"}, as /api/v1/envelope/reminders answers. warnings is the list create-from-template answers, for the envelope as it is now, and send_refusal is the {"error", "message"} a send of this draft would be refused with, or null — always null once it is not a draft. 404 if it is not yours.

Each signer also carries email_delivery: what became of the newest email asking them to sign (the first, their turn, a resend, a reminder or the "expires soon" email), as {"state", "at"}, or null before one was sent. state is queued (about to go), sent (our email provider took it), delayed (the provider is still trying), delivered (their mail server took it — not a promise that they have seen it), bounced, suppressed (not sent, because the address bounced or complained before), failed or complained (marked as spam), and at is when it got there. It only moves forward in that order, so a late report never hides a bounce. The signed copy and the withdrawal notice are recorded too, in audit_trail only, as email_bounced when one does not arrive.

Signed by an agent. A request an agent signs reads only a draft that agent prepared, and gets the narrow answer an agent gets through MCP: {"ok", "envelope_id", "status", "current_order", "approval_state", "rejected_reason", "signers": [{"email", "order", "action"}]} — whether its draft is still waiting, was sent, or was rejected and why. Nothing else: no history, no IP addresses, no answers. Any other envelope — one a person made, another client's, or one that does not exist — answers 404 with the same body as a missing one. A signed-in person, and a client's key used as a Bearer token, get the full answer above.

GET /api/v1/envelope/attachments/{envelope_id}/{field_id}

The file a signer attached to an attachment field, once it is part of their signature, as a download: its type (application/pdf, image/jpeg or image/png) and its name. Your account only: a viewer's or a copy's link never reaches it, and it is never emailed. A photo is the one CoreSign kept, re-saved without its hidden data, so its sha256 in the envelope's status is of this file. 404 if the envelope is not yours, or nothing is part of a signature there yet.

GET /api/v1/envelope/list

Your envelopes, newest first, a page at a time: {"ok", "count", "total", "offset", "totals", "awaiting_approval", "envelopes": [{envelope_id, document_name, status, created_at, updated_at, approval_state}]}. Query: status to filter (or status=awaiting_approval for the drafts an agent prepared that wait for a person; awaiting_approval counts them), limit (default 20, at most 200) and offset to page. count is the envelopes in this response, total how many match the filter, and totals every envelope you have, counted by status.

client_profile_id (cli_…) lists only the envelopes made for that client profile, with the other filters as usual; total then counts those, and totals is still every envelope you have. A client profile that is not yours is 404, "Client profile not found", as an unknown one is. Each envelope carries client_profile_id and origin, as above.

batch_id (bat_…) lists only the envelopes a batch sent, in the same way: one that is not yours is 404, "Batch not found".

Each envelope also carries email_problem: the worst of its signers' email_delivery states that needs attention — delayed, bounced, suppressed, failed or complained — or null.

GET /api/v1/envelope/audit/{envelope_id}

Just the history: {"ok", "count", "events": [...]}.

The next three are a person's, from the envelope's page in the console: a client's key is answered 403, client_route_not_allowed, and a test key 403, test_key_route_not_allowed.

POST /api/v1/envelope/resend-verification

Email everyone still to sign at the open step their signing link again, each a new one. Body {"envelope_id"}, or {"envelope_id", "signer_email"} for one of them; an address not waiting at the step is refused 400. At most 3 per envelope in 15 minutes, however many it emails. The answer says whether every email went, email_sent, and who was emailed, sent_to. An envelope past its expiry is refused (400): there is nothing left to sign.

POST /api/v1/envelope/reminders

Turn automatic reminders on or off for an envelope awaiting signatures. Body {"envelope_id", "on"}. Reminders go once a day, at 14:00 UTC: to each signer still to sign at the open step, 3 days after their own last email (a resend counts), at most 3 times, and once more when 2 days are left. The answer carries reminders: {"on", "next_kind", "next_at", "sent", "max"} — next_at is when the next one will go, or null when none will before the envelope expires. A completed, declined, voided or expired envelope is refused (400).

Expiry. When an envelope's time runs out before everyone has signed, the next daily run marks it expired and emails its sender once, saying who signed and who did not.

POST /api/v1/envelope/void

Withdraw a sent envelope that is not complete. Body {"envelope_id", "reason"}; the reason is required, at most 500 characters. Every signing link stops working, and everyone it was sent to is emailed that it was withdrawn, with your reason. The answer carries signers_notified and signers_not_notified, and for the viewers whose read link went, who are told too, viewers_notified and viewers_not_notified. A draft is deleted, not voided (409).

POST /api/v1/envelope/delete

Delete a draft and everything attached to it. Body {"envelope_id"}. A sent envelope is never deleted (409) — void it. A client's key deletes only a draft that client prepared; a test key, only a test envelope.

POST /api/v1/envelope/reject-draft

Not with a key. A signed-in person rejects a draft an agent prepared, from the envelope's page in the console. Body {"envelope_id", "reason"}; the reason is required, at most 500 characters, and the agent can read it. Nothing is sent to anyone, and a rejected draft can never be sent: delete it, or prepare a new one. Only a draft whose approval_state is awaiting can be rejected (409 otherwise). A client's key is answered 403, client_route_not_allowed, and a test key 403, test_key_route_not_allowed, as for send.

Batches (Business)

A batch is one template and up to 500 rows, each row one envelope's signers and the values you fill in before sending. It is prepared (every row checked, the whole list bound by one hash, manifest_sha256), then confirmed by a person, the account's owner or an admin, signed in to the console with their password, and only then sent, at a pace: at most 25 envelopes in each 15-minute window, which leaves the rest of the account's own send limit to the people on it, 500 a day (UTC) and 2000 a month. An account sends from one batch at a time. Bulk send is switched on for an account by CoreSign: until it is, every route here answers 404, "bulk sending is not available".

A client's key prepares; a person sends. A registered client's key may prepare a batch, read them and cancel one it prepared, within its grant: the template must be in the grant, every address in every row at one of its recipient domains, and every row counts against its daily prepare cap, as a draft does (grant_daily_cap_reached, 429, with Retry-After). No key confirms a batch.

GET /api/v1/batches/columns

Query template_id. The CSV header for that template: signer_N_email and signer_N_name for each signer it addresses, one column per merge key, then the optional document_name and reference. A template a batch cannot use is 422, saying why.

POST /api/v1/batches

Prepare a batch. From a key, a JSON body: {"template_id", "rows": [{"signers": [{"email", "name"}, …], "values": {"merge_key": "text", …}, "reference", "document_name"}], "message", "expire_days", "reminders"}, every value text; the console sends the same as a CSV file (multipart/form-data, file). Every row is checked as create-from-template checks an envelope, and an address that bounced or complained in an earlier email of the account refuses its row. A batch with any problem is refused whole, 400 batch_refused, listing every problem: {"row", "column", "message"}, where row counts as a spreadsheet's rows do (the first row is 2) and, for JSON, index is its place in your list, from 0. Nothing is kept. At most 5 prepared batches at once (409 batch_limit_reached). An Idempotency-Key answers a retry with the batch it made (200, "replayed": true). 201 with the batch and its first rows. Nothing is sent. A prepared batch lapses after 7 days.

GET /api/v1/batches

The account's batches, newest first, without their rows: {"ok", "count", "total", "offset", "batches": [...]}. Each carries batch_id, status (prepared, confirmed, sending, paused, sent, cancelled or expired), row_count, to_send, manifest_sha256, prepared_via (session or key), prepared_by_client, confirmed_at and, while paused, pause_reason (template, plan, confirmer, monthly_cap, guard or lapsed) and pause_words.

GET /api/v1/batches/{batch_id}

One batch: as in the list, with counts (its rows by state: ready, sending, sent, failed, skipped, cancelled), template_changed, and its rows a page at a time (limit, offset), each with its envelope_id once sent and any error. Another account's batch is 404, as an unknown one is.

GET /api/v1/batches/{batch_id}/report.csv

Every row as a CSV: row, reference, state, envelope_id, envelope_status, sent_at, signers and error. A cell that a spreadsheet would read as a formula begins with an apostrophe.

POST /api/v1/batches/{batch_id}/cancel

Stop a batch that is prepared, confirmed, sending or paused: no more of its rows are sent, and the signers and values of those rows are deleted at once. Envelopes already sent stay sent; a person voids any of them. A client's key cancels only a batch that client prepared. A finished batch is 409.

POST /api/v1/batches/{batch_id}/confirm

Not with a key. The account's owner or an admin, signed in and verified, confirms a batch from its page in the console, with their password, the number of documents to send typed, and the statement ticked; a paused batch is confirmed again the same way to go on. The confirmation holds for 24 hours: rows not sent by then wait, and the batch pauses (lapsed). A client's key is answered 403, client_route_not_allowed, and a test key 403, test_key_route_not_allowed, as for send.

A batch's envelopes carry origin batch, and their webhook events carry batch_id and reference. Its people get one email when it finishes, pauses or is cancelled, instead of a notice for each envelope that completes.

Signed records

Once an envelope is completed:

GET /api/v1/envelope/signed-document/{envelope_id}

The signed PDF.

GET /api/v1/envelope/certificate/{envelope_id}

The certificate of completion, as a PDF: who signed, when, from where, and how they were identified.

GET /api/v1/envelope/certificate-record/{envelope_id}

The same certificate as JSON.

GET /api/v1/envelope/sealed-payload/{envelope_id}

The sealed record, as JSON — what the offline checker verifies. Keep it with the signed PDF. A test envelope's record carries "is_test": true, inside the seal; a live one's has no such key.

Agents and clients (Essentials, Pro and Business)

Every client registered at Settings → Agents (see Authentication) prepares documents for this account under its own identity: an AI agent, a harness, a script, or your own service. An agent registers with its Ed25519 public key, and the private key never leaves it; a script or an integration needs no key pair. Each gets its agt_… id and an API key of its own, shown once and bound to it. A client prepares; only a signed-in person sends. A draft a client prepares waits for the person, who sends it or rejects it with a reason the client can read (approval_state, rejected_reason on the envelope). A new key for a client, from the same page, ends its old one.

Bearer or signed. A client's key works as a Bearer token on every route a client may use (Authentication), within its grant on the two routes below that prepare, unless the person required signed requests when registering it. A client that must sign can send only signed requests, and a signed request reaches only the three routes below. Agents registered before 5 October 2026 all sign every request.

Signing a request. A signed request carries the agent's own API key, the one issued for it (Authorization: Bearer csk_…), and four headers:

HeaderValue
X-CoreSign-Agentthe agent's agt_… id
X-CoreSign-Timestampnow, UTC, as 2026-10-03T09:00:00Z; within 300 seconds of the server's time
X-CoreSign-Noncea fresh random value of at least 22 characters, never reused
X-CoreSign-Signaturebase64 of the Ed25519 signature over the string below

The signed string is these nine lines, joined by a single line feed, with no line feed at the end: CORESIGN-ED25519-V1; the method in capitals; the path; the query string with its pairs sorted (empty if none); the hex SHA-256 of the exact body bytes sent (of no bytes, for a GET); the timestamp; the nonce; the agent id; the account id (acct_…, from GET /api/v1/auth/me). Do not put agent_id in the body: it is refused, because only the signed header is believed.

Or the standard way: an RFC 9421 signature, in the Web Bot Auth shape (from 24 October 2026). A registered agent may instead sign a request as HTTP Message Signatures (RFC 9421) and the Web Bot Auth draft describe it, with the same key pair and its own API key. This is aligned with an IETF working-group draft, draft-ietf-webbotauth-httpsig-protocol-00, which is not a final standard; nothing here claims compliance with one. CoreSign checks the signature against the key registered here and never fetches a Signature-Agent directory. An RFC 9421 signature counts only on a request that carries an API key: one that an agent's browser puts on every request it makes changes nothing for a page, a signer or a signed-in person. The request carries:

A signer in Python, with the cryptography package:

import base64, hashlib, os, time

def wba_headers(private_key, method, url, api_key, keyid, body=b""):
    """The headers that sign one request the RFC 9421 way. private_key: an Ed25519PrivateKey."""
    created = int(time.time())
    nonce = base64.urlsafe_b64encode(os.urandom(18)).decode().rstrip("=")
    covered = '"@method" "@target-uri" "authorization"'
    lines = [f'"@method": {method}', f'"@target-uri": {url}', f'"authorization": Bearer {api_key}']
    headers = {"Authorization": f"Bearer {api_key}"}
    if body:
        digest = "sha-256=:" + base64.b64encode(hashlib.sha256(body).digest()).decode() + ":"
        covered += ' "content-digest"'
        lines.append(f'"content-digest": {digest}')
        headers["Content-Digest"] = digest
    params = (f'({covered});created={created};expires={created + 60};nonce="{nonce}"'
              f';keyid="{keyid}";tag="web-bot-auth"')
    lines.append(f'"@signature-params": {params}')
    signature = private_key.sign("\n".join(lines).encode())
    headers["Signature-Input"] = f"sig1={params}"
    headers["Signature"] = "sig1=:" + base64.b64encode(signature).decode() + ":"
    return headers

What a signed request may call: POST /api/v1/envelope/create-from-template and POST /api/v1/templates/from-text, which prepare, within the grant; and GET /api/v1/envelope/status/{envelope_id}, which reads only a draft the agent itself prepared and answers it narrowly (the status), 404 for any other. Anything else answers 403, route_not_agent_reachable, except a signed request to /envelope/send, which answers human_authorisation_required. Both are answered before any route runs, so their body is the refusal itself, {"error", "message"} at the top level, not inside detail as a route's refusal is. Unsigned, a client's request there is refused as on any route a client may not use (Authentication).

The grant. The person decides what each client may prepare: which templates (a grant that names templates also limits which ones the client may change, and lets it add none), which recipient domains (for signers, copies and viewers alike), how many drafts a day (default 50), and until when, whether it signs or not. Each client also has its own limit of drafts per 15 minutes, inside the account's, and its own limit of requests. Changing a grant, like resuming a suspended client, takes the person's password and is emailed to the account (Authentication).

StatuserrorWhen
400malformed_agent_headersa header missing or malformed
400agent_id_in_bodythe body names an agent
400signature_input_malformedRFC 9421: Signature-Input or Signature missing or malformed, not exactly one web-bot-auth signature, or a required parameter missing
400unsupported_algorithmRFC 9421: an alg other than ed25519
400component_not_supportedRFC 9421: a covered component not read here
400component_not_coveredRFC 9421: a component it must cover is left out
400two_signature_shapesthe X-CoreSign-* headers and an RFC 9421 signature together
401signature_expiredRFC 9421: expires has passed, or is more than the window after created
401keyid_mismatchRFC 9421: keyid is not the thumbprint of the key registered for this API key's agent
401content_digest_mismatchRFC 9421: the body is not the one Content-Digest describes
401timestamp_outside_windowthe clock is off; the answer carries server_time
401unknown_or_revoked_agentno such agent, or revoked
401signature_invalidthe signature does not verify over this request
403agent_account_mismatchthe agent is not this key's account's
403agent_suspendeda person suspended the agent
403agent_key_not_boundthe request carries a key that is not the one issued for this agent
403agent_key_requires_signaturethe key of a client that must sign, used without its signature
403client_over_allowancethe client is beyond the active clients the plan includes
403grant_template_not_allowed, grant_recipient_domain_not_allowed, grant_expired, grant_missing, grant_templates_fixedoutside the grant
409replay_detectedthe nonce was used before
429grant_daily_cap_reachedthe agent's documents for today (UTC) are used: its drafts and every row of the batches it prepared

MCP clients, through a person's consent

An MCP client (an AI assistant, or your own) needs no key pair: a person connects it. Point it at /mcp on this service. It finds the authorisation server from the resource's metadata (/.well-known/oauth-protected-resource/mcp), and the server's own at /.well-known/oauth-authorization-server. OAuth 2.1, public clients only:

Through MCP an agent can see templates and the fields their PDFs appear to ask for, make templates from text, prepare drafts, read the drafts it prepared, who signed them and what they entered and, once completed, their signed records, and check any seal or fingerprint as /verify does. Where a person allows it, it can read a document's text. It can never send.

Limits. Every request at /mcp — initialize, ping and tools/list as much as tools/call — counts toward the client's 600 requests per 15 minutes, with the X-RateLimit headers. Past it, the answer is a JSON-RPC error with HTTP status 429 and Retry-After, its data carrying "error": "client_rate_limited" and retry_after in seconds. Tool calls also have their own 120 per 15 minutes within it; past that, the call's result says so (isError).

Webhooks (Business)

Instead of asking, a Business account can be told: CoreSign sends a JSON POST to your server when one of its envelopes changes, within about a minute. Add up to 3 addresses at Settings → Webhooks. Each address is given a signing secret, shown once.

Webhooks are managed by a signed-in person, not with a key. An API key cannot add, list, test or remove them: /api/v1/webhooks answers a client's key 403, client_route_not_allowed (Authentication), and a test key 401, {"detail": "this is managed from a signed-in browser session, not with an API key"}.

EventWhen
envelope.sentA person sent it. The first signer's email goes just after, and can fail: the person who sent it is told on the envelope's page, and can resend it
envelope.signedA signer signed. Carries signer: their order and email
envelope.completedThe last signer signed and the envelope is sealed
envelope.declinedA signer declined. Carries signer
envelope.voidedThe sender withdrew it
envelope.draft_rejectedA person rejected a draft an agent prepared. Carries rejected_reason
envelope.signer_email_bouncedAn email to a signer bounced, was suppressed or failed after our email provider took it. Carries signer and email: {"kind", "state"}, where kind is invite, turn, resend, reminder, expiry, completed or voided, and state is bounced, suppressed or failed. Sent for each email that does not arrive
pingYou pressed "Send test event"
{"id": "evt_…", "type": "envelope.signed", "created_at": "2026-09-22T10:00:00Z",
 "envelope_id": "env_…", "status": "signed", "current_order": 2, "is_test": false,
 "signer": {"order": 1, "email": "buyer@example.com"}}

Every envelope event carries is_test: true for a sandbox envelope, whose events are delivered like any other. An envelope a batch sent also carries batch_id and reference, its row's. No document, image or link is ever sent. Read the envelope with your key if you need more.

A payload may gain fields, as a response may (Versioning): ignore the ones you do not use.

Checking that a delivery came from CoreSign

Every delivery carries X-CoreSign-Event-Id and X-CoreSign-Signature: t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of t, a full stop and the raw request body, keyed with the endpoint's secret. Compare in constant time, and refuse a t more than five minutes old:

import hashlib, hmac, time

def is_from_coresign(secret: str, header: str, body: bytes) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    t = int(parts["t"])
    expected = hmac.new(secret.encode(), f"{t}.".encode() + body,
                        hashlib.sha256).hexdigest()
    return abs(time.time() - t) < 300 and hmac.compare_digest(expected, parts["v1"])

Verification

These need no key: anyone holding a document can check it.

GET /api/v1/verification-key

CoreSign's public signing key, with its fingerprint.

GET /api/v1/envelope/verify-seal/{envelope_id}

Checks a completed envelope's seal. It answers 200 whether or not the check passes — read ok. Because it is public, signers' addresses in it are masked — s•••@example.com; match your records by envelope_id, or read the sealed record. When every check ran and passed — ok and complete both true — it also carries signed_document_sha256, the signed PDF's SHA-256 as sealed: compare a copy's SHA-256 with it. A partial or failed check never carries it. certificate_record says whether the certificate record matches the certificate_sha256 the seal covers: "verified"; "mismatch", when it was altered, and ok is false; or "unavailable", when it cannot be read, and complete is false, with "incomplete_reason": "certificate_record_unavailable". A test envelope is answered "test": true with a notice when its sealed record says "is_test": true, whatever its certificate record says, or, for a record sealed before the field existed, only when its certificate record is verified. A record sealed before 10 August 2026 carries no certificate_sha256 and no certificate_record. A completed envelope whose record was deleted under its account's document retention setting answers 410 with {"envelope_id", "deleted": true, "reason": "retention", "sealed_at", "deleted_at"} and nothing else: there is no seal left to check, but CoreSign sealed it. A sealed record you kept still verifies with the offline checker.

POST /api/v1/envelope/verify-document

Is this exact file one CoreSign sealed? Send the SHA-256 of the signed PDF, never the file: {"sha256": "<64 lowercase hex>"}. A match answers 200 with {"found": true, "matches": [...]}, each with envelope_id, sealed_at and the same masked verification as verify-seal, and no document name. When CoreSign sealed exactly this file and its record was later deleted under its account's document retention setting, it answers 200 with {"found": true, "matches": [], "deleted": [...]}, each with envelope_id, sealed_at and deleted_at. No match answers 404 {"found": false}, whatever the reason. A re-saved, printed or scanned copy is a different file and will not match. Limited to 60 checks per network per 15 minutes; to check many files, use the offline checker with --pdf.

GET /api/v1/disclosure/{version}

The electronic-signature disclosure a signer accepted, by the version their certificate names, with its SHA-256. The current version is 2026-08-10.v1. Every version a certificate names stays published, and the answer's current says whether it is the one in use. An unknown version is 404.

GET /api/v1/terms/{version}

The Terms of service an account holder accepted at signup, by version, with its SHA-256. The current version is 2026-10-10. Every version an account holder accepted stays published, and current says whether it is the one in use. An unknown version is 404.

To check a document without asking CoreSign at all, use the offline checker on the sealed record.

Versioning and changes

The version is in the path: every route on this page starts /api/v1, the only version so far.

Security fixes are the exception. When leaving a behaviour in place would put accounts at risk, CoreSign changes it without notice. Each such change is described after it ships.