Developers and AI agents
Send a document for signature from code, or from Claude
Everything a sender can do in Psygned is available through a small REST API and an MCP server. Create an API key in Settings, then let your code or your AI assistant upload the PDF, name the signers and collect the signed copy and certificate. Every document costs 1 credit, exactly as in the app, and produces the same record.
MCP server for Claude and other agents
Add Psygned as a remote MCP server and your assistant gets tools to inspect a PDF or Word file for its signature lines, send it, check who has signed, remind signers and fetch the signed files. Streamable HTTP, JSON responses, no session state.
Claude.ai and Claude Desktop (connector), step by step
- In Claude open Settings, then Connectors, then Add custom connector.
- Name it Psygned and paste the endpoint below as the URL.
- Under Authentication leave what Claude detects (Always required). If it offers None, choose Always required instead; Psygned never works without a sign in.
- Press Add. Claude opens psygned.com, where you sign in if needed and press Allow.
- Back in Claude, start a chat and enable Psygned in the tools menu. Ask for a document to be sent for signature and Claude will use your credits.
No key to copy and nothing to paste into headers. Disconnect it any time from Psygned Settings, Connected assistants; Claude loses access at once.
https://api.psygned.com/v1/mcpClaude Code (either OAuth or an API key)
claude mcp add --transport http psygned https://api.psygned.com/v1/mcp \
--header "Authorization: Bearer psk_live_…"Claude Desktop, Cursor and others (mcp.json)
{
"mcpServers": {
"psygned": {
"type": "http",
"url": "https://api.psygned.com/v1/mcp",
"headers": { "Authorization": "Bearer psk_live_…" }
}
}
}Then simply ask: “Send contract.docx to [email protected] for signature and tell me when she has signed.” Tools: psygned_inspect_document, psygned_send_document, psygned_get_document, psygned_list_documents, psygned_send_draft, psygned_remind_signers, psygned_void_document, psygned_get_files, psygned_get_account. The assistant inspects the file first, sees the signature blocks Psygned found (Signature, Name, Title, Date, Initials, one block per party) and sends with auto_fields, so the fields land on the document's own lines.
Authentication
Send your key as a bearer token. Keys are shown once when created and can be revoked at any time in Settings. Only a hash is stored.
Authorization: Bearer psk_live_…REST API
Base URL https://api.psygned.com/v1. JSON in, JSON out.
| Method | Path | What it does |
|---|---|---|
| GET | /me | Account, credits left, signer limit |
| GET | /documents?status= | List documents with signer status |
| POST | /documents | Create a document from a PDF or Word file and send it (uses 1 credit) |
| POST | /documents/inspect | Find the signature lines in a PDF or Word file: fields, blocks per party and text lines (free, nothing stored) |
| GET | /documents/:id | Status, signers and the event log |
| POST | /documents/:id/send | Send a draft created with send=false |
| POST | /documents/:id/remind | Fresh links for everyone still to sign |
| POST | /documents/:id/void | Cancel while waiting for signatures |
| GET | /documents/:id/files | 15 minute download links for the signed PDF, the certificate and the 2 combined, with their SHA-256 fingerprints |
| GET | /verify?sha256= | Public, no key: is this fingerprint a completed Psygned file, which one, and when (30 checks a minute per address) |
Create and send in one call
curl -X POST https://api.psygned.com/v1/documents \
-H "Authorization: Bearer psk_live_…" \
-H "Content-Type: application/json" \
-d '{
"title": "Consulting agreement",
"file": { "url": "https://example.com/agreement.pdf" },
"signers": [
{ "name": "Jane Doe", "email": "[email protected]" },
{ "name": "John Roe", "email": "[email protected]" }
],
"signing_order": "sequential",
"message": "Please sign by Friday.",
"auto_fields": true
}'The file can be a PDF or a Word (.docx) document, inline as "file": { "base64": "…", "filename": "agreement.docx" } or by URL; Word files are converted with their layout kept, exactly as in the app. With "auto_fields": true Psygned reads the document's own signature lines (Signature, By, Name, Printed Name, Title, Date, Initials), groups them into one block per party and gives each signer a block, by name when a signer's name appears next to it, otherwise in reading order. Call POST /documents/inspect with the same file and signers first to see what it finds; the response carries the fields ready to pass back, and every text line with its position for placing fields by hand.
Fields can also be given one by one, by position or by anchor:
"fields": [
{ "type": "signature", "signer": 0, "anchor": { "text": "By:", "occurrence": 1 } },
{ "type": "date", "signer": 0, "anchor": { "text": "Date:", "occurrence": 1 } },
{ "type": "signature", "signer": 1, "anchor": { "text": "By:", "occurrence": 2 } },
{ "type": "signature", "signer": 1, "page": 2, "x": 0.10, "y": 0.80, "w": 0.30, "h": 0.06 }
]An anchor is a piece of the document's text (case insensitive, with occurrence counted from the start and an optional page); position puts the field to the right of it (default), above, below, or on the text itself, which suits a run of underscores or a white marker such as /sig1/. Text that is not found fails with anchor_not_found. Field type is one of signature, initials, name, date, title or text; pages count from 1; every signer needs at least a signature or initials field. Field positions are fractions of the page measured from the top left, so they work at any page size, rotated and cropped pages included: x 0.10, y 0.70, w 0.30, h 0.06 is a box 10% in from the left and 70% down, 30% of the page wide and 6% tall. Leave w and h out and a signature box is 0.24 by 0.05, any other field 0.16 by 0.03. A page outside the document, a value outside 0 to 1, a zero size or a box that runs off the page is refused with invalid_request before anything is created. At signing, text is sized to the box height and anything longer than the box is cut short rather than spilling onto the page, so the box you send is the space the value gets. To check a layout before spending a credit, create with "send": false, open the draft in the app where every box is shown on the page, then send it;/documents/inspect also returns each page's width and height in points for converting from absolute measurements. A PDF locked by a permissions password is refused with invalid_file. Leave fields out and Psygned places a signature, name and date block for each signer at the foot of the last page. Pass "send": false to save a draft and send it later; unsent drafts are removed after 30 days.
Poll until complete, then download
curl https://api.psygned.com/v1/documents/DOCUMENT_ID -H "Authorization: Bearer psk_live_…"
# … "status": "completed", "files_ready": true
curl https://api.psygned.com/v1/documents/DOCUMENT_ID/files -H "Authorization: Bearer psk_live_…"
# { "signed_pdf": "https://…", "certificate_pdf": "https://…", "signed_with_certificate_pdf": "https://…",
# "final_sha256": "…", "certificate_sha256": "…", "signed_with_certificate_sha256": "…" }
# Anyone can check a copy of any of the 3 files by its SHA-256, no key needed
curl "https://api.psygned.com/v1/verify?sha256=$(sha256sum signed.pdf | cut -c1-64)"
# { "verified": true, "match": "signed_document", "document_id": "…", "completed_at": "…" }Errors
Errors come back as { "error": "code", "message": "…" }. 401 unauthorized, 402 no_credits, 400 invalid_request, invalid_file or anchor_not_found, 422 fields_not_detected (with the blocks that were found), 429 conversion_limit, 404 not_found, 409 for a document in the wrong state. Webhooks are next on the list; until then, poll the document.