squiggli Get a free API key
Reference

MCP server

The tools squiggli gives AI agents, generated from the server itself.

squiggli is a remote MCP server at https://squiggli.billy-965.workers.dev/mcp (Streamable HTTP). Connect with an API key as a bearer token, or with OAuth. Setup for each AI is in Connect your AI. Every tool calls the same API as your code does, so its errors and limits are the same.

Tools

ToolUse it when
squiggli_send_for_signatureUse when the user wants someone to sign a document now: a PDF (documents[].file_base64 or file_url) or a saved template (template_id + variables). Emails each signer a link unless delivery is "link". Set test: true while building or trying things (free, watermarked). Live documents cost $1.00 each ($1.50 white-labelled), after the free ones. Signers with no fields get a signature page added automatically.
squiggli_create_draft_envelopeUse when the user wants to prepare a document to review before sending. Same input as squiggli_send_for_signature; send it later with squiggli_send_envelope.
squiggli_send_envelopeUse when a draft envelope is ready to go out to its signers.
squiggli_get_envelope_statusUse when the user asks whether a document has been opened or signed. Returns the status, each signer's status, when they opened it and from which link (invite, reminder, resend), every field and its value, the deadline and the reminder settings.
squiggli_list_envelopesUse when the user wants to see their documents, e.g. everything still waiting for signatures (status "sent,viewed").
squiggli_get_envelope_activityUse when the user wants the full history of a document: every send, open (with IP and device), reminder, signature, decline and void, in order.
squiggli_remind_signersUse when the user wants to nudge people who haven't signed. Emails each one a fresh link (at most once an hour per signer).
squiggli_update_envelopeUse when the user wants to extend or move a signing deadline, change reminders or metadata, or (for drafts) the title and message.
squiggli_void_envelopeUse when the user wants to cancel a document that has been sent but not completed. Signers are told it was cancelled. This cannot be undone.
squiggli_get_signed_documentUse when everyone has signed and the user wants the signed PDF or the completion certificate. Returns download links that work for a week.
squiggli_list_templatesUse when the user wants to send a standard document (a quote, lease, NDA) and you need its template_id, roles and variables.
squiggli_get_templateUse when you need a template's full content, roles and {{variables}} before sending it or editing it.
squiggli_list_starter_templatesUse before creating a template, to start from a polished design instead of a blank page: statement of work (cover page with a photo, Poppins and Roboto, both parties signing side by side), quote, mutual NDA, service agreement. Returns each design's full blocks and theme, which you can copy and change.
squiggli_create_templateUse when the user wants a reusable, well-designed document (proposal, statement of work, quote, contract). Quickest: { "starter": "statement-of-work", "name": "..." } then change what you need. Or write blocks: cover (full-page title page with optional photo and logo), heading, paragraph (**bold**, *italic*, \n), details (label: value lines), callout (tinted note), table, list, image, divider, spacer, page_break, columns (2 or 3 side by side, e.g. the two parties above their signatures), field and signature (each names the signer role that fills it). theme sets the look: font and heading_font (inter, roboto, poppins, montserrat, open-sans, lora, merriweather, playfair-display, instrument-sans, familjen-grotesk, helvetica), text_color, heading_color, accent_color (hex), font_size, line_height, page_size, margin, header_logo. Put {{variables}} in any text for what changes per send. Afterwards call squiggli_preview_template and give the user the link so they can see it.
squiggli_preview_templateUse when you have created or changed a template and the user should see it. Returns a link to the PDF (valid for an hour), filled with any variables you pass. Show the link to the user.
squiggli_upload_imageUse when a template needs an image squiggli can't download itself (a logo or cover photo the user gave you). Send a PNG or JPEG as base64, or an https URL. Returns an asset id to put in an image block's url or a cover's image_url.
squiggli_update_templateUse when the user wants to change a template: wording, layout or look. Send only what changes: theme merges with the current theme, blocks replaces all the blocks. Then call squiggli_preview_template.
squiggli_create_webhookUse when the user's app needs to know when documents are viewed, signed or completed. Returns a signing secret, shown once: store it and check the Squiggli-Signature header.
squiggli_list_webhooksUse when you need to check which URLs get squiggli events.
squiggli_create_api_keyUse when you are adding squiggli to the user's app and it needs its own key (put it in the app's environment as SQUIGGLI_API_KEY, never in code). mode test for development. Shown once.
squiggli_create_embed_tokenUse when the user's web app should show squiggli's template editor or one envelope inside its own pages. Returns a short-lived token and an iframe URL.
squiggli_get_accountUse when you need to know whether this business can send live documents yet, how many free documents are left, and its prices. If it can't send, give the user add_card_url.
squiggli_get_usageUse when the user asks how many documents they have sent or what this month costs. Billed on their Kiewa statement.
squiggli_get_integration_guideUse before writing code that adds squiggli to the user's app. Returns a complete, copy-ready guide for their stack: sending, embedded signing, webhooks with signature checks, and test mode.

Tool inputs

squiggli_send_for_signature

Send a document for signing.

InputTypeDescription
title requiredstringWhat signers see, e.g. "Harbour Lane lease, unit 4".
messagestringA note to signers, shown in the email and on the signing page.
documentsarray of object
documents[].namestringFile name shown to signers. Defaults to the template name or "Document 1".
documents[].file_base64stringA PDF, base64-encoded. Up to 10 MB.
documents[].file_urlstringAn https link squiggli downloads the PDF from (up to 10 MB).
documents[].template_idstringRender this template (tpl_...) as the document.
documents[].variablesobjectValues for the template's {{variables}}, e.g. {"client.name": "Ava Chen", "rent": "$650 a week"}.
template_idstringShortcut for documents: [{ template_id, variables }].
variablesobjectValues for the template's {{variables}}, e.g. {"client.name": "Ava Chen", "rent": "$650 a week"}.
signers requiredarray of object
signers[].name requiredstring
signers[].emailstringRequired when delivery is email.
signers[].rolestringThe template role this signer fills, e.g. "tenant". Without roles, signers fill the template's roles in order.
signers[].delivery"email" | "link"email: squiggli emails the signing link and reminders. link: no emails; show signing_url yourself or embed it.
signers[].orderintegerSigning order when signing_order is sequential (1 signs first). Defaults to list order.
signers[].access_codestringA code the signer must enter before they can see the document. Give it to them another way (phone, SMS, in person): it identifies them by more than the link. Recommended for delivery "link".
fieldsarray of object
fields[].signer requiredinteger or stringWhich signer fills it: their index in signers[] (0 is the first), their role, or their email.
fields[].documentintegerIndex into documents[]. Default 0.
fields[].type required"signature" | "initials" | "date_signed" | "name" | "email" | "text" | "checkbox"
fields[].page requiredinteger1 is the first page.
fields[].x requirednumberPDF points from the left edge of the page (A4 is 595 x 842 points).
fields[].y requirednumberPDF points from the top edge of the page.
fields[].widthnumberPoints. Defaults by type: signature 200, initials 60, checkbox 14, others 160.
fields[].heightnumberPoints. Defaults by type: signature 50, initials 32, checkbox 14, others 22.
fields[].requiredbooleanDefault true, except checkboxes.
fields[].labelstring
fields[].keystringYour own name for the field. Returned with its value in GET /v1/envelopes/{id}.
fields[].valuestringPrefill a text field. The signer can change it.
signing_order"parallel" | "sequential"parallel: everyone gets it at once. sequential: one after another, by order.
deadlinestringSigning deadline (ISO 8601). After it the envelope expires.
deadline_daysintegerDeadline as days from sending, instead of deadline.
remindersfalse or objectAutomatic reminder emails. false turns them off.
reminders.every_daysinteger or nullRemind unsigned signers every N days. null for none. Default 3.
reminders.before_deadline_daysarray of integerAlso remind this many days before the deadline. Default [1].
reminders.maxintegerAt most this many reminders per signer. Default 5.
testbooleanTest envelope: free and unlimited, watermarked "TEST - NOT LEGALLY BINDING". Always true with a sq_test_ key.
whitelabelbooleanNo squiggli name or footer anywhere signers look: your business's name and colour only. $1.50 instead of $1.00.
senderobjectWho signers are told sent it ("Ava Chen sent you..."), and who gets the decline and completed emails. Defaults to the business.
sender.name requiredstring
sender.emailstring
metadataobjectYour own key-value data (up to 20 keys), e.g. {"job_id": "J-1042"}. Returned with the envelope and in webhooks.
redirect_urlstringWhere the signing page sends a signer after they sign.

squiggli_create_draft_envelope

Create a draft envelope.

InputTypeDescription
title requiredstringWhat signers see, e.g. "Harbour Lane lease, unit 4".
messagestringA note to signers, shown in the email and on the signing page.
documentsarray of object
documents[].namestringFile name shown to signers. Defaults to the template name or "Document 1".
documents[].file_base64stringA PDF, base64-encoded. Up to 10 MB.
documents[].file_urlstringAn https link squiggli downloads the PDF from (up to 10 MB).
documents[].template_idstringRender this template (tpl_...) as the document.
documents[].variablesobjectValues for the template's {{variables}}, e.g. {"client.name": "Ava Chen", "rent": "$650 a week"}.
template_idstringShortcut for documents: [{ template_id, variables }].
variablesobjectValues for the template's {{variables}}, e.g. {"client.name": "Ava Chen", "rent": "$650 a week"}.
signers requiredarray of object
signers[].name requiredstring
signers[].emailstringRequired when delivery is email.
signers[].rolestringThe template role this signer fills, e.g. "tenant". Without roles, signers fill the template's roles in order.
signers[].delivery"email" | "link"email: squiggli emails the signing link and reminders. link: no emails; show signing_url yourself or embed it.
signers[].orderintegerSigning order when signing_order is sequential (1 signs first). Defaults to list order.
signers[].access_codestringA code the signer must enter before they can see the document. Give it to them another way (phone, SMS, in person): it identifies them by more than the link. Recommended for delivery "link".
fieldsarray of object
fields[].signer requiredinteger or stringWhich signer fills it: their index in signers[] (0 is the first), their role, or their email.
fields[].documentintegerIndex into documents[]. Default 0.
fields[].type required"signature" | "initials" | "date_signed" | "name" | "email" | "text" | "checkbox"
fields[].page requiredinteger1 is the first page.
fields[].x requirednumberPDF points from the left edge of the page (A4 is 595 x 842 points).
fields[].y requirednumberPDF points from the top edge of the page.
fields[].widthnumberPoints. Defaults by type: signature 200, initials 60, checkbox 14, others 160.
fields[].heightnumberPoints. Defaults by type: signature 50, initials 32, checkbox 14, others 22.
fields[].requiredbooleanDefault true, except checkboxes.
fields[].labelstring
fields[].keystringYour own name for the field. Returned with its value in GET /v1/envelopes/{id}.
fields[].valuestringPrefill a text field. The signer can change it.
signing_order"parallel" | "sequential"parallel: everyone gets it at once. sequential: one after another, by order.
deadlinestringSigning deadline (ISO 8601). After it the envelope expires.
deadline_daysintegerDeadline as days from sending, instead of deadline.
remindersfalse or objectAutomatic reminder emails. false turns them off.
reminders.every_daysinteger or nullRemind unsigned signers every N days. null for none. Default 3.
reminders.before_deadline_daysarray of integerAlso remind this many days before the deadline. Default [1].
reminders.maxintegerAt most this many reminders per signer. Default 5.
testbooleanTest envelope: free and unlimited, watermarked "TEST - NOT LEGALLY BINDING". Always true with a sq_test_ key.
whitelabelbooleanNo squiggli name or footer anywhere signers look: your business's name and colour only. $1.50 instead of $1.00.
senderobjectWho signers are told sent it ("Ava Chen sent you..."), and who gets the decline and completed emails. Defaults to the business.
sender.name requiredstring
sender.emailstring
metadataobjectYour own key-value data (up to 20 keys), e.g. {"job_id": "J-1042"}. Returned with the envelope and in webhooks.
redirect_urlstringWhere the signing page sends a signer after they sign.

squiggli_send_envelope

Send a draft.

InputTypeDescription
envelope_id requiredstringThe envelope (env_...) id

squiggli_get_envelope_status

Get envelope status.

InputTypeDescription
envelope_id requiredstringThe envelope (env_...) id

squiggli_list_envelopes

List envelopes.

InputTypeDescription
statusstringComma-separated: draft, sent, viewed, signed, declined, voided, expired
testboolean
limitinteger
cursorstringnext_cursor from the previous page

squiggli_get_envelope_activity

Get the audit trail.

InputTypeDescription
envelope_id requiredstringThe envelope id

squiggli_remind_signers

Remind signers.

InputTypeDescription
envelope_id requiredstringThe envelope id
signer_idsarray of stringDefault: everyone whose turn it is.

squiggli_update_envelope

Change deadline, reminders or details.

InputTypeDescription
titlestring
messagestring or null
deadlinestring or nullMove or clear the deadline. Works on sent envelopes too.
remindersfalse or objectAutomatic reminder emails. false turns them off.
reminders.every_daysinteger or nullRemind unsigned signers every N days. null for none. Default 3.
reminders.before_deadline_daysarray of integerAlso remind this many days before the deadline. Default [1].
reminders.maxintegerAt most this many reminders per signer. Default 5.
metadataobjectYour own key-value data (up to 20 keys), e.g. {"job_id": "J-1042"}. Returned with the envelope and in webhooks.
redirect_urlstring or null
envelope_id requiredstring

squiggli_void_envelope

Cancel a sent envelope.

InputTypeDescription
envelope_id requiredstringThe envelope id
reasonstring

squiggli_get_signed_document

Get the signed PDF.

InputTypeDescription
envelope_id requiredstringThe envelope id

squiggli_list_templates

List templates.

No inputs.

squiggli_get_template

Get template.

InputTypeDescription
template_id requiredstringThe template (tpl_...) id

squiggli_list_starter_templates

List starter designs.

No inputs.

squiggli_create_template

Create template.

InputTypeDescription
namestringRequired unless you use a starter (its name is the default).
descriptionstring
starterstringStart from a ready-made design (GET /v1/templates/starters), e.g. "statement-of-work". Anything else you send overrides it.
themeobjectHow the document looks. Every setting is optional.
theme.font"helvetica" | "inter" | "roboto" | "poppins" | "montserrat" | "open-sans" | "lora" | "merriweather" | "playfair-display" | "instrument-sans" | "familjen-grotesk"Body font. Default helvetica.
theme.heading_font"helvetica" | "inter" | "roboto" | "poppins" | "montserrat" | "open-sans" | "lora" | "merriweather" | "playfair-display" | "instrument-sans" | "familjen-grotesk"Heading and cover title font. Default: the body font.
theme.text_colorstringBody text. Default #141a2e.
theme.heading_colorstringHeadings. Default: the text colour.
theme.accent_colorstringTable header rules, callout tint, and the cover when it has no background_color.
theme.font_sizenumberBody size in points. Default 11.
theme.line_heightnumberDefault 1.45.
theme.page_size"A4" | "Letter"Default A4.
theme.marginnumberPage margin in points. Default 56.
theme.page_numbersbooleanDefault true. Never on the cover.
theme.header_logobooleanThe business's logo at the top right of every page except the cover.
blocksarray of objectA block document: squiggli lays it out on the page. Text can use {{variables}}.
blocks[].type required"heading"
blocks[].text requiredstring
blocks[].level1 or 2 or 3
blocks[].colorstring
blocks[].align"left" | "center" | "right"
file_base64stringOr a PDF (base64) with fields placed on it.
file_urlstring
fieldsarray of objectFields on the PDF, by role. Only with file_base64 or file_url.
fields[].type required"signature" | "initials" | "date_signed" | "name" | "email" | "text" | "checkbox"
fields[].page requiredinteger1 is the first page.
fields[].x requirednumberPDF points from the left edge of the page (A4 is 595 x 842 points).
fields[].y requirednumberPDF points from the top edge of the page.
fields[].widthnumberPoints. Defaults by type: signature 200, initials 60, checkbox 14, others 160.
fields[].heightnumberPoints. Defaults by type: signature 50, initials 32, checkbox 14, others 22.
fields[].requiredbooleanDefault true, except checkboxes.
fields[].labelstring
fields[].keystringYour own name for the field. Returned with its value in GET /v1/envelopes/{id}.
fields[].role requiredstringSigner role, e.g. "tenant" or "landlord".
rolesarray of objectLabels for the roles the fields use. Worked out from the fields when left out.
roles[].key requiredstringSigner role, e.g. "tenant" or "landlord".
roles[].labelstring

squiggli_preview_template

Preview a template.

InputTypeDescription
template_id requiredstringThe template (tpl_...) id
variablesobjectSample values for {{variables}}. Missing ones show as {{name}}.

squiggli_upload_image

Upload an image.

InputTypeDescription
namestring
file_base64stringPNG or JPEG, base64, up to 4 MB.
file_urlstring

squiggli_update_template

Update template.

InputTypeDescription
namestringRequired unless you use a starter (its name is the default).
descriptionstring
starterstringStart from a ready-made design (GET /v1/templates/starters), e.g. "statement-of-work". Anything else you send overrides it.
themeobjectHow the document looks. Every setting is optional.
theme.font"helvetica" | "inter" | "roboto" | "poppins" | "montserrat" | "open-sans" | "lora" | "merriweather" | "playfair-display" | "instrument-sans" | "familjen-grotesk"Body font. Default helvetica.
theme.heading_font"helvetica" | "inter" | "roboto" | "poppins" | "montserrat" | "open-sans" | "lora" | "merriweather" | "playfair-display" | "instrument-sans" | "familjen-grotesk"Heading and cover title font. Default: the body font.
theme.text_colorstringBody text. Default #141a2e.
theme.heading_colorstringHeadings. Default: the text colour.
theme.accent_colorstringTable header rules, callout tint, and the cover when it has no background_color.
theme.font_sizenumberBody size in points. Default 11.
theme.line_heightnumberDefault 1.45.
theme.page_size"A4" | "Letter"Default A4.
theme.marginnumberPage margin in points. Default 56.
theme.page_numbersbooleanDefault true. Never on the cover.
theme.header_logobooleanThe business's logo at the top right of every page except the cover.
blocksarray of objectA block document: squiggli lays it out on the page. Text can use {{variables}}.
blocks[].type required"heading"
blocks[].text requiredstring
blocks[].level1 or 2 or 3
blocks[].colorstring
blocks[].align"left" | "center" | "right"
file_base64stringOr a PDF (base64) with fields placed on it.
file_urlstring
fieldsarray of objectFields on the PDF, by role. Only with file_base64 or file_url.
fields[].type required"signature" | "initials" | "date_signed" | "name" | "email" | "text" | "checkbox"
fields[].page requiredinteger1 is the first page.
fields[].x requirednumberPDF points from the left edge of the page (A4 is 595 x 842 points).
fields[].y requirednumberPDF points from the top edge of the page.
fields[].widthnumberPoints. Defaults by type: signature 200, initials 60, checkbox 14, others 160.
fields[].heightnumberPoints. Defaults by type: signature 50, initials 32, checkbox 14, others 22.
fields[].requiredbooleanDefault true, except checkboxes.
fields[].labelstring
fields[].keystringYour own name for the field. Returned with its value in GET /v1/envelopes/{id}.
fields[].role requiredstringSigner role, e.g. "tenant" or "landlord".
rolesarray of objectLabels for the roles the fields use. Worked out from the fields when left out.
roles[].key requiredstringSigner role, e.g. "tenant" or "landlord".
roles[].labelstring
template_id requiredstring

squiggli_create_webhook

Create webhook.

InputTypeDescription
url requiredstringPublic https URL that accepts POSTed JSON.
eventsarray of "envelope.sent" | "envelope.viewed" | "envelope.signed" | "envelope.completed" | "envelope.declined" | "envelope.voided" | "envelope.expired"Default: every event.
all_envelopesbooleantrue: every envelope in the business. false (default): only envelopes made with this credential.

squiggli_list_webhooks

List webhooks.

No inputs.

squiggli_create_api_key

Create API key.

InputTypeDescription
name requiredstring
mode"live" | "test"

squiggli_create_embed_token

Create embed token.

InputTypeDescription
scope required"editor" | "envelope"editor: the template editor. envelope: one envelope (build, review and send it).
template_idstringeditor: open this template. Leave out to start a new one.
envelope_idstringRequired for scope envelope.
ttl_secondsintegerDefault 3600.

squiggli_get_account

Get account.

No inputs.

squiggli_get_usage

Get usage.

InputTypeDescription
monthstringYYYY-MM. Default this month.

squiggli_get_integration_guide

Get the integration guide.

InputTypeDescription
stack"node" | "nextjs" | "python" | "php" | "curl"Default node.