{"openapi":"3.1.0","info":{"title":"SigMa Public API","version":"1.0.0","summary":"Signature électronique souveraine — API publique v1","description":"Authentification : clé API dans l’en-tête `X-SigMa-Key` (`sk_live_…` en production, `sk_sandbox_…` pour le bac à sable). Chaque réponse porte `X-RateLimit-Limit`, `X-RateLimit-Remaining` et `X-RateLimit-Reset` ; au-delà, `429` avec `Retry-After`. Les erreurs ont la forme `{ \"error\": { \"code\", \"message\", \"details\" } }`. Spécification : `GET /openapi.json` · état du service : `GET /status`.","x-description-ar":"المصادقة: مفتاح API في الترويسة `X-SigMa-Key`. كل استجابة تحمل ترويسات حدود المعدل؛ عند التجاوز `429` مع `Retry-After`.","contact":{"name":"SigMa","url":"https://platform.sigma.aljazairbuilders.com/developers"}},"servers":[{"url":"https://api.sigma.aljazairbuilders.com/api/v1/public","description":"SigMa (hébergement souverain en Algérie)"}],"tags":[{"name":"Account","x-name-fr":"Compte","x-name-ar":"الحساب"},{"name":"Documents","x-name-fr":"Documents","x-name-ar":"المستندات"},{"name":"Envelopes","x-name-fr":"Enveloppes","x-name-ar":"الأظرف"},{"name":"Webhooks","x-name-fr":"Webhooks","x-name-ar":"الويب هوك"}],"security":[{"apiKey":[]}],"paths":{"/me":{"get":{"operationId":"getApiKey","tags":["Account"],"summary":"Current API key and organisation","x-summary-fr":"Clé API et organisation courantes","x-summary-ar":"مفتاح API والمؤسسة الحاليان","security":[{"apiKey":[]}],"x-required-scope":null,"x-rate-limit":"ENVELOPE_READ","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyInfo"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/usage":{"get":{"operationId":"getUsage","tags":["Account"],"summary":"Envelope and API quota of the current month","x-summary-fr":"Quotas d’enveloppes et d’appels API du mois","x-summary-ar":"حصص الأظرف وطلبات API للشهر","security":[{"apiKey":[]}],"x-required-scope":null,"x-rate-limit":"ENVELOPE_READ","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents":{"post":{"operationId":"uploadDocument","tags":["Documents"],"summary":"Upload a document (PDF, Word, image…)","x-summary-fr":"Téléverser un document (PDF, Word, image…)","x-summary-ar":"رفع مستند (PDF، Word، صورة…)","description":"Le document est converti en PDF/A-3b et validé (veraPDF) en arrière-plan : interrogez GET /documents/{id} jusqu’à `ready`.","x-description-ar":"يحوَّل المستند إلى PDF/A-3b ويُتحقق منه في الخلفية: استعلموا GET /documents/{id} حتى الحالة `ready`.","security":[{"apiKey":[]}],"x-required-scope":"documents:write","x-rate-limit":"DOCUMENT","parameters":[],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"FILE_TOO_LARGE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"FILE_TYPE_UNSUPPORTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"title":{"type":"string","maxLength":200},"classification":{"type":"string","enum":["contract","invoice","notarial_act","hr","procurement","other"]}}}}}}}},"/documents/{documentId}":{"get":{"operationId":"getDocument","tags":["Documents"],"summary":"Get a document and its processing status","x-summary-fr":"Consulter un document et son état de traitement","x-summary-ar":"عرض مستند وحالة معالجته","security":[{"apiKey":[]}],"x-required-scope":"documents:read","x-rate-limit":"DOCUMENT","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/envelopes":{"post":{"operationId":"createEnvelope","tags":["Envelopes"],"summary":"Create an envelope (and optionally send it)","x-summary-fr":"Créer une enveloppe (et l’envoyer)","x-summary-ar":"إنشاء ظرف (وإرساله اختياريًا)","description":"Crée une enveloppe avec ses documents et destinataires. Avec `send: true`, elle est envoyée immédiatement : les quotas, la politique du département et les niveaux de signature (Loi 15-04) s’appliquent comme dans l’application.","x-description-ar":"ينشئ ظرفًا بمستنداته والمرسل إليهم. مع `send: true` يُرسل فورًا: تُطبق الحصص وسياسة القسم ومستويات التوقيع (القانون 15-04) كما في التطبيق.","security":[{"apiKey":[]}],"x-required-scope":"envelopes:write","x-rate-limit":"ENVELOPE_WRITE","parameters":[],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"ACCOUNT_SUSPENDED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED · QUOTA_EXHAUSTED · DOCUMENTS_NOT_READY · SIGNATURE_LEVEL_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnvelopeRequest"}}}}},"get":{"operationId":"listEnvelopes","tags":["Envelopes"],"summary":"List envelopes","x-summary-fr":"Lister les enveloppes","x-summary-ar":"قائمة الأظرف","security":[{"apiKey":[]}],"x-required-scope":"envelopes:read","x-rate-limit":"ENVELOPE_READ","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","sent","completed","declined","voided","expired"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeList"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/envelopes/{envelopeId}":{"get":{"operationId":"getEnvelope","tags":["Envelopes"],"summary":"Get an envelope with recipients and progress","x-summary-fr":"Consulter une enveloppe, ses destinataires et sa progression","x-summary-ar":"عرض ظرف والمرسل إليهم وتقدمه","security":[{"apiKey":[]}],"x-required-scope":"envelopes:read","x-rate-limit":"ENVELOPE_READ","parameters":[{"name":"envelopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/envelopes/{envelopeId}/send":{"post":{"operationId":"sendEnvelope","tags":["Envelopes"],"summary":"Send a draft envelope","x-summary-fr":"Envoyer une enveloppe brouillon","x-summary-ar":"إرسال ظرف مسودة","security":[{"apiKey":[]}],"x-required-scope":"envelopes:write","x-rate-limit":"ENVELOPE_WRITE","parameters":[{"name":"envelopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ENVELOPE_NOT_DRAFT · ANALYSIS_OVERRIDE_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED · QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/envelopes/{envelopeId}/void":{"post":{"operationId":"voidEnvelope","tags":["Envelopes"],"summary":"Void an envelope in progress","x-summary-fr":"Annuler une enveloppe en cours","x-summary-ar":"إلغاء ظرف قيد التنفيذ","security":[{"apiKey":[]}],"x-required-scope":"envelopes:void","x-rate-limit":"ENVELOPE_WRITE","parameters":[{"name":"envelopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidEnvelopeRequest"}}}}}},"/envelopes/{envelopeId}/recipients/{recipientId}/remind":{"post":{"operationId":"remindRecipient","tags":["Envelopes"],"summary":"Send a reminder to a waiting signer","x-summary-fr":"Relancer un signataire en attente","x-summary-ar":"تذكير موقّع في الانتظار","security":[{"apiKey":[]}],"x-required-scope":"envelopes:write","x-rate-limit":"ENVELOPE_WRITE","parameters":[{"name":"envelopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"recipientId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No content","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/envelopes/{envelopeId}/documents/{documentId}/signed":{"get":{"operationId":"downloadSignedDocument","tags":["Envelopes"],"summary":"Download a signed document (PAdES, PDF/A-3b)","x-summary-fr":"Télécharger un document signé (PAdES, PDF/A-3b)","x-summary-ar":"تحميل مستند موقّع (PAdES، PDF/A-3b)","security":[{"apiKey":[]}],"x-required-scope":"envelopes:read","x-rate-limit":"ENVELOPE_READ","parameters":[{"name":"envelopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/envelopes/{envelopeId}/evidence":{"get":{"operationId":"downloadEvidencePackage","tags":["Envelopes"],"summary":"Download the sealed evidence package","x-summary-fr":"Télécharger le dossier de preuve scellé","x-summary-ar":"تحميل ملف الإثبات المختوم","security":[{"apiKey":[]}],"x-required-scope":"envelopes:read","x-rate-limit":"ENVELOPE_READ","parameters":[{"name":"envelopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/envelopes/{envelopeId}/audit-trail":{"get":{"operationId":"getAuditTrail","tags":["Envelopes"],"summary":"Hash-chained audit trail of an envelope","x-summary-fr":"Journal d’audit chaîné d’une enveloppe","x-summary-ar":"سجل التدقيق المتسلسل للظرف","security":[{"apiKey":[]}],"x-required-scope":"audit:read","x-rate-limit":"AUDIT_READ","parameters":[{"name":"envelopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditTrail"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"operationId":"listWebhooks","tags":["Webhooks"],"summary":"List webhook endpoints","x-summary-fr":"Lister les webhooks","x-summary-ar":"قائمة الويب هوك","security":[{"apiKey":[]}],"x-required-scope":"webhooks:manage","x-rate-limit":"WEBHOOK","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createWebhook","tags":["Webhooks"],"summary":"Register a webhook endpoint","x-summary-fr":"Enregistrer un webhook","x-summary-ar":"تسجيل ويب هوك","description":"Le secret de signature n’est renvoyé qu’une fois. Vérifiez chaque appel : `X-SigMa-Signature-256: sha256=HMAC_SHA256(secret, corps brut)`.","x-description-ar":"يُعاد سر التوقيع مرة واحدة فقط. تحققوا من كل طلب: `X-SigMa-Signature-256: sha256=HMAC_SHA256(secret, الجسم الخام)`.","security":[{"apiKey":[]}],"x-required-scope":"webhooks:manage","x-rate-limit":"WEBHOOK","parameters":[],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED · WEBHOOK_URL_INVALID · WEBHOOK_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}}}},"/webhooks/{webhookId}":{"delete":{"operationId":"deleteWebhook","tags":["Webhooks"],"summary":"Revoke a webhook endpoint","x-summary-fr":"Révoquer un webhook","x-summary-ar":"إلغاء ويب هوك","security":[{"apiKey":[]}],"x-required-scope":"webhooks:manage","x-rate-limit":"WEBHOOK","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No content","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{webhookId}/test":{"post":{"operationId":"testWebhook","tags":["Webhooks"],"summary":"Send a test event now","x-summary-fr":"Envoyer un événement de test","x-summary-ar":"إرسال حدث تجريبي","security":[{"apiKey":[]}],"x-required-scope":"webhooks:manage","x-rate-limit":"WEBHOOK","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{webhookId}/deliveries":{"get":{"operationId":"listWebhookDeliveries","tags":["Webhooks"],"summary":"Delivery log of an endpoint (30 days)","x-summary-fr":"Journal des livraisons (30 jours)","x-summary-ar":"سجل الإرسالات (30 يومًا)","security":[{"apiKey":[]}],"x-required-scope":"webhooks:manage","x-rate-limit":"WEBHOOK","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/connector/verify":{"post":{"operationId":"verifyConnector","tags":["Connectors"],"summary":"Verify a connector key and register the installation","x-summary-fr":"Vérifier la clé d’un connecteur et enregistrer l’installation","x-summary-ar":"التحقق من مفتاح موصل وتسجيل التثبيت","security":[{"apiKey":[]}],"x-required-scope":null,"x-rate-limit":"CONNECTOR","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorVerification"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorVerifyRequest"}}}}}},"/quota":{"get":{"operationId":"getQuota","tags":["Connectors"],"summary":"Remaining envelope quota","x-summary-fr":"Quota d’enveloppes restant","x-summary-ar":"حصة الظروف المتبقية","security":[{"apiKey":[]}],"x-required-scope":null,"x-rate-limit":"CONNECTOR","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quota"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/usage/summary":{"get":{"operationId":"getUsageSummary","tags":["Connectors"],"summary":"Monthly usage summary for billing reconciliation","x-summary-fr":"Synthèse mensuelle d’utilisation (rapprochement)","x-summary-ar":"ملخص الاستعمال الشهري للمطابقة","security":[{"apiKey":[]}],"x-required-scope":"envelopes:read","x-rate-limit":"CONNECTOR","parameters":[{"name":"month","in":"query","required":false,"schema":{"example":"2026-10","type":"string","pattern":"^\\d{4}-\\d{2}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/envelope-statuses":{"get":{"operationId":"getEnvelopeStatuses","tags":["Envelopes"],"summary":"Status of up to 100 envelopes at once","x-summary-fr":"État de 100 enveloppes au plus en un appel","x-summary-ar":"حالة ما يصل إلى 100 ظرف دفعة واحدة","security":[{"apiKey":[]}],"x-required-scope":"envelopes:read","x-rate-limit":"ENVELOPE_READ","parameters":[{"name":"ids","in":"query","required":true,"schema":{"description":"Comma-separated envelope ids (max 100).","type":"string","maxLength":3800}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeStatusList"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED · TOO_MANY_IDS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/batch":{"post":{"operationId":"syncContacts","tags":["Contacts"],"summary":"Create or update up to 50 signatory profiles","x-summary-fr":"Créer ou mettre à jour 50 profils de signataires au plus","x-summary-ar":"إنشاء أو تحديث 50 ملف موقّع كحد أقصى","description":"Rapprochement par `external_ref`, sinon par e-mail. Le NIF est vérifié auprès du registre DGI. Un e-mail ou un NIF déjà utilisé par un autre profil donne `conflict`.","x-description-ar":"المطابقة حسب `external_ref` أو البريد. يُتحقق من رقم التعريف الجبائي لدى سجل المديرية العامة للضرائب.","security":[{"apiKey":[]}],"x-required-scope":"contacts:write","x-rate-limit":"CONNECTOR","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBatchResult"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBatchRequest"}}}}}},"/contacts":{"get":{"operationId":"listContacts","tags":["Contacts"],"summary":"List signatory profiles","x-summary-fr":"Lister les profils de signataires","x-summary-ar":"قائمة ملفات الموقّعين","security":[{"apiKey":[]}],"x-required-scope":"contacts:read","x-rate-limit":"CONNECTOR","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/{contactId}":{"patch":{"operationId":"updateContact","tags":["Contacts"],"summary":"Update a signatory profile","x-summary-fr":"Mettre à jour un profil de signataire","x-summary-ar":"تحديث ملف موقّع","security":[{"apiKey":[]}],"x-required-scope":"contacts:write","x-rate-limit":"CONNECTOR","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBatchResult"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateRequest"}}}}},"delete":{"operationId":"archiveContact","tags":["Contacts"],"summary":"Archive a signatory profile (never deleted)","x-summary-fr":"Archiver un profil de signataire (jamais supprimé)","x-summary-ar":"أرشفة ملف موقّع (لا يُحذف)","security":[{"apiKey":[]}],"x-required-scope":"contacts:write","x-rate-limit":"CONNECTOR","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No content","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates":{"get":{"operationId":"listTemplates","tags":["Templates"],"summary":"List document templates","x-summary-fr":"Lister les modèles de documents","x-summary-ar":"قائمة نماذج المستندات","security":[{"apiKey":[]}],"x-required-scope":"templates:read","x-rate-limit":"CONNECTOR","parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["invoice","purchase_order","contract","other"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateList"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/envelopes/from-template":{"post":{"operationId":"createEnvelopeFromTemplate","tags":["Templates"],"summary":"Merge a template and send it for signature","x-summary-fr":"Fusionner un modèle et l’envoyer en signature","x-summary-ar":"دمج نموذج وإرساله للتوقيع","security":[{"apiKey":[]}],"x-required-scope":"envelopes:write","x-rate-limit":"ENVELOPE_WRITE","parameters":[],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeStatusList"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED · TEMPLATE_VALUES_INVALID · SIGNATURE_LEVEL_INSUFFICIENT · QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FromTemplateRequest"}}}}}},"/signature-rules":{"get":{"operationId":"listSignatureRules","tags":["Connectors"],"summary":"Signature tier rules of the organisation","x-summary-fr":"Règles de niveau de signature de l’organisation","x-summary-ar":"قواعد مستوى التوقيع للمؤسسة","security":[{"apiKey":[]}],"x-required-scope":null,"x-rate-limit":"CONNECTOR","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleList"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signature-rules/evaluate":{"post":{"operationId":"evaluateSignatureRules","tags":["Connectors"],"summary":"Required signature tier for a document","x-summary-fr":"Niveau de signature requis pour un document","x-summary-ar":"مستوى التوقيع المطلوب لمستند","security":[{"apiKey":[]}],"x-required-scope":null,"x-rate-limit":"CONNECTOR","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleEvaluation"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleEvaluationRequest"}}}}}},"/telecom/batches":{"post":{"operationId":"createTelecomBatch","tags":["Telecom"],"summary":"Dispatch up to 500 subscriber envelopes","x-summary-fr":"Envoyer jusqu’à 500 enveloppes d’abonnés","x-summary-ar":"إرسال ما يصل إلى 500 ظرف للمشتركين","security":[{"apiKey":[]}],"x-required-scope":"batch:dispatch","x-rate-limit":"TELECOM","parameters":[],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelecomBatch"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT · TEMPLATE_ACCESS_DENIED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED · BATCH_SIZE_EXCEEDED · BATCH_VALIDATION_ERRORS · SIGNATURE_CLASS_POLICY_VIOLATION","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED · QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelecomBatchRequest"}}}}}},"/telecom/batches/{id}":{"get":{"operationId":"getTelecomBatch","tags":["Telecom"],"summary":"Batch progress and per-envelope status","x-summary-fr":"Avancement du lot et état de chaque enveloppe","x-summary-ar":"تقدم الدفعة وحالة كل ظرف","security":[{"apiKey":[]}],"x-required-scope":"envelopes:read","x-rate-limit":"ENVELOPE_READ","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelecomBatch"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/telecom/tracking/{token}":{"get":{"operationId":"getTelecomEnvelope","tags":["Telecom"],"summary":"Envelope status by tracking token","x-summary-fr":"État d’une enveloppe par jeton de suivi","x-summary-ar":"حالة ظرف بواسطة رمز التتبع","security":[{"apiKey":[]}],"x-required-scope":"envelopes:read","x-rate-limit":"ENVELOPE_READ","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelecomEnvelopeStatus"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/whitelabel/envelopes":{"post":{"operationId":"createWhitelabelEnvelope","tags":["WhiteLabel"],"summary":"Create a multi-party envelope","x-summary-fr":"Créer une enveloppe multi-signataires","x-summary-ar":"إنشاء ظرف متعدد الموقعين","security":[{"apiKey":[]}],"x-required-scope":"envelopes:write","x-rate-limit":"ENVELOPE_WRITE","parameters":[],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelEnvelopeAccepted"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT · WHITELABEL_NOT_ENABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED · PHONE_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelEnvelopeRequest"}}}}}},"/whitelabel/envelopes/{id}":{"get":{"operationId":"getWhitelabelEnvelope","tags":["WhiteLabel"],"summary":"Envelope state and signatories","x-summary-fr":"État de l’enveloppe et des signataires","x-summary-ar":"حالة الظرف والموقعين","security":[{"apiKey":[]}],"x-required-scope":"envelopes:read","x-rate-limit":"ENVELOPE_READ","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelEnvelope"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/whitelabel/envelopes/{id}/signing-session":{"post":{"operationId":"createSigningSession","tags":["WhiteLabel"],"summary":"Signing session of the current signatory (for the widget)","x-summary-fr":"Session de signature du signataire courant (pour le widget)","x-summary-ar":"جلسة توقيع الموقع الحالي (للأداة)","security":[{"apiKey":[]}],"x-required-scope":"envelopes:write","x-rate-limit":"ENVELOPE_WRITE","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningSession"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ENVELOPE_PREPARING","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/whitelabel/theme":{"get":{"operationId":"getWhitelabelTheme","tags":["WhiteLabel"],"summary":"Active partner theme","x-summary-fr":"Thème actif du partenaire","x-summary-ar":"السمة النشطة للشريك","security":[{"apiKey":[]}],"x-required-scope":null,"x-rate-limit":"ENVELOPE_READ","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelTheme"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/whitelabel/healthcheck":{"post":{"operationId":"reportHealthcheck","tags":["WhiteLabel"],"summary":"Record an SDK health-check run","x-summary-fr":"Enregistrer une vérification d’intégration du SDK","x-summary-ar":"تسجيل فحص تكامل SDK","security":[{"apiKey":[]}],"x-required-scope":null,"x-rate-limit":"ENVELOPE_READ","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthcheckResult"}}},"headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this endpoint group."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time when the window resets."}}},"401":{"description":"API_KEY_REQUIRED · API_KEY_INVALID · API_KEY_REVOKED · API_KEY_EXPIRED · API_KEY_OWNER_INACTIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SCOPE_INSUFFICIENT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED · MONTHLY_QUOTA_EXHAUSTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthcheckReportRequest"}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-SigMa-Key","description":"Scopes: envelopes:read, envelopes:write, envelopes:void, documents:read, documents:write, webhooks:manage, audit:read, contacts:read, contacts:write, templates:read, batch:dispatch, whitelabel:manage. Tiers (req/min per endpoint group ENVELOPE_READ, ENVELOPE_WRITE, DOCUMENT, WEBHOOK, AUDIT_READ, CONNECTOR, TELECOM): sandbox 60, standard 200, enterprise 1000."}},"schemas":{"Error":{"description":"Error shape shared by every endpoint; `code` is stable and machine-readable.","type":"object","properties":{"error":{"type":"object","properties":{"code":{"example":"SCOPE_INSUFFICIENT","type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"CreateEnvelopeRequest":{"id":"CreateEnvelopeRequest","type":"object","properties":{"title":{"example":"Contrat de prestation 2027-014","type":"string","minLength":2,"maxLength":200},"reference":{"example":"ERP-PO-2027-014","type":"string","maxLength":80},"message":{"type":"string","maxLength":2000},"signature_level":{"description":"simple: e-mail link · advanced: SMS code + one-shot certificate · qualified: AECE token (Law 15-04).","default":"simple","type":"string","enum":["simple","advanced","qualified"]},"document_ids":{"description":"Documents uploaded with POST /documents (status ready).","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"recipients":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"example":"Karim Benali","type":"string","minLength":2,"maxLength":120},"email":{"example":"karim.benali@entreprise.dz","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"description":"Required for advanced signatures (SMS code). E.164 or 05/06/07 Algerian format.","example":"+213661234567","type":"string","maxLength":20},"role":{"default":"signer","type":"string","enum":["signer","cc"]},"step":{"description":"Signers sharing a step sign in parallel; steps run in order.","default":1,"type":"integer","minimum":1,"maximum":50},"signature_level":{"description":"Defaults to the envelope level.","type":"string","enum":["simple","advanced","qualified"]},"role_label":{"example":"Emprunteur","type":"string","maxLength":60},"locale":{"type":"string","enum":["fr","ar"]},"email_otp":{"description":"Simple signatures: the signer confirms with a 6-digit code sent to this e-mail address.","type":"boolean"}},"required":["name","email"]}},"deadline_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"send":{"description":"Send immediately after creation (otherwise the envelope stays a draft).","default":false,"type":"boolean"},"amount_dzd":{"description":"Document amount in DZD (signature rules, reports).","type":"number","minimum":0},"document_type":{"description":"When set, the organisation’s signature rules apply: a lower level is refused (SIGNATURE_LEVEL_INSUFFICIENT).","type":"string","enum":["invoice","purchase_order","contract","other"]},"external_ref":{"description":"Your own reference (e.g. Odoo account.move id), returned in status calls.","example":"account.move,1042","type":"string","maxLength":120}},"required":["title","document_ids","recipients"]},"VoidEnvelopeRequest":{"type":"object","properties":{"reason":{"type":"string","enum":["sent_in_error","terms_changed","wrong_recipients","deal_cancelled","duplicate","other"]},"comment":{"type":"string","maxLength":1000}},"required":["reason"]},"Document":{"type":"object","properties":{"object":{"type":"string","const":"document"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"title":{"type":"string"},"status":{"description":"Poll until `ready`: the PDF/A archive and its SHA-256 are then available.","type":"string","enum":["queued","processing","ready","failed"]},"page_count":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"source_sha256":{"type":"string"},"archive_sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"ready_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["object","id","title","status","page_count","source_sha256","archive_sha256","error_code","created_at","ready_at"],"additionalProperties":false},"Envelope":{"type":"object","properties":{"object":{"type":"string","const":"envelope"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"title":{"type":"string"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","sent","completed","declined","voided","expired"]},"signature_level":{"type":"string","enum":["simple","advanced","qualified"]},"livemode":{"description":"false for sandbox organisations.","type":"boolean"},"progress":{"type":"object","properties":{"signed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["signed","required"],"additionalProperties":false},"current_step":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total_steps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deadline_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"void_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipients":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["signer","cc"]},"step":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"signature_level":{"type":"string","enum":["simple","advanced","qualified"]},"status":{"example":"signed","type":"string"},"signed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"declined_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","email","role","step","signature_level","status","signed_at","declined_at","decline_reason"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"title":{"type":"string"},"page_count":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archive_sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"signed_available":{"type":"boolean"}},"required":["id","title","page_count","archive_sha256","signed_available"],"additionalProperties":false}},"links":{"type":"object","properties":{"self":{"type":"string"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["self","evidence"],"additionalProperties":false}},"required":["object","id","title","reference","status","signature_level","livemode","progress","current_step","total_steps","deadline_at","created_at","sent_at","completed_at","ended_at","void_reason","recipients","documents","links"],"additionalProperties":false},"EnvelopeList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"envelope"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"title":{"type":"string"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","sent","completed","declined","voided","expired"]},"signature_level":{"type":"string","enum":["simple","advanced","qualified"]},"livemode":{"description":"false for sandbox organisations.","type":"boolean"},"progress":{"type":"object","properties":{"signed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["signed","required"],"additionalProperties":false},"current_step":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total_steps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deadline_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"void_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"links":{"type":"object","properties":{"self":{"type":"string"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["self","evidence"],"additionalProperties":false}},"required":["object","id","title","reference","status","signature_level","livemode","progress","current_step","total_steps","deadline_at","created_at","sent_at","completed_at","ended_at","void_reason","links"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","next_cursor"],"additionalProperties":false},"AuditTrail":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sequence":{"type":"string"},"action":{"type":"string"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"actor_user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"hash":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","sequence","action","occurred_at","actor_user_id","api_key_id","hash","metadata"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"ApiKeyInfo":{"type":"object","properties":{"object":{"type":"string","const":"api_key"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"prefix":{"type":"string"},"label":{"type":"string"},"environment":{"type":"string","enum":["live","sandbox"]},"scopes":{"type":"array","items":{"type":"string"}},"tier":{"type":"string","enum":["sandbox","standard","enterprise"]},"rate_limits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"organisation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"sandbox":{"type":"boolean"}},"required":["id","name","sandbox"],"additionalProperties":false}},"required":["object","id","prefix","label","environment","scopes","tier","rate_limits","organisation"],"additionalProperties":false},"Usage":{"type":"object","properties":{"object":{"type":"string","const":"usage"},"period_start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"resets_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"envelopes":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","limit"],"additionalProperties":false},"api_calls":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["used","limit","per_minute"],"additionalProperties":false}},"required":["object","period_start","resets_at","envelopes","api_calls"],"additionalProperties":false},"CreateWebhookRequest":{"type":"object","properties":{"url":{"description":"HTTPS endpoint on a public address (private and reserved ranges are refused).","example":"https://erp.entreprise.dz/sigma/webhooks","type":"string","maxLength":500,"format":"uri"},"label":{"type":"string","minLength":3,"maxLength":80},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["envelope.sent","envelope.viewed","recipient.signed","envelope.declined","envelope.completed","envelope.voided","envelope.expired","evidence.ready","envelope.partially_signed","contact.verification_updated","envelope.otp_locked"]}}},"required":["url","label","events"]},"WebhookEndpoint":{"type":"object","properties":{"object":{"type":"string","const":"webhook_endpoint"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"label":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["envelope.sent","envelope.viewed","recipient.signed","envelope.declined","envelope.completed","envelope.voided","envelope.expired","evidence.ready","envelope.partially_signed","contact.verification_updated","envelope.otp_locked"]}},"status":{"type":"string","enum":["active","suspended","revoked"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["object","id","label","url","events","status","created_at"],"additionalProperties":false},"WebhookEndpointCreated":{"type":"object","properties":{"object":{"type":"string","const":"webhook_endpoint"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"label":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["envelope.sent","envelope.viewed","recipient.signed","envelope.declined","envelope.completed","envelope.voided","envelope.expired","evidence.ready","envelope.partially_signed","contact.verification_updated","envelope.otp_locked"]}},"status":{"type":"string","enum":["active","suspended","revoked"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"secret":{"description":"Signing secret, shown once. Verify `X-SigMa-Signature-256: sha256=HMAC_SHA256(secret, raw_body)`.","type":"string"}},"required":["object","id","label","url","events","status","created_at","secret"],"additionalProperties":false},"WebhookEndpointList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"webhook_endpoint"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"label":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["envelope.sent","envelope.viewed","recipient.signed","envelope.declined","envelope.completed","envelope.voided","envelope.expired","evidence.ready","envelope.partially_signed","contact.verification_updated","envelope.otp_locked"]}},"status":{"type":"string","enum":["active","suspended","revoked"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["object","id","label","url","events","status","created_at"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"WebhookDelivery":{"type":"object","properties":{"object":{"type":"string","const":"webhook_delivery"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"event_id":{"type":"string"},"event_type":{"type":"string"},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","succeeded","failed"]},"response_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"latency_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"test":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["object","id","event_id","event_type","attempt","status","response_code","latency_ms","test","created_at"],"additionalProperties":false},"WebhookDeliveryList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"webhook_delivery"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"event_id":{"type":"string"},"event_type":{"type":"string"},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","succeeded","failed"]},"response_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"latency_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"test":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["object","id","event_id","event_type","attempt","status","response_code","latency_ms","test","created_at"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"WebhookEvent":{"description":"Body POSTed to your endpoint. Identical bytes on every retry.","type":"object","properties":{"id":{"example":"evt_3f0c9a1e8b6d4c2a9e7f1b5d3c8a0e4f","type":"string"},"type":{"type":"string","enum":["envelope.sent","envelope.viewed","recipient.signed","envelope.declined","envelope.completed","envelope.voided","envelope.expired","evidence.ready","envelope.partially_signed","contact.verification_updated","envelope.otp_locked"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"organisation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"livemode":{"type":"boolean"},"data":{"type":"object","properties":{"envelope":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"title":{"type":"string"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["id","title","reference","status"],"additionalProperties":false},"recipient":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"email":{"type":"string"},"step":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string"}},"required":["id","name","email","step","status"],"additionalProperties":false}},"required":["envelope"],"additionalProperties":false}},"required":["id","type","created_at","organisation_id","livemode","data"],"additionalProperties":false},"ConnectorVerifyRequest":{"id":"ConnectorVerifyRequest","type":"object","properties":{"kind":{"default":"other","type":"string","enum":["odoo","sage","other"]},"instance_url":{"example":"https://erp.pme-exemple.dz","type":"string","maxLength":300},"version":{"example":"17.0","type":"string","maxLength":40},"module_version":{"example":"17.0.1.0.0","type":"string","maxLength":40}}},"ConnectorVerification":{"type":"object","properties":{"organisation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"sandbox":{"type":"boolean"}},"required":["id","name","sandbox"],"additionalProperties":false},"quota":{"type":"object","properties":{"limit":{"description":"Monthly envelopes; null = unlimited.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remaining":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"blocked":{"description":"QUOTA_EXHAUSTED, SUBSCRIPTION_SUSPENDED… when sending is refused.","anyOf":[{"type":"string"},{"type":"null"}]},"resets_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["limit","used","remaining","blocked","resets_at","plan"],"additionalProperties":false},"accreditation":{"anyOf":[{"type":"string"},{"type":"null"}]},"sovereign_endpoint":{"type":"boolean"}},"required":["organisation","quota","accreditation","sovereign_endpoint"],"additionalProperties":false},"Quota":{"type":"object","properties":{"limit":{"description":"Monthly envelopes; null = unlimited.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remaining":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"blocked":{"description":"QUOTA_EXHAUSTED, SUBSCRIPTION_SUSPENDED… when sending is refused.","anyOf":[{"type":"string"},{"type":"null"}]},"resets_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["limit","used","remaining","blocked","resets_at","plan"],"additionalProperties":false},"UsageSummary":{"type":"object","properties":{"month":{"type":"string"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"by_tier":{"type":"object","properties":{"simple":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"advanced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"qualified":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["simple","advanced","qualified"],"additionalProperties":false},"by_document_type":{"type":"object","properties":{"invoice":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purchase_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"contract":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"other":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["invoice","purchase_order","contract","other"],"additionalProperties":false},"by_channel":{"type":"object","properties":{"web":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"api":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"erp":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"odoo":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sage":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["web","api","erp","odoo","sage"],"additionalProperties":false},"qualified_fees_dzd":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"previous_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["month","total","by_tier","by_document_type","by_channel","qualified_fees_dzd","previous_total"],"additionalProperties":false},"EnvelopeStatusList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"status":{"type":"string"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"progress":{"type":"object","properties":{"signed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["signed","required"],"additionalProperties":false},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["id","status","external_ref","progress","completed_at"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"ContactBatchRequest":{"id":"ContactBatchRequest","type":"object","properties":{"contacts":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"external_ref":{"example":"res.partner,42","type":"string","maxLength":80},"name":{"type":"string","minLength":2,"maxLength":160},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"description":"Normalised to E.164 (+213…); unparseable numbers are dropped.","type":"string","maxLength":30},"nif":{"description":"Algerian NIF, 15 digits (Arabic-Indic digits accepted); checked against the DGI register.","type":"string","maxLength":30}},"required":["name","email"]}}},"required":["contacts"]},"ContactUpdateRequest":{"id":"ContactUpdateRequest","type":"object","properties":{"external_ref":{"example":"res.partner,42","type":"string","maxLength":80},"name":{"type":"string","minLength":2,"maxLength":160},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"description":"Normalised to E.164 (+213…); unparseable numbers are dropped.","type":"string","maxLength":30},"nif":{"description":"Algerian NIF, 15 digits (Arabic-Indic digits accepted); checked against the DGI register.","type":"string","maxLength":30}},"required":["name","email"]},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nif":{"anyOf":[{"type":"string"},{"type":"null"}]},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"verification":{"type":"string","enum":["unverified","verified","nif_invalid","nif_conflict","foreign"]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","email","phone","nif","external_ref","verification","updated_at"],"additionalProperties":false},"ContactBatchResult":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"status":{"type":"string","enum":["created","updated","unchanged","skipped","conflict"]},"verification":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["external_ref","id","status","verification","error"],"additionalProperties":false}},"summary":{"type":"object","properties":{"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unchanged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"conflict":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["created","updated","unchanged","skipped","conflict"],"additionalProperties":false}},"required":["results","summary"],"additionalProperties":false},"ContactList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nif":{"anyOf":[{"type":"string"},{"type":"null"}]},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"verification":{"type":"string","enum":["unverified","verified","nif_invalid","nif_conflict","foreign"]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","email","phone","nif","external_ref","verification","updated_at"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["object","data","total"],"additionalProperties":false},"TemplateList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"type":"string","enum":["invoice","purchase_order","contract","other"]},"locale":{"type":"string","enum":["fr","ar"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label_fr":{"type":"string"},"label_ar":{"type":"string"},"type":{"type":"string","enum":["text","nif","amount","date","email"]},"required":{"type":"boolean"}},"required":["key","label_fr","label_ar","type","required"],"additionalProperties":false}}},"required":["id","name","description","category","locale","version","tags"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"FromTemplateRequest":{"id":"FromTemplateRequest","type":"object","properties":{"template_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"title":{"type":"string","minLength":2,"maxLength":200},"values":{"description":"Merge values by tag key.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"}]}},"recipients":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":20},"step":{"default":1,"type":"integer","minimum":1,"maximum":50},"signature_level":{"type":"string","enum":["simple","advanced","qualified"]},"locale":{"type":"string","enum":["fr","ar"]}},"required":["name","email"]}},"signature_level":{"default":"simple","type":"string","enum":["simple","advanced","qualified"]},"amount_dzd":{"type":"number","minimum":0},"external_ref":{"type":"string","maxLength":120},"send":{"default":true,"type":"boolean"}},"required":["template_id","title","values","recipients"]},"RuleEvaluationRequest":{"id":"RuleEvaluationRequest","type":"object","properties":{"document_type":{"type":"string","enum":["invoice","purchase_order","contract","other"]},"amount_dzd":{"default":null,"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["document_type"]},"RuleEvaluation":{"type":"object","properties":{"required_tier":{"type":"string","enum":["simple","advanced","qualified"]},"rule":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"matched":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"min_tier":{"type":"string","enum":["simple","advanced","qualified"]}},"required":["id","name","min_tier"],"additionalProperties":false}}},"required":["required_tier","rule","matched"],"additionalProperties":false},"RuleList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"document_type":{"type":"string","enum":["invoice","purchase_order","contract","other"]},"threshold_dzd":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_tier":{"type":"string","enum":["simple","advanced","qualified"]},"enabled":{"type":"boolean"}},"required":["id","name","document_type","threshold_dzd","min_tier","enabled"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"TelecomBatchRequest":{"id":"TelecomBatchRequest","type":"object","properties":{"envelopes":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"msisdn":{"example":"+213661234567","description":"Algerian mobile number, E.164.","type":"string"},"full_name":{"example":"Amina Boudiaf","type":"string"},"wilaya":{"example":"16","type":"string"},"offer_sku":{"example":"DJZ-4G-UPGRADE","type":"string"},"template_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"document_category":{"type":"string","enum":["subscriber_contract","b2b_contract","consent_form","data_sharing","promotional_optin","roaming_activation"]},"signature_class":{"description":"Defaults to the tenant policy for the category; a different value is refused.","type":"string","enum":["simple","advanced","qualified"]},"company":{"type":"string"},"locale":{"type":"string","enum":["fr","ar"]},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["msisdn","full_name","wilaya","offer_sku","template_id","document_category"]}}},"required":["envelopes"]},"TelecomBatch":{"type":"object","properties":{"batch_job_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"status":{"type":"string","enum":["queued","processing","completed","partial_failure"]},"total_envelopes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"processed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed_envelope_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"envelopes":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"envelope_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"tracking_token":{"type":"string"},"status":{"type":"string","enum":["queued","dispatched","awaiting_signature","signed","declined","expired","otp_locked","failed"]}},"required":["index","envelope_id","tracking_token","status"],"additionalProperties":false}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["batch_job_id","status","total_envelopes","processed","failed_envelope_ids","envelopes","created_at"],"additionalProperties":false},"TelecomEnvelopeStatus":{"type":"object","properties":{"envelope_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"tracking_token":{"type":"string"},"status":{"type":"string","enum":["queued","dispatched","awaiting_signature","signed","declined","expired","otp_locked","failed"]},"batch_job_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"msisdn_hash":{"type":"string"},"signature_class":{"type":"string","enum":["simple","advanced","qualified"]},"document_category":{"type":"string","enum":["subscriber_contract","b2b_contract","consent_form","data_sharing","promotional_optin","roaming_activation"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["envelope_id","tracking_token","status","batch_job_id","msisdn_hash","signature_class","document_category","created_at","completed_at"],"additionalProperties":false},"WhitelabelEnvelopeRequest":{"id":"WhitelabelEnvelopeRequest","type":"object","properties":{"title":{"example":"Contrat entreprise — Flotte mobile 40 lignes","type":"string"},"template_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"document_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"signing_mode":{"type":"string","enum":["sequential","parallel"]},"expires_in_hours":{"example":72,"type":"integer","minimum":1,"maximum":720},"company":{"description":"Enterprise subscriber (analytics, revenue share).","type":"string"},"signatories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string"},"signing_order":{"type":"integer","minimum":1,"maximum":20},"signature_type":{"type":"string","enum":["simple","advanced","qualified"]},"notification_channel":{"type":"string","enum":["email","sms_gateway"]},"locale":{"type":"string","enum":["fr","ar"]}},"required":["name","signing_order","signature_type"]}}},"required":["title","signatories"]},"WhitelabelEnvelopeAccepted":{"type":"object","properties":{"envelope_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"state":{"type":"string","const":"preparing"},"stream_url":{"type":"string"}},"required":["envelope_id","state","stream_url"],"additionalProperties":false},"WhitelabelEnvelope":{"type":"object","properties":{"envelope_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"state":{"type":"string","enum":["preparing","awaiting_signature","partially_signed","completed","declined","expired","voided","failed"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"current_signatory_index":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"document_pages_count":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"signatories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"signing_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","signed","declined"]},"signed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"notification_channel":{"type":"string","enum":["email","sms_gateway"]}},"required":["name","signing_order","status","signed_at","notification_channel"],"additionalProperties":false}},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["envelope_id","state","created_at","expires_at","current_signatory_index","document_pages_count","signatories","failure_code"],"additionalProperties":false},"SigningSession":{"type":"object","properties":{"signing_token":{"description":"Single-use signing link token of the current signatory — pass it to the widget.","type":"string"},"signatory":{"type":"object","properties":{"name":{"type":"string"},"signing_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","signing_order"],"additionalProperties":false},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["signing_token","signatory","expires_at"],"additionalProperties":false},"WhitelabelTheme":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"primaryColor":{"type":"string"},"secondaryColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"fontFamily":{"type":"string"},"borderRadius":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"displayName":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"logoSha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["version","primaryColor","secondaryColor","fontFamily","borderRadius","displayName","logoUrl","logoSha256","createdAt"],"additionalProperties":false},"HealthcheckReportRequest":{"id":"HealthcheckReportRequest","type":"object","properties":{"checks":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"passed":{"type":"boolean"},"detail":{"type":"string"}},"required":["name","passed"]}}},"required":["checks"]},"HealthcheckResult":{"type":"object","properties":{"passed":{"type":"boolean"},"score":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recorded":{"type":"boolean"}},"required":["passed","score","recorded"],"additionalProperties":false}}},"webhooks":{"sigmaEvent":{"post":{"summary":"SigMa event delivered to your endpoint","description":"Signed with `X-SigMa-Signature-256: sha256=HMAC_SHA256(secret, raw_body)`. Headers `X-SigMa-Event-Id`, `X-SigMa-Event-Type`, `X-SigMa-Delivery`. Answer 2xx within 5 s; failures are retried after 30 s, 5 min, 30 min, 2 h and 24 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}}}}