Skip to main content

Use cases

eIDAS EU-SES signature flow (create → poll → download)

Full simple-signature workflow in 3 steps

The Scell.io signature flow follows 3 steps: (1) `POST /api/v1/signatures` with PDF + signers + ui_config → returns `signature_id` and `signing_urls[]`, (2) signer opens the URL, signs through our eIDAS-certified partner tunnel (typed/drawn/both), receives BulkGate SMS OTP, (3) on the server side, listen for the `signature.completed` webhook or poll `GET /api/v1/signatures/{id}` until status `completed`, then download the signed PDF via `GET /api/v1/signatures/{id}/download`. The signed PDF includes the eIDAS EU-SES certificate and the audit trail PDF. 10-year retention automatic.

Key facts

  • Step 1: POST with base64 PDF + signers + ui_config
  • Step 2: signer opens `signing_url`, BulkGate SMS OTP
  • Step 3: `signature.completed` webhook or status polling
  • Statuses: `pending` → `in_progress` → `completed` / `expired`
  • Audit trail PDF embedded in download (eIDAS proof)
  • Default expiry 30 days, configurable

Code example

import { ScellClient } from '@scell/sdk';
import { readFileSync } from 'node:fs';

const scell = new ScellClient({ apiKey: process.env.SCELL_SECRET_KEY! });

// 1. Créer la signature
const sig = await scell.signatures.create({
  document: { name: 'contrat.pdf', content_base64: readFileSync('contrat.pdf').toString('base64') },
  signers: [{ email: 'client@example.com', phone: '+33612345678', first_name: 'Jean', last_name: 'Dupont' }],
  signature_options: { signature_mode: 'both', timezone: 'Europe/Paris' },
  ui_config: { sidebar_color: '#4F46E5', button_color: '#4F46E5' },
});
console.log('Signing URL:', sig.signing_urls[0]);

// 2. Webhook recommandé, sinon polling
let status = sig.status;
while (status !== 'completed' && status !== 'expired') {
  await new Promise((r) => setTimeout(r, 10_000));
  status = (await scell.signatures.retrieve(sig.id)).status;
}

// 3. Télécharger le PDF signé
const signedPdf = await scell.signatures.download(sig.id);

See also

Your cookie preferences

We use cookies to improve your experience. Essential cookies are always active. Cookie policy.