Go to main content
Certyneo

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.

Certyneo12 min read

Certyneo

Writer — Certyneo · About Certyneo

text

Introduction

The integration of a REST electronic signature API has become an essential prerequisite for development teams in 2026. With over 73% of European companies having digitized at least one contractual 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 step by 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 signers 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 normalized 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. Verify that the target API exposes an `X-Next-Cursor` header or a `next_page_token` field in the body.

API Versioning and Backward Compatibility

Versioning is a major point of concern for integrators. The two dominant approaches in 2026 are:

  1. URL Versioning: `https://api.certyneo.com/v2/signature-requests` — readable, cacheable by CDNs, recommended for B2B APIs.
  2. Header Versioning: `Accept: application/vnd.certyneo.v2+json` — architecturally cleaner but less visible.

Prioritize providers who commit to a minimum 12-month deprecation policy and publish a public changelog. An unannounced breaking change 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 Flow

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 expiration
  • Use granular scopes: only request strictly necessary permissions

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 unavoidable reality: signature APIs typically limit between 100 and 1000 calls/minute depending on the plan. Implement an exponential retry mechanism with jitter: ``` retry_delay = base_delay * (2^attempt) + random_jitter ``` Strictly respect the `Retry-After` header returned with `429 Too Many Requests`.

---

Lifecycle of a Signature Request 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

[email protected] ``` Response: `{ "document_id": "doc_a1b2c3", "checksum_sha256": "e3b0c442..." }`

Step 2 — Create Request: ```json POST /v2/signature-requests { "document_id": "doc_a1b2c3", "name": "Service Agreement Q3 2026", "signatories": [ { "email": "[email protected]", "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 — Activate: `POST /v2/signature-requests/req_x9y8z7/activate`

From activation onwards, signers receive their invitations and the request transitions to `in_progress` state.

Retrieving 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 log PDF (qualified timestamping RFC 3161) ```

Always store both files together in your document management system or DMS. The audit trail is the proof you can oppose in case of legal dispute.

---

Webhooks: Real-Time Events and Error Management

Configuration and Securing Webhooks

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 Security: validate each incoming payload by comparing the calculated HMAC-SHA256 signature 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 standard string comparison — vulnerable to timing attacks.

Idempotency and Redelivery Handling

Webhooks may be redelivered in case of timeout or 5xx errors from your endpoint. Implement idempotency mandatorily:

  1. Extract the unique `event_id` from each webhook payload
  2. Check in database if this `event_id` has already been processed
  3. Return `200 OK` immediately (even for duplicates) to prevent infinite redeliveries
  4. Process the 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, document archival, ERP notification) should be delegated to an async worker.

For deeper understanding of the signature levels available via API, see our comprehensive electronic signature guide which details the differences between simple, advanced, and qualified signatures.

---

Best Practices for Integration 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: execute against real sandbox to validate complete lifecycle (creation → signing → retrieval)
  • Load tests: simulate concurrent request spikes to identify bottlenecks before production rollout
  • Chaos tests: simulate timeouts and 5xx errors to validate retry logic

Never test in production with real signer identities. Signatures created in sandbox have no legal value — exactly what you want for testing.

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

Check our electronic signature solutions comparison to evaluate the availability SLAs (uptime) offered by different providers — often underestimated when choosing an API integration.

If you're migrating from another platform, our guide on how to migrate from DocuSign or YouSign to Certyneo covers migration technical aspects and webhook compatibility.

To estimate the ROI of your integration, use our electronic signature ROI calculator which includes productivity gains from API automation.

Finally, if you want to go further with automated document generation for signing, discover our AI contract generator which natively interfaces with our REST API.

Integrating an electronic signature API extends beyond a technical challenge: it directly engages the legal responsibility of the editor and its clients across several foundational texts.

eIDAS Regulation 910/2014 and eIDAS 2.0

Regulation (EU) 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 signer, 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 eIDAS 2.0 regulation (EU Regulation 2024/1183), developers must anticipate the integration of European Digital Identity Wallets (EUDIW) into their authentication flows. See our eIDAS 2.0 guide for detailed technical implications.

French Civil Code — Articles 1366 and 1367

In French law, article 1366 of the Civil Code states that "electronic writing has the same evidential value as writing on paper, provided that the person from whom it emanates can be duly identified and that it is established and preserved under conditions intended to guarantee its integrity".

Article 1367 specifies the conditions for reliable electronic signature: signer identification and guarantee of document integrity. These requirements translate technically into the obligation to preserve certified audit logs and identity proof used during signature — elements your API must expose and you must store.

ETSI EN 319 132 Standards — PAdES

The mandatory technical format for eIDAS-compliant PDF signatures 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 (10+ years archival).

GDPR 2016/679 — Signer Data

Personal data collected during the signing process (name, first name, email, IP address, identity data for AES/QES) constitute personal data subject to GDPR. Your obligations as data controller or processor include:

  • Defining a justified retention period (usually aligned with prescription deadlines: 5 years under general law)
  • Planning an automatic purge mechanism via API (`DELETE /v2/signature-requests/{id}/personal-data`)
  • Documenting the processing in your processing activity register (article 30 GDPR)
  • Concluding 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 NIS2 Directive (2022/2555), integrating a third-party API creates a dependency that must be documented in your supply chain digital risk analysis. Require your API provider to have SOC 2 Type II certification and ≥ 99.9% availability SLA.

Use Cases: Electronic Signature API in Practice

Scenario 1 — Automating Supplier Contracts in Industrial SME

An industrial SME managing approximately 200 supplier contracts annually wanted to eliminate paper back-and-forth and manual follow-ups that consumed 2 days per month of an administrative assistant's time. The development team integrated the REST electronic signature API directly into their business ERP via the following flow:

  1. Upon validation of a purchase order in the ERP, a `POST /v2/signature-requests` call is automatically triggered
  2. The generated PDF contract is uploaded and a signature request is sent to the referenced supplier contact
  3. A `signatory.signed` webhook updates the purchase order status in real-time
  4. The signed document and audit trail are automatically archived in the DMS via a second API call

Observed results (ranges from KPMG/IDC sector reports 2024-2025): average signature delay reduced from 8 days to less than 24 hours, estimated savings of 60-70% of administrative time spent on follow-ups, and zero document loss.

Scenario 2 — LegalTech Platform for Law Firms

A software editor developing a SaaS solution for law firms of 5 to 30 employees integrated an electronic signature API to allow its end users to have mandates, fee agreements, and court documents signed directly from the firm interface.

The technical architecture uses the OAuth2 Authorization Code + PKCE flow so each lawyer authenticates requests in their own name. `signature_request.completed` webhooks automatically trigger deposit of the signed document into the client folder of the legal document management system.

The editor particularly valued the availability of advanced electronic signatures (AES) via API — level required for fee agreements per National Bar Council recommendations. The initial integration development time was approximately 3 weeks for a senior backend developer, with 85% test coverage.

Scenario 3 — Digital Onboarding in Private Clinic Group

A private clinic group of approximately 600 beds needed to dematerialize informed consent forms and admission contracts, previously printed and manually signed at reception — generating printing costs estimated at thousands of euros annually and reception waiting time delays.

API integration connected the hospital information system (HIS) to the electronic signature platform. Upon patient registration, the HIS calls the API to create a multi-party signature request (patient + referring physician) with automatic signature field positioning calculated from template metadata.

GDPR compliance required implementing 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 achieved 80% reduction in admission waiting time and 40% savings on printing and scanning costs.

Conclusion

Integrating a REST electronic signature API in 2026 requires simultaneous mastery of multiple dimensions: robust RESTful architecture, secure OAuth2 authentication, event-driven webhook management, and compliance with eIDAS and GDPR requirements. Developers who anticipate these issues from the outset of their integration design avoid costly refactoring and major legal risks.

Three pillars to remember: secure your API calls (OAuth2 + minimal scopes + vault), process webhook events asynchronously and idempotently, 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 under 5 minutes. 5 free envelopes per month, no credit card required.

Go deeper on the topic

Our comprehensive guides to master electronic signatures.