Electronic Signature API: REST Developer Guide 2026
Integrating an electronic signature API into your business application has never been more strategic. This developer guide covers authentication, webhooks and eIDAS compliance from A to Z.
Certyneo Team
Editor — Certyneo · About Certyneo
Introduction
Integrating a REST electronic signature API has become an essential prerequisite for development teams in 2026. With over 73% of European companies having digitised at least one contract process (source: IDC European Digital Transformation Report 2025), demand for robust technical integrations is exploding. Whether you're building a LegalTech SaaS, an ERP or an HR platform, understanding how to consume an electronic signature API — OAuth2 authentication, webhook management, eIDAS compliance — directly determines the quality and legal value of your document workflows. This REST developer guide walks you through every step: architecture, authentication, document lifecycle, real-time webhooks and security best practices.
---
Architecture of a REST Electronic Signature API
RESTful Principles and Endpoint Structure
A well-designed REST electronic signature API is built on clearly identified resources and semantic HTTP verbs. The fundamental resources are typically:
- `/documents` — upload, management and retrieval of PDF/DOCX documents
- `/signature-requests` — creation and management of signature requests
- `/signatories` — management of signatories and their identities
- `/audit-trails` — retrieval of certified audit logs
- `/templates` — management of reusable document templates
Each resource exposes standard CRUD endpoints (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) and returns JSON responses with normalised HTTP codes: `200 OK`, `201 Created`, `400 Bad Request`, `401 Unauthorized`, `422 Unprocessable Entity`, `429 Too Many Requests`.
A critical aspect often overlooked: pagination management. Mature APIs use cursor-based patterns rather than offset/limit, which guarantees stable performance even with thousands of signed documents. Check that the target API exposes an `X-Next-Cursor` header or a `next_page_token` field in the body.
API Versioning and Backwards Compatibility
Versioning is a major concern for integrators. The two dominant approaches in 2026 are:
- URL-based versioning: `https://api.certyneo.com/v2/signature-requests` — readable, cacheable by CDNs, recommended for B2B APIs.
- Header-based versioning: `Accept: application/vnd.certyneo.v2+json` — architecturally cleaner but less visible.
Favour providers who commit to a minimum deprecation policy of 12 months and publish a public changelog. Unannounced breaking compatibility in your signature workflow can have direct legal consequences (unsigned contracts, missed deadlines).
---
OAuth2 Authentication and API Call Security
OAuth2: client_credentials vs authorization_code Flows
Authentication is the cornerstone of any electronic signature API integration. The two most relevant OAuth2 flows for developers are:
Client Credentials Flow (M2M — Machine to Machine): ``` POST /oauth/token Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials &client_id=YOUR_CLIENT_ID &client_secret=YOUR_CLIENT_SECRET &scope=documents:write signature_requests:write audit_trails:read ``` This flow is ideal for server-to-server integrations where no end user is involved in authentication (batch processing, contract automation).
Authorization Code Flow + PKCE: recommended when your application acts on behalf of an identified end user. PKCE (Proof Key for Code Exchange) has been mandatory since RFC 7636 and protects against interception attacks.
Essential security tips:
- Store `client_secret` in a vault (HashiCorp Vault, AWS Secrets Manager) — never in an unencrypted environment variable
- Implement automatic token rotation with a 60-second buffer before expiry
- Use granular scopes: only request permissions strictly necessary
API Key Management and Rate Limiting
For lightweight integrations or test environments, some APIs offer static API keys (Bearer Token). If you use them in production, systematically apply:
- Quarterly key rotation
- IP restriction (allowlist)
- Monitoring of abnormal calls via your SIEM
Rate limiting is an inescapable reality: electronic signature APIs typically limit between 100 and 1000 calls/minute depending on plan. Implement an exponential retry mechanism with jitter: ``` retry_delay = base_delay * (2^attempt) + random_jitter ``` Scrupulously respect the `Retry-After` header returned with `429 Too Many Requests`.
---
Document Signature Request Lifecycle via API
Creation and Configuration of a Signature Request
The lifecycle of a signature request via REST API follows a state schema (`draft` → `pending` → `in_progress` → `completed` | `declined` | `expired`). Here are the detailed technical steps:
Step 1 — Document Upload: ``` POST /v2/documents Content-Type: multipart/form-data
file=@contrat.pdf ``` Response: `{ "document_id": "doc_a1b2c3", "checksum_sha256": "e3b0c442..." }`
Step 2 — Creating the Request: ```json POST /v2/signature-requests { "document_id": "doc_a1b2c3", "name": "Service Contract Q3 2026", "signatories": [ { "email": "signatory@client.com", "first_name": "Marie", "last_name": "Dupont", "signature_level": "advanced", "fields": [{ "type": "signature", "page": 3, "x": 120, "y": 680 }] } ], "expiry_date": "2026-06-05T23:59:59Z", "reminder_settings": { "enabled": true, "frequency_days": 3 } } ```
Step 3 — Activation: `POST /v2/signature-requests/req_x9y8z7/activate`
From activation onwards, signatories receive their invitations and the request moves to `in_progress` state.
Retrieving the Signed Document and Audit Trail
Once the `completed` status is reached (detectable via webhook — see next section), retrieve:
``` GET /v2/signature-requests/req_x9y8z7/document/signed → Signed PDF with embedded electronic signatures (PAdES-B-T per ETSI EN 319 132)
GET /v2/signature-requests/req_x9y8z7/audit-trail → Certified audit trail PDF (qualified timestamping RFC 3161) ```
Always store both files together in your ECM or DMS. The audit trail is the evidence that can be opposed in case of legal challenge.
---
Webhooks: Real-Time Events and Error Handling
Webhook Configuration and Securing
Webhooks transform your integration from expensive polling into a reactive event-driven architecture. Configure your webhook endpoint:
``` POST /v2/webhooks { "url": "https://your-app.com/hooks/certyneo", "events": [ "signature_request.completed", "signature_request.declined", "signatory.signed", "signature_request.expired" ], "secret": "whsec_your_hmac_secret" } ```
Mandatory HMAC securing: validate each incoming payload by comparing the HMAC-SHA256 signature calculated with the `X-Certyneo-Signature` header: ```python import hmac, hashlib
def verify_webhook(payload: bytes, secret: str, signature_header: str) -> bool: expected = hmac.new( secret.encode(), payload, hashlib.sha256 ).hexdigest() return hmac.compare_digest(f"sha256={expected}", signature_header) ``` Never use a standard string comparison — vulnerable to timing attacks.
Idempotence and Redelivery Handling
Webhooks can be redelivered in case of timeout or 5xx error from your endpoint. Implement idempotence mandatory:
- Extract the unique `event_id` from each webhook payload
- Check in the database if this `event_id` has already been processed
- Return `200 OK` immediately (even for duplicates) to prevent infinite redeliveries
- Process business logic asynchronously (queue: Redis, RabbitMQ, SQS)
Golden rule: your webhook endpoint must respond in less than 5 seconds. Any heavy business processing (email sending, ECM archiving, ERP notification) must be delegated to an asynchronous worker.
To deepen your understanding of signature levels available via API, consult our comprehensive electronic signature guide which details the differences between simple, advanced and qualified signatures.
---
Integration Best Practices and Performance
Sandbox Environments and Testing Strategy
Any serious electronic signature API offers an isolated sandbox environment separate from production. Adopt this testing strategy:
- Unit tests: mock API responses (Wiremock, MSW) to validate your business logic without network dependency
- Integration tests: run against the real sandbox to validate the complete lifecycle (creation → signature → retrieval)
- Load tests: simulate simultaneous request spikes to identify bottlenecks before going live
- Chaos tests: simulate timeouts and 5xx errors to validate your retry logic
Never test in production with real signatory identities. Electronic signatures created in sandbox have no legal value, which is exactly what you want for your tests.
Monitoring, Observability and Alerting
In production, instrument your integration with:
- Metrics: API call success rate, p95/p99 latency, error rate per endpoint
- Distributed traces: propagate `trace-id` in your headers to correlate your logs with the API provider's logs
- Alerting: trigger an alert if error rate exceeds 1% or p99 latency exceeds 3 seconds
Consult our comparison of electronic signature solutions to assess the availability SLAs (uptime) offered by different providers — a criterion often underestimated during API integration.
If you're migrating from another platform, our guide on how to migrate from DocuSign or YouSign to Certyneo covers technical aspects of API migration and compatibility of existing webhooks.
To estimate the return on investment of your integration, use our electronic signature ROI calculator which incorporates productivity gains from API automation.
Finally, if you want to go further in automated document generation for signing, discover our AI contract generator which natively interfaces with our REST API.
Legal Framework Applicable to Electronic Signature API
Integrating an electronic signature API is not just a technical matter: it directly engages the legal responsibility of the editor and its clients on several fundamental texts.
eIDAS Regulation No. 910/2014 and eIDAS 2.0
Regulation (EU) No. 910/2014 (eIDAS) establishes the legal framework for electronic signatures in the European Union. It distinguishes three levels:
- Simple electronic signature (SES): minimal legal value, suitable for low-risk acts
- Advanced electronic signature (AES): uniquely linked to the signatory, created from data under their exclusive control — article 26 eIDAS
- Qualified electronic signature (QES): equivalent to a handwritten signature throughout the EU — article 25 §2 eIDAS
With the progressive entry into force of the eIDAS 2.0 regulation (EU Regulation 2024/1183), developers must anticipate the integration of European Digital Identity Wallets (EUDIW) into their authentication flows. Consult our eIDAS 2.0 guide for detailed technical implications.
French Civil Code — Articles 1366 and 1367
Under French law, article 1366 of the Civil Code states that "electronic writing has the same probative force as writing on paper, provided that the person from whom it originates can be duly identified and it is established and preserved in conditions likely to guarantee its integrity".
Article 1367 specifies the conditions for reliable electronic signature: signatory identification and document integrity guarantee. These requirements translate technically into the obligation to preserve certified audit logs and proof of identity used during signing — elements that your API must expose and that you must store.
ETSI EN 319 132 Standards — PAdES
The mandatory technical format for PDF signatures compliant with eIDAS is PAdES (PDF Advanced Electronic Signatures), defined by ETSI EN 319 132 standard. Your API must produce at least PAdES-B-T signatures (with timestamping), and PAdES-B-LT or PAdES-B-LTA to guarantee long-term validity (archiving 10+ years).
GDPR No. 2016/679 — Signatory Data
Personal data collected during the signature process (name, surname, email, IP address, identity data for AES/QES) constitutes personal data subject to GDPR. Your obligations as a data controller or processor include:
- Define a retention period justified (typically aligned with limitation periods: 5 years under general law)
- Provide an automatic purge mechanism via API (`DELETE /v2/signature-requests/{id}/personal-data`)
- Document processing in your records of processing activities (article 30 GDPR)
- Conclude a DPA (Data Processing Agreement) with your signature API provider
NIS2 Directive and Service Continuity
For software editors qualified as essential or important entities under the NIS2 Directive (2022/2555), integrating a third-party API creates a dependency that must be documented in your analysis of supply chain cybersecurity risks. Require your API provider to provide SOC 2 Type II certification and an uptime SLA ≥ 99.9%.
Usage Scenarios: Electronic Signature API in Practice
Scenario 1 — Supplier Contract Automation in an Industrial SME
An industrial SME managing approximately 200 supplier contracts per year wanted to eliminate back-and-forth paper and manual reminders that consumed 2 days per month of administrative assistant time. The development team integrated the REST electronic signature API directly into their business ERP via the following flow:
- Upon validation of a purchase order in the ERP, a `POST /v2/signature-requests` call is automatically triggered
- The generated PDF contract is uploaded and a signature request is sent to the referenced supplier contact
- A `signatory.signed` webhook updates the purchase order status in real time
- The signed document and audit trail are automatically archived in the ECM via a second API call
Observed results (range from sector reports KPMG/IDC 2024-2025): reduction in average signature time from 8 days to less than 24 hours, estimated savings of 60-70% of administrative time devoted to reminders, and zero document loss.
Scenario 2 — LegalTech Platform for Law Firms
A software editor developing a SaaS solution for law firms with 5 to 30 staff integrated the electronic signature API to enable end users to have mandates, fee agreements and procedural documents signed directly from the firm's interface.
The technical architecture chosen uses the OAuth2 Authorization Code + PKCE flow so that each solicitor authenticates requests in their own name. `signature_request.completed` webhooks automatically trigger deposit of the signed document into the client file of the legal ECM.
The editor particularly valued the availability of advanced electronic signatures (AES) via API — the level required for fee agreements according to the recommendations of the National Council of Bars. The initial integration development time was approximately 3 weeks for a senior backend developer, with 85% test coverage.
Scenario 3 — Digital Onboarding in a Group of Private Clinics
A group of private clinics with approximately 600 beds needed to dematerialise informed consent forms and admission contracts, previously printed and manually signed at reception — generating printing costs estimated at several thousand pounds per year and reception waiting times.
API integration connected the hospital information system (HIS) to the electronic signature platform. Upon patient registration, the HIS calls the API to create a multiparty signature request (patient + referring physician) with automatic signature field positioning calculated from template metadata.
GDPR compliance required implementing an automatic scheduled purge via API (`PATCH /v2/signature-requests` + purge confirmation webhook) aligned with legal retention periods for medical records (20 years for adults, per article R. 1112-7 of the Public Health Code). Measured gains reached an 80% reduction in admission waiting time and a 40% saving on printing and scanning costs.
Conclusion
Integrating a REST electronic signature API in 2026 requires simultaneous mastery of several dimensions: robust RESTful architecture, secure OAuth2 authentication, event-driven webhook management, and compliance with eIDAS and GDPR requirements. Developers who anticipate these issues from their integration design onwards avoid costly refactoring and major legal risks.
Three pillars to remember: secure your API calls (OAuth2 + minimal scopes + vault), process events asynchronously and idempotently via webhooks, and systematically archive the signed document with its certified audit trail.
Certyneo provides a documented REST API, eIDAS compliant, with free sandbox and dedicated developer technical support. Create your Certyneo account to access your sandbox API key and start your integration today.
Try Certyneo for free
Send your first signature envelope in less than 5 minutes. 5 free envelopes per month, no credit card required.
Recommended articles
Deepen your knowledge with these related articles.
Electronic signature for B2C contracts: validity in 2026
Electronic signature in B2C contracts raises specific questions about legal validity and customer consent collection. Here is everything you need to know for 2026.
Electronic signature in the public sector: 2026 guide
Since 2020, electronic signature has been mandatory in public procurement above certain thresholds. Discover the rules, required levels and how to bring your administration into compliance.
Electronic Signature for Local Government Bodies in Australia
Local government bodies are accelerating their digital transformation. Discover how electronic signature secures your contracts, reduces timescales and complies with the European legal framework.