Audit trail
The hash-chained audit log of an envelope and the signing certificate built from it. Sender API key required.
The audit event object
Attributes
seq integer
At least 1
envelopeId string
Not empty
action string
One of envelope.created envelope.updated envelope.sent envelope.completed envelope.declined envelope.expired envelope.voided recipient.notified recipient.reminded recipient.viewed recipient.authenticated recipient.signed recipient.approved recipient.declined recipient.link_shared recipient.corrected recipient.esign_started recipient.esign_failed recipient.esign_name_differs envelope.recalled envelope.revised document.sealed
at string (date-time)
recipientId string
Not empty
context object
Attributes of context
ip string
userAgent string
data map
prevHash string
Matches ^[0-9a-f]{64}$
hash string
Matches ^[0-9a-f]{64}$
{
"seq": 1,
"envelopeId": "string",
"action": "envelope.created",
"at": "2026-03-02T09:14:31.000Z",
"recipientId": "string",
"context": {
"ip": "string",
"userAgent": "string"
},
"data": {},
"prevHash": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"hash": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c"
}Audit log
GET/v1/envelopes/{id}/events
Every action on the envelope, oldest first, and whether the hash chain is intact: each event's hash is sha256(prevHash + canonical(event)) and the last one must equal the envelope's auditHead.
Auth Sender API key, as Authorization: Bearer <key>
Path parameters
id string Required
The envelope id.
Returns
200 OK. The events and the chain check. An object.
Errors
| Status | When |
|---|---|
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 404 | ENVELOPE_NOT_FOUND, RECIPIENT_NOT_FOUND or NOT_FOUND. |
curl https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/events \
-H "Authorization: Bearer $SIGN_API_KEY"import { createSignClient } from '@codevibe_technology/sign-client';
const sign = createSignClient({
baseUrl: 'https://sign.codevibe.in/api',
apiKey: process.env.SIGN_API_KEY!,
});
const { events, chainValid } = await sign.envelopes.events('7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37');import os
import requests
response = requests.get(
"https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/events",
headers={
"Authorization": f"Bearer {os.environ['SIGN_API_KEY']}",
},
timeout=30,
)
response.raise_for_status()
print(response.json())package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/events", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SIGN_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status, string(out))
}{
"chainValid": true,
"events": [
{
"seq": 1,
"envelopeId": "7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37",
"action": "envelope.created",
"at": "2026-03-02T09:00:00.000Z",
"prevHash": "0000000000000000000000000000000000000000000000000000000000000000",
"hash": "3b5f0c4d6e1a2b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c"
}
]
}Signing certificate
GET/v1/envelopes/{id}/certificate
What the certificate page of the sealed PDF shows, as JSON: the hash of each document before and after sealing, each recipient with the authentication they used and every action they took, and the head of the audit chain.
Auth Sender API key, as Authorization: Bearer <key>
Path parameters
id string Required
The envelope id.
Returns
200 OK. The certificate. A Certificate object.
Errors
| Status | When |
|---|---|
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 404 | ENVELOPE_NOT_FOUND, RECIPIENT_NOT_FOUND or NOT_FOUND. |
curl https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/certificate \
-H "Authorization: Bearer $SIGN_API_KEY"import { createSignClient } from '@codevibe_technology/sign-client';
const sign = createSignClient({
baseUrl: 'https://sign.codevibe.in/api',
apiKey: process.env.SIGN_API_KEY!,
});
const certificate = await sign.envelopes.certificate('7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37');import os
import requests
response = requests.get(
"https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/certificate",
headers={
"Authorization": f"Bearer {os.environ['SIGN_API_KEY']}",
},
timeout=30,
)
response.raise_for_status()
print(response.json())package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/certificate", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SIGN_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status, string(out))
}{
"envelopeId": "string",
"title": "string",
"status": "draft",
"completedAt": "2026-03-02T09:14:31.000Z",
"auditHead": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"chainValid": true,
"documents": [
{
"id": "string",
"name": "string",
"sha256": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"sealedSha256": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c"
}
],
"recipients": [
{
"id": "string",
"name": "string",
"email": "string",
"phone": "string",
"role": "signer",
"auth": "email_link",
"status": "pending",
"actions": [
{
"action": "envelope.created",
"at": "2026-03-02T09:14:31.000Z",
"ip": "string",
"userAgent": "string"
}
]
}
]
}Audit trail as a PDF
GET/v1/envelopes/{id}/audit-trail
The envelope's audit trail as a PDF, the same file the completed-copy email carries: the envelope, the SHA-256 of each document before and after signing, each recipient with the method they used (an Aadhaar eSign names its provider), and every event with its time in the workspace's time zone and UTC, who acted and the network address it came from, then the head of the hash chain.
Auth Sender API key, as Authorization: Bearer <key>
Path parameters
id string Required
The envelope id.
Returns
200 OK. The PDF file. A string.
Content-Disposition:attachment; filename="<name>-original.pdf"or...-sealed.pdf.
Errors
| Status | When |
|---|---|
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 404 | ENVELOPE_NOT_FOUND, RECIPIENT_NOT_FOUND or NOT_FOUND. |
| 409 | INVALID_STATE: not allowed in the envelope's status (details.status). NOT_YOUR_TURN: sequential routing, an earlier recipient has not acted. CONFLICT: another request changed the envelope, or one with the same Idempotency-Key is still running; try again. |
curl https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/audit-trail \
-H "Authorization: Bearer $SIGN_API_KEY" \
-o document.pdfimport { writeFile } from 'node:fs/promises';
const response = await fetch('https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/audit-trail', {
headers: {
Authorization: `Bearer ${process.env.SIGN_API_KEY}`,
},
});
await writeFile('document.pdf', new Uint8Array(await response.arrayBuffer()));import os
import requests
response = requests.get(
"https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/audit-trail",
headers={
"Authorization": f"Bearer {os.environ['SIGN_API_KEY']}",
},
timeout=30,
)
response.raise_for_status()
with open("document.pdf", "wb") as file:
file.write(response.content)package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/audit-trail", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SIGN_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
file, err := os.Create("document.pdf")
if err != nil {
panic(err)
}
defer file.Close()
if _, err := io.Copy(file, res.Body); err != nil {
panic(err)
}
fmt.Println(res.Status)
}Content-Type: application/pdf
%PDF-1.7 ... (the PDF bytes)