Envelopes
An envelope is one signing job: its documents, the people who act on them, the fields they fill and where it stands. Create, change, send, withdraw and list envelopes. Sender API key required.
The envelope object
Attributes
id string
Not empty
title string
message string
changeNote string
What changed since a declined version; shown to recipients.
status string
completed, declined, expired and voided are final.
One of draft sent in_progress completed declined expired voided
routing string
sequential goes by order, lowest first (equal orders sign together); parallel invites everyone at once.
One of sequential parallel
documents array of objects
Attributes of documents
id string
Not empty
name string
sha256 string
SHA-256 of the original file.
Matches ^[0-9a-f]{64}$
pageCount integer
At least 1
pageSizes array of objects
Size of each page in PDF points, in page order.
Attributes of pageSizes
width number
height number
recipients array of objects
Attributes of recipients
id string
Not empty
name string
email string (email)
phone string
Matches ^\+[1-9]\d{6,14}$
role string
Signers fill fields, approvers approve without fields, viewers get a copy.
One of signer approver viewer
order integer
At least 1
auth string
How the recipient proves who they are. email_otp, the default, asks for the link and a code sent by email; email_link needs only the link.
One of email_link email_otp sms_otp aadhaar
status string
One of pending notified viewed signed approved declined
declineReason string
actedAt string (date-time)
notifiedAt string (date-time)
viewedAt string (date-time)
remindersSent integer
At least 0
lastRemindedAt string (date-time)
esign object
Where the recipient's Aadhaar eSign stands, once they have started one. Only for auth: aadhaar.
Attributes of esign
provider string
The eSign provider.
status string
pending: the recipient is at the provider. expired and failed: the attempt ended without a signature and the recipient may start again.
One of pending signed declined expired failed
signerName string
The name on the signer's eSign certificate in the signed file, or the name the provider reported when the file carried none that could be read.
signedAt string (date-time)
ref string
The server's reference for the eSign request that was signed.
sandbox boolean
The provider's test environment was used. Such a signature is for testing and has no legal effect.
fields array of objects
Attributes of fields
id string
Not empty
documentId string
Not empty
recipientId string
Not empty
type string
A recipient with auth: aadhaar fills in nothing: the eSign provider signs the document as the sender approved it, with the values of the signers before them. They may have one aadhaar field, the Aadhaar seal position: it only says where the provider draws its signature, takes no value, and nothing is drawn for it. Without it the provider places the signature where its own setting says. A second aadhaar field is refused with VALIDATION. signature and initials fields given to such a signer are dropped when the envelope is sent, so older requests still work; any other field for them is refused with VALIDATION. Only an Aadhaar eSign signer may have an aadhaar field.
One of signature initials date_signed name text checkbox aadhaar
page integer
Zero-based page index.
At least 0
rect object
A box in PDF points, measured from the top-left corner of the page.
Attributes of rect
x number
At least 0
y number
At least 0
width number
At least 1
height number
At least 1
required boolean
label string
readOnly boolean
Filled in by the sender; the recipient cannot change it.
values array of objects
Attributes of values
fieldId string
Not empty
value string
Signature and initials: PNG as base64. Text and name: the text. Checkbox: true or false. Date: an ISO date. An aadhaar box takes no value; leave it out.
reminders object
Attributes of reminders
firstAfterDays integer
Days after the invitation for the first reminder; 0 turns reminders off.
0 to 365
everyDays integer
1 to 365
max integer
Most reminders per recipient.
0 to 50
expiresAt string (date-time)
createdAt string (date-time)
sentAt string (date-time)
completedAt string (date-time)
metadata map
Your own data, for example an employee id. Echoed in webhooks.
auditHead string
Hash of the last audit event.
Matches ^[0-9a-f]{64}$
{
"id": "7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37",
"title": "Offer letter",
"message": "Please sign by Friday.",
"status": "sent",
"routing": "sequential",
"documents": [
{
"id": "1b8e4f60-2c3a-4d7e-8f91-a5c2e6b3d048",
"name": "offer.pdf",
"sha256": "1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d",
"pageCount": 1,
"pageSizes": [
{
"width": 595.28,
"height": 841.89
}
]
}
],
"recipients": [
{
"id": "c4a1d9e2-7f3b-4c8d-a6e5-0b9f2d1c7e83",
"name": "Asha Rao",
"email": "asha@example.com",
"role": "signer",
"order": 1,
"auth": "email_otp",
"status": "notified",
"notifiedAt": "2026-03-02T09:00:00.000Z"
}
],
"fields": [
{
"id": "e9d2b7c1-4a6f-4e3b-8d5c-3f1a0b2c6d94",
"documentId": "1b8e4f60-2c3a-4d7e-8f91-a5c2e6b3d048",
"recipientId": "c4a1d9e2-7f3b-4c8d-a6e5-0b9f2d1c7e83",
"type": "signature",
"page": 0,
"rect": {
"x": 72,
"y": 640,
"width": 180,
"height": 48
},
"required": true
}
],
"values": [],
"reminders": {
"firstAfterDays": 2,
"everyDays": 2,
"max": 3
},
"expiresAt": "2026-04-01T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"sentAt": "2026-03-02T09:00:00.000Z",
"metadata": {
"employeeId": "E-1042"
},
"auditHead": "3b5f0c4d6e1a2b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c"
}List envelopes
GET/v1/envelopes
The caller's workspace's envelopes, newest first, one page at a time. Pass the nextCursor of a page as cursor to get the next one. Each row is a summary without fields or values; get the envelope for those.
Auth Sender API key, as Authorization: Bearer <key>
Results come one page at a time. See pagination.
Query parameters
status string
Only these states, comma separated.
q string
Case-insensitive text anywhere in the title.
At most 200 characters
limit integer
Page size.
Default 25 · 1 to 100
cursor string
The nextCursor of the previous page.
Returns
200 OK. One page of envelopes. An EnvelopeList object.
Errors
| Status | When |
|---|---|
| 400 | VALIDATION: the request is malformed. details.issues lists each problem. |
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 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?status=sent,in_progress" \
-H "Authorization: Bearer $SIGN_API_KEY"const response = await fetch('https://sign.codevibe.in/api/v1/envelopes?status=sent,in_progress', {
headers: {
Authorization: `Bearer ${process.env.SIGN_API_KEY}`,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.get(
"https://sign.codevibe.in/api/v1/envelopes?status=sent,in_progress",
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?status=sent,in_progress", 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))
}{
"envelopes": [
{
"id": "string",
"title": "string",
"status": "draft",
"createdAt": "2026-03-02T09:14:31.000Z",
"sentAt": "2026-03-02T09:14:31.000Z",
"completedAt": "2026-03-02T09:14:31.000Z",
"expiresAt": "2026-03-02T09:14:31.000Z",
"metadata": {},
"documents": [
{
"id": "string",
"name": "string",
"pageCount": 1
}
],
"recipients": [
{
"id": "string",
"name": "string",
"email": "string",
"role": "signer",
"status": "pending",
"actedAt": "2026-03-02T09:14:31.000Z",
"declineReason": "string"
}
]
}
],
"nextCursor": "string"
}Create an envelope
POST/v1/envelopes
Creates a draft with its documents, recipients and fields, and sends it at once when send is true. Send the PDFs either as base64 in JSON, or as a multipart upload with the envelope JSON in a form field named envelope and the files as documents.
The example carries a real one-page PDF, so it works as it is against a sandbox.
Each PDF is checked: at most 20 MB by default, at most 20 per envelope, and it must open as a PDF. Field boxes are in PDF points from the top-left corner of the page and must fit on it.
Auth Sender API key, as Authorization: Bearer <key>
Send an Idempotency-Key to retry safely: the same key and body within 24 hours return the first response. See retries.
Headers
Idempotency-Key string
Any unique string, up to 255 characters. A retry with the same key and body within 24 hours returns the first response. The same key with a different body is a VALIDATION error; while the first request is still running, CONFLICT.
1 to 255 characters
Request body
Send it as application/json or multipart/form-data.
title string Required
1 to 200 characters
message string
Shown to recipients in the invitation and on the signing page.
1 to 5000 characters
changeNote string
For a revised envelope: what changed, shown to recipients as "What changed: …" in the invitation and on the signing page. Send null or an empty string to clear it.
At most 2000 characters
routing string
sequential goes by order, lowest first (equal orders sign together); parallel invites everyone at once.
One of sequential parallel · Default sequential
reminders object
Attributes of reminders
firstAfterDays integer Required
Days after the invitation for the first reminder; 0 turns reminders off.
0 to 365
everyDays integer Required
1 to 365
max integer Required
Most reminders per recipient.
0 to 50
expiresAt string (date-time)
When the envelope expires; must be in the future.
expiresInDays integer
Used when expiresAt is not set.
Default 30 · 1 to 365
metadata map
Your own data, for example an employee id. Echoed in webhooks.
send boolean
Send at once instead of keeping a draft.
Default false
documents array of objects Required
1 to 20 items
Attributes of documents
key string
How fields refer to this document in the same request. Default its position, "0".
At most 100 characters
name string Required
1 to 200 characters
content string (base64) Required
The PDF file as base64.
recipients array of objects Required
1 to 50 items
Attributes of recipients
key string
How fields refer to this recipient in the same request. Default its position, "0".
At most 100 characters
id string
On PATCH, the id of an existing recipient to keep.
name string Required
1 to 200 characters
email string (email)
At most 254 characters
phone string
International format, like +919812345678.
Matches ^\+[1-9]\d{6,14}$
role string
Signers fill fields, approvers approve without fields, viewers get a copy.
One of signer approver viewer · Default signer
auth string
How the recipient proves who they are. email_otp, the default, asks for the link and a code sent by email; email_link needs only the link.
One of email_link email_otp sms_otp aadhaar · Default email_otp
order integer
Signing order in sequential routing. Default the position in the list, from 1.
1 to 1000
fields array of objects
At most 500 items
Attributes of fields
recipient string Required
The recipient's key (or id on PATCH).
document string
The document's key or id. Optional when the envelope has one document.
type string
A recipient with auth: aadhaar fills in nothing: the eSign provider signs the document as the sender approved it, with the values of the signers before them. They may have one aadhaar field, the Aadhaar seal position: it only says where the provider draws its signature, takes no value, and nothing is drawn for it. Without it the provider places the signature where its own setting says. A second aadhaar field is refused with VALIDATION. signature and initials fields given to such a signer are dropped when the envelope is sent, so older requests still work; any other field for them is refused with VALIDATION. Only an Aadhaar eSign signer may have an aadhaar field.
One of signature initials date_signed name text checkbox aadhaar · Default signature
page integer Required
Zero-based page index.
0 to 10000
x number
At least 0
y number
At least 0
width number
At least 1
height number
At least 1
rect object
A box in PDF points, measured from the top-left corner of the page.
Attributes of rect
x number Required
At least 0
y number Required
At least 0
width number Required
At least 1
height number Required
At least 1
required boolean
Default true
label string
At most 200 characters
Returns
201 Created. The envelope, as a draft or already sent. An envelope object.
Idempotent-Replayed:truewhen this is the stored response to an earlier request with the sameIdempotency-Key.
Errors
| Status | When |
|---|---|
| 400 | VALIDATION: the request is malformed. details.issues lists each problem. |
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 403 | FORBIDDEN: the credential may only read. |
| 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. |
| 413 | DOCUMENT_TOO_LARGE: a PDF or the whole request is over the limit (details.maxBytes). |
| 422 | DOCUMENT_INVALID: a file is not a readable PDF. PDF_ALREADY_SIGNED: a file already carries digital signatures; upload the unsigned original. REQUIRED_FIELDS_MISSING: required fields were left empty. INVALID_FIELD_VALUE: a value does not suit its field (PNG, date, length). |
| 429 | RATE_LIMITED: too many requests. Wait Retry-After seconds. |
| 500 | INTERNAL or SEAL_FAILED. Safe to retry with the same Idempotency-Key. |
curl -X POST https://sign.codevibe.in/api/v1/envelopes \
-H "Authorization: Bearer $SIGN_API_KEY" \
-H "Idempotency-Key: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" \
-H "Content-Type: application/json" \
-d '{
"title": "Offer letter",
"message": "Please sign by Friday.",
"send": true,
"routing": "sequential",
"documents": [
{
"key": "offer",
"name": "offer.pdf",
"content": "'"$(base64 < offer.pdf | tr -d '\n')"'"
}
],
"recipients": [
{
"key": "asha",
"name": "Asha Rao",
"email": "asha@example.com",
"auth": "email_otp"
},
{
"key": "ravi",
"name": "Ravi Kumar",
"email": "ravi@example.com"
},
{
"key": "hr",
"name": "HR Team",
"email": "hr@example.com",
"role": "viewer"
}
],
"fields": [
{
"recipient": "asha",
"document": "offer",
"type": "signature",
"page": 0,
"x": 72,
"y": 640,
"width": 180,
"height": 48
},
{
"recipient": "ravi",
"type": "signature",
"page": 0,
"x": 320,
"y": 640,
"width": 180,
"height": 48
}
],
"metadata": {
"employeeId": "E-1042"
}
}'import { readFile } from 'node:fs/promises';
import { createSignClient } from '@codevibe_technology/sign-client';
const sign = createSignClient({
baseUrl: 'https://sign.codevibe.in/api',
apiKey: process.env.SIGN_API_KEY!,
});
const envelope = await sign.envelopes.create({
title: 'Offer letter',
message: 'Please sign by Friday.',
send: true,
routing: 'sequential',
documents: [
{
key: 'offer',
name: 'offer.pdf',
content: await readFile('offer.pdf'),
},
],
recipients: [
{
key: 'asha',
name: 'Asha Rao',
email: 'asha@example.com',
auth: 'email_otp',
},
{
key: 'ravi',
name: 'Ravi Kumar',
email: 'ravi@example.com',
},
{
key: 'hr',
name: 'HR Team',
email: 'hr@example.com',
role: 'viewer',
},
],
fields: [
{
recipient: 'asha',
document: 'offer',
type: 'signature',
page: 0,
x: 72,
y: 640,
width: 180,
height: 48,
},
{
recipient: 'ravi',
type: 'signature',
page: 0,
x: 320,
y: 640,
width: 180,
height: 48,
},
],
metadata: {
employeeId: 'E-1042',
},
});
console.log(envelope.id, envelope.status);import os
import base64
import requests
def b64(path):
with open(path, "rb") as file:
return base64.b64encode(file.read()).decode()
response = requests.post(
"https://sign.codevibe.in/api/v1/envelopes",
headers={
"Authorization": f"Bearer {os.environ['SIGN_API_KEY']}",
"Idempotency-Key": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
},
json={
"title": "Offer letter",
"message": "Please sign by Friday.",
"send": True,
"routing": "sequential",
"documents": [
{
"key": "offer",
"name": "offer.pdf",
"content": b64("offer.pdf"),
},
],
"recipients": [
{
"key": "asha",
"name": "Asha Rao",
"email": "asha@example.com",
"auth": "email_otp",
},
{
"key": "ravi",
"name": "Ravi Kumar",
"email": "ravi@example.com",
},
{
"key": "hr",
"name": "HR Team",
"email": "hr@example.com",
"role": "viewer",
},
],
"fields": [
{
"recipient": "asha",
"document": "offer",
"type": "signature",
"page": 0,
"x": 72,
"y": 640,
"width": 180,
"height": 48,
},
{
"recipient": "ravi",
"type": "signature",
"page": 0,
"x": 320,
"y": 640,
"width": 180,
"height": 48,
},
],
"metadata": {
"employeeId": "E-1042",
},
},
timeout=30,
)
response.raise_for_status()
print(response.json())package main
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func b64(path string) string {
data, err := os.ReadFile(path)
if err != nil {
panic(err)
}
return base64.StdEncoding.EncodeToString(data)
}
func main() {
payload, err := json.Marshal(map[string]any{
"title": "Offer letter",
"message": "Please sign by Friday.",
"send": true,
"routing": "sequential",
"documents": []any{
map[string]any{
"key": "offer",
"name": "offer.pdf",
"content": b64("offer.pdf"),
},
},
"recipients": []any{
map[string]any{
"key": "asha",
"name": "Asha Rao",
"email": "asha@example.com",
"auth": "email_otp",
},
map[string]any{
"key": "ravi",
"name": "Ravi Kumar",
"email": "ravi@example.com",
},
map[string]any{
"key": "hr",
"name": "HR Team",
"email": "hr@example.com",
"role": "viewer",
},
},
"fields": []any{
map[string]any{
"recipient": "asha",
"document": "offer",
"type": "signature",
"page": 0,
"x": 72,
"y": 640,
"width": 180,
"height": 48,
},
map[string]any{
"recipient": "ravi",
"type": "signature",
"page": 0,
"x": 320,
"y": 640,
"width": 180,
"height": 48,
},
},
"metadata": map[string]any{
"employeeId": "E-1042",
},
})
if err != nil {
panic(err)
}
req, err := http.NewRequest("POST", "https://sign.codevibe.in/api/v1/envelopes", bytes.NewReader(payload))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SIGN_API_KEY"))
req.Header.Set("Idempotency-Key", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
req.Header.Set("Content-Type", "application/json")
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))
}{
"id": "7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37",
"title": "Offer letter",
"message": "Please sign by Friday.",
"status": "sent",
"routing": "sequential",
"documents": [
{
"id": "1b8e4f60-2c3a-4d7e-8f91-a5c2e6b3d048",
"name": "offer.pdf",
"sha256": "1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d",
"pageCount": 1,
"pageSizes": [
{
"width": 595.28,
"height": 841.89
}
]
}
],
"recipients": [
{
"id": "c4a1d9e2-7f3b-4c8d-a6e5-0b9f2d1c7e83",
"name": "Asha Rao",
"email": "asha@example.com",
"role": "signer",
"order": 1,
"auth": "email_otp",
"status": "notified",
"notifiedAt": "2026-03-02T09:00:00.000Z"
}
],
"fields": [
{
"id": "e9d2b7c1-4a6f-4e3b-8d5c-3f1a0b2c6d94",
"documentId": "1b8e4f60-2c3a-4d7e-8f91-a5c2e6b3d048",
"recipientId": "c4a1d9e2-7f3b-4c8d-a6e5-0b9f2d1c7e83",
"type": "signature",
"page": 0,
"rect": {
"x": 72,
"y": 640,
"width": 180,
"height": 48
},
"required": true
}
],
"values": [],
"reminders": {
"firstAfterDays": 2,
"everyDays": 2,
"max": 3
},
"expiresAt": "2026-04-01T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"sentAt": "2026-03-02T09:00:00.000Z",
"metadata": {
"employeeId": "E-1042"
},
"auditHead": "3b5f0c4d6e1a2b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c"
}Get an envelope
GET/v1/envelopes/{id}
The envelope with its documents, recipients, fields and the values entered so far.
Auth Sender API key, as Authorization: Bearer <key>
Path parameters
id string Required
The envelope id.
Returns
200 OK. The envelope. An envelope 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 \
-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 envelope = await sign.envelopes.get('7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37');
console.log(envelope.status, envelope.recipients);import os
import requests
response = requests.get(
"https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37",
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", 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))
}{
"id": "7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37",
"title": "Offer letter",
"message": "Please sign by Friday.",
"status": "sent",
"routing": "sequential",
"documents": [
{
"id": "1b8e4f60-2c3a-4d7e-8f91-a5c2e6b3d048",
"name": "offer.pdf",
"sha256": "1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d",
"pageCount": 1,
"pageSizes": [
{
"width": 595.28,
"height": 841.89
}
]
}
],
"recipients": [
{
"id": "c4a1d9e2-7f3b-4c8d-a6e5-0b9f2d1c7e83",
"name": "Asha Rao",
"email": "asha@example.com",
"role": "signer",
"order": 1,
"auth": "email_otp",
"status": "notified",
"notifiedAt": "2026-03-02T09:00:00.000Z"
}
],
"fields": [
{
"id": "e9d2b7c1-4a6f-4e3b-8d5c-3f1a0b2c6d94",
"documentId": "1b8e4f60-2c3a-4d7e-8f91-a5c2e6b3d048",
"recipientId": "c4a1d9e2-7f3b-4c8d-a6e5-0b9f2d1c7e83",
"type": "signature",
"page": 0,
"rect": {
"x": 72,
"y": 640,
"width": 180,
"height": 48
},
"required": true
}
],
"values": [],
"reminders": {
"firstAfterDays": 2,
"everyDays": 2,
"max": 3
},
"expiresAt": "2026-04-01T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"sentAt": "2026-03-02T09:00:00.000Z",
"metadata": {
"employeeId": "E-1042"
},
"auditHead": "3b5f0c4d6e1a2b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c"
}Change a draft
PATCH/v1/envelopes/{id}
Changes a draft envelope. Only the properties you send change. recipients and fields, when sent, replace the whole list: pass a recipient's id to keep it (its signing order and details are updated), leave it out to remove it. Fields name their recipient by key or id and their document by id or position ("0"). Documents cannot be changed; create a new envelope instead. Send "message": null to remove the message.
Auth Sender API key, as Authorization: Bearer <key>
Path parameters
id string Required
The envelope id.
Request body
title string
1 to 200 characters
message string or null
At most 5000 characters
changeNote string
For a revised envelope: what changed, shown to recipients as "What changed: …" in the invitation and on the signing page. Send null or an empty string to clear it.
At most 2000 characters
routing string
sequential goes by order, lowest first (equal orders sign together); parallel invites everyone at once.
One of sequential parallel · Default sequential
reminders object
Attributes of reminders
firstAfterDays integer Required
Days after the invitation for the first reminder; 0 turns reminders off.
0 to 365
everyDays integer Required
1 to 365
max integer Required
Most reminders per recipient.
0 to 50
expiresAt string (date-time)
When the envelope expires; must be in the future.
expiresInDays integer
Used when expiresAt is not set.
Default 30 · 1 to 365
metadata map
Your own data, for example an employee id. Echoed in webhooks.
recipients array of objects
Replaces the recipients. Include id to keep an existing one.
1 to 50 items
Attributes of recipients
key string
How fields refer to this recipient in the same request. Default its position, "0".
At most 100 characters
id string
On PATCH, the id of an existing recipient to keep.
name string Required
1 to 200 characters
email string (email)
At most 254 characters
phone string
International format, like +919812345678.
Matches ^\+[1-9]\d{6,14}$
role string
Signers fill fields, approvers approve without fields, viewers get a copy.
One of signer approver viewer · Default signer
auth string
How the recipient proves who they are. email_otp, the default, asks for the link and a code sent by email; email_link needs only the link.
One of email_link email_otp sms_otp aadhaar · Default email_otp
order integer
Signing order in sequential routing. Default the position in the list, from 1.
1 to 1000
fields array of objects
Replaces all fields.
At most 500 items
Attributes of fields
recipient string Required
The recipient's key (or id on PATCH).
document string
The document's key or id. Optional when the envelope has one document.
type string
A recipient with auth: aadhaar fills in nothing: the eSign provider signs the document as the sender approved it, with the values of the signers before them. They may have one aadhaar field, the Aadhaar seal position: it only says where the provider draws its signature, takes no value, and nothing is drawn for it. Without it the provider places the signature where its own setting says. A second aadhaar field is refused with VALIDATION. signature and initials fields given to such a signer are dropped when the envelope is sent, so older requests still work; any other field for them is refused with VALIDATION. Only an Aadhaar eSign signer may have an aadhaar field.
One of signature initials date_signed name text checkbox aadhaar · Default signature
page integer Required
Zero-based page index.
0 to 10000
x number
At least 0
y number
At least 0
width number
At least 1
height number
At least 1
rect object
A box in PDF points, measured from the top-left corner of the page.
Attributes of rect
x number Required
At least 0
y number Required
At least 0
width number Required
At least 1
height number Required
At least 1
required boolean
Default true
label string
At most 200 characters
Returns
200 OK. The changed draft. An envelope object.
Errors
| Status | When |
|---|---|
| 400 | VALIDATION: the request is malformed. details.issues lists each problem. |
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 403 | FORBIDDEN: the credential may only read. |
| 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 -X PATCH https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37 \
-H "Authorization: Bearer $SIGN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Offer letter (revised)",
"expiresInDays": 14
}'import { createSignClient } from '@codevibe_technology/sign-client';
const sign = createSignClient({
baseUrl: 'https://sign.codevibe.in/api',
apiKey: process.env.SIGN_API_KEY!,
});
const envelope = await sign.envelopes.update('7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37', {
title: 'Offer letter (revised)',
expiresInDays: 14,
});import os
import requests
response = requests.patch(
"https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37",
headers={
"Authorization": f"Bearer {os.environ['SIGN_API_KEY']}",
},
json={
"title": "Offer letter (revised)",
"expiresInDays": 14,
},
timeout=30,
)
response.raise_for_status()
print(response.json())package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
payload, err := json.Marshal(map[string]any{
"title": "Offer letter (revised)",
"expiresInDays": 14,
})
if err != nil {
panic(err)
}
req, err := http.NewRequest("PATCH", "https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37", bytes.NewReader(payload))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SIGN_API_KEY"))
req.Header.Set("Content-Type", "application/json")
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))
}{
"id": "string",
"title": "string",
"message": "string",
"changeNote": "string",
"status": "draft",
"routing": "sequential",
"documents": [
{
"id": "string",
"name": "string",
"sha256": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"pageCount": 1,
"pageSizes": [
{
"width": 1,
"height": 1
}
]
}
],
"recipients": [
{
"id": "string",
"name": "string",
"email": "asha@example.com",
"phone": "+919876543210",
"role": "signer",
"order": 1,
"auth": "email_link",
"status": "pending",
"declineReason": "string",
"actedAt": "2026-03-02T09:14:31.000Z",
"notifiedAt": "2026-03-02T09:14:31.000Z",
"viewedAt": "2026-03-02T09:14:31.000Z",
"remindersSent": 0,
"lastRemindedAt": "2026-03-02T09:14:31.000Z",
"esign": {
"provider": "leegality",
"status": "pending",
"signerName": "string",
"signedAt": "2026-03-02T09:14:31.000Z",
"ref": "string",
"sandbox": true
}
}
],
"fields": [
{
"id": "string",
"documentId": "string",
"recipientId": "string",
"type": "signature",
"page": 0,
"rect": {
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"required": true,
"label": "string",
"readOnly": true
}
],
"values": [
{
"fieldId": "string",
"value": "string"
}
],
"reminders": {
"firstAfterDays": 0,
"everyDays": 1,
"max": 0
},
"expiresAt": "2026-03-02T09:14:31.000Z",
"createdAt": "2026-03-02T09:14:31.000Z",
"sentAt": "2026-03-02T09:14:31.000Z",
"completedAt": "2026-03-02T09:14:31.000Z",
"metadata": {},
"auditHead": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c"
}Send a draft
POST/v1/envelopes/{id}/send
Sends the draft. In sequential routing the recipients with the lowest order get their signing links; in parallel routing everyone does. Viewers get a copy once it is complete. The envelope needs at least one signer or approver, and every signer needs a signature field.
Auth Sender API key, as Authorization: Bearer <key>
Send an Idempotency-Key to retry safely: the same key and body within 24 hours return the first response. See retries.
Path parameters
id string Required
The envelope id.
Headers
Idempotency-Key string
Any unique string, up to 255 characters. A retry with the same key and body within 24 hours returns the first response. The same key with a different body is a VALIDATION error; while the first request is still running, CONFLICT.
1 to 255 characters
Returns
200 OK. The sent envelope. An envelope object.
Idempotent-Replayed:truewhen this is the stored response to an earlier request with the sameIdempotency-Key.
Errors
| Status | When |
|---|---|
| 400 | VALIDATION: the request is malformed. details.issues lists each problem. |
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 403 | FORBIDDEN: the credential may only read. |
| 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. |
| 410 | ENVELOPE_EXPIRED: the envelope is past its expiry. |
curl -X POST https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/send \
-H "Authorization: Bearer $SIGN_API_KEY" \
-H "Idempotency-Key: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"import { createSignClient } from '@codevibe_technology/sign-client';
const sign = createSignClient({
baseUrl: 'https://sign.codevibe.in/api',
apiKey: process.env.SIGN_API_KEY!,
});
const envelope = await sign.envelopes.send('7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37');import os
import requests
response = requests.post(
"https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/send",
headers={
"Authorization": f"Bearer {os.environ['SIGN_API_KEY']}",
"Idempotency-Key": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
},
timeout=30,
)
response.raise_for_status()
print(response.json())package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("POST", "https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/send", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SIGN_API_KEY"))
req.Header.Set("Idempotency-Key", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
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))
}{
"id": "string",
"title": "string",
"message": "string",
"changeNote": "string",
"status": "draft",
"routing": "sequential",
"documents": [
{
"id": "string",
"name": "string",
"sha256": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"pageCount": 1,
"pageSizes": [
{
"width": 1,
"height": 1
}
]
}
],
"recipients": [
{
"id": "string",
"name": "string",
"email": "asha@example.com",
"phone": "+919876543210",
"role": "signer",
"order": 1,
"auth": "email_link",
"status": "pending",
"declineReason": "string",
"actedAt": "2026-03-02T09:14:31.000Z",
"notifiedAt": "2026-03-02T09:14:31.000Z",
"viewedAt": "2026-03-02T09:14:31.000Z",
"remindersSent": 0,
"lastRemindedAt": "2026-03-02T09:14:31.000Z",
"esign": {
"provider": "leegality",
"status": "pending",
"signerName": "string",
"signedAt": "2026-03-02T09:14:31.000Z",
"ref": "string",
"sandbox": true
}
}
],
"fields": [
{
"id": "string",
"documentId": "string",
"recipientId": "string",
"type": "signature",
"page": 0,
"rect": {
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"required": true,
"label": "string",
"readOnly": true
}
],
"values": [
{
"fieldId": "string",
"value": "string"
}
],
"reminders": {
"firstAfterDays": 0,
"everyDays": 1,
"max": 0
},
"expiresAt": "2026-03-02T09:14:31.000Z",
"createdAt": "2026-03-02T09:14:31.000Z",
"sentAt": "2026-03-02T09:14:31.000Z",
"completedAt": "2026-03-02T09:14:31.000Z",
"metadata": {},
"auditHead": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c"
}Withdraw an envelope
POST/v1/envelopes/{id}/void
Withdraws a sent envelope that is not yet final. Signing links stop working and recipients already invited are told it was withdrawn.
Auth Sender API key, as Authorization: Bearer <key>
Send an Idempotency-Key to retry safely: the same key and body within 24 hours return the first response. See retries.
Path parameters
id string Required
The envelope id.
Headers
Idempotency-Key string
Any unique string, up to 255 characters. A retry with the same key and body within 24 hours returns the first response. The same key with a different body is a VALIDATION error; while the first request is still running, CONFLICT.
1 to 255 characters
Request body
reason string Required
Shown to recipients and kept in the audit log.
Not empty
Returns
200 OK. The voided envelope. An envelope object.
Idempotent-Replayed:truewhen this is the stored response to an earlier request with the sameIdempotency-Key.
Errors
| Status | When |
|---|---|
| 400 | VALIDATION: the request is malformed. details.issues lists each problem. |
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 403 | FORBIDDEN: the credential may only read. |
| 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 -X POST https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/void \
-H "Authorization: Bearer $SIGN_API_KEY" \
-H "Idempotency-Key: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" \
-H "Content-Type: application/json" \
-d '{
"reason": "The offer was sent to the wrong address."
}'import { createSignClient } from '@codevibe_technology/sign-client';
const sign = createSignClient({
baseUrl: 'https://sign.codevibe.in/api',
apiKey: process.env.SIGN_API_KEY!,
});
const envelope = await sign.envelopes.void('7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37', 'The offer was sent to the wrong address.');import os
import requests
response = requests.post(
"https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/void",
headers={
"Authorization": f"Bearer {os.environ['SIGN_API_KEY']}",
"Idempotency-Key": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
},
json={
"reason": "The offer was sent to the wrong address.",
},
timeout=30,
)
response.raise_for_status()
print(response.json())package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
payload, err := json.Marshal(map[string]any{
"reason": "The offer was sent to the wrong address.",
})
if err != nil {
panic(err)
}
req, err := http.NewRequest("POST", "https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/void", bytes.NewReader(payload))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SIGN_API_KEY"))
req.Header.Set("Idempotency-Key", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
req.Header.Set("Content-Type", "application/json")
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))
}{
"id": "string",
"title": "string",
"message": "string",
"changeNote": "string",
"status": "draft",
"routing": "sequential",
"documents": [
{
"id": "string",
"name": "string",
"sha256": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"pageCount": 1,
"pageSizes": [
{
"width": 1,
"height": 1
}
]
}
],
"recipients": [
{
"id": "string",
"name": "string",
"email": "asha@example.com",
"phone": "+919876543210",
"role": "signer",
"order": 1,
"auth": "email_link",
"status": "pending",
"declineReason": "string",
"actedAt": "2026-03-02T09:14:31.000Z",
"notifiedAt": "2026-03-02T09:14:31.000Z",
"viewedAt": "2026-03-02T09:14:31.000Z",
"remindersSent": 0,
"lastRemindedAt": "2026-03-02T09:14:31.000Z",
"esign": {
"provider": "leegality",
"status": "pending",
"signerName": "string",
"signedAt": "2026-03-02T09:14:31.000Z",
"ref": "string",
"sandbox": true
}
}
],
"fields": [
{
"id": "string",
"documentId": "string",
"recipientId": "string",
"type": "signature",
"page": 0,
"rect": {
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"required": true,
"label": "string",
"readOnly": true
}
],
"values": [
{
"fieldId": "string",
"value": "string"
}
],
"reminders": {
"firstAfterDays": 0,
"everyDays": 1,
"max": 0
},
"expiresAt": "2026-03-02T09:14:31.000Z",
"createdAt": "2026-03-02T09:14:31.000Z",
"sentAt": "2026-03-02T09:14:31.000Z",
"completedAt": "2026-03-02T09:14:31.000Z",
"metadata": {},
"auditHead": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c"
}Recall a sent envelope to edit it
POST/v1/envelopes/{id}/recall
Voids a sent or in-progress envelope with the reason "Recalled to correct" (and your note), exactly like void: links stop and everyone already invited is told. Then creates a new draft with the same documents (the original files), recipients, fields, title, message and reminders, and an expiry of the same length from now. Signatures already given are not carried over; everyone signs again. The old envelope records envelope.recalled with replacementId; the draft's envelope.created has recalledFrom.
Auth Sender API key, as Authorization: Bearer <key>
Path parameters
id string Required
The envelope id.
Request body
note string
At most 900 characters
Returns
201 Created. The new draft and the recalled envelope. An EnvelopeCopy object.
Errors
| Status | When |
|---|---|
| 400 | VALIDATION: the request is malformed. details.issues lists each problem. |
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 403 | FORBIDDEN: the credential may only read. |
| 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 -X POST https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/recall \
-H "Authorization: Bearer $SIGN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "The joining date was wrong."
}'import { createSignClient } from '@codevibe_technology/sign-client';
const sign = createSignClient({
baseUrl: 'https://sign.codevibe.in/api',
apiKey: process.env.SIGN_API_KEY!,
});
const { draft, recalled } = await sign.envelopes.recall('7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37', 'The joining date was wrong.');import os
import requests
response = requests.post(
"https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/recall",
headers={
"Authorization": f"Bearer {os.environ['SIGN_API_KEY']}",
},
json={
"note": "The joining date was wrong.",
},
timeout=30,
)
response.raise_for_status()
print(response.json())package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
payload, err := json.Marshal(map[string]any{
"note": "The joining date was wrong.",
})
if err != nil {
panic(err)
}
req, err := http.NewRequest("POST", "https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/recall", bytes.NewReader(payload))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SIGN_API_KEY"))
req.Header.Set("Content-Type", "application/json")
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))
}{
"draft": {
"id": "string",
"title": "string",
"message": "string",
"changeNote": "string",
"status": "draft",
"routing": "sequential",
"documents": [
{
"id": "string",
"name": "string",
"sha256": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"pageCount": 1,
"pageSizes": [
{
"width": 1,
"height": 1
}
]
}
],
"recipients": [
{
"id": "string",
"name": "string",
"email": "asha@example.com",
"phone": "+919876543210",
"role": "signer",
"order": 1,
"auth": "email_link",
"status": "pending",
"declineReason": "string",
"actedAt": "2026-03-02T09:14:31.000Z",
"notifiedAt": "2026-03-02T09:14:31.000Z",
"viewedAt": "2026-03-02T09:14:31.000Z",
"remindersSent": 0,
"lastRemindedAt": "2026-03-02T09:14:31.000Z",
"esign": {
"provider": "leegality",
"status": "pending",
"signerName": "string",
"signedAt": "2026-03-02T09:14:31.000Z",
"ref": "string",
"sandbox": true
}
}
],
"fields": [
{
"id": "string",
"documentId": "string",
"recipientId": "string",
"type": "signature",
"page": 0,
"rect": {
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"required": true,
"label": "string",
"readOnly": true
}
],
"values": [
{
"fieldId": "string",
"value": "string"
}
],
"reminders": {
"firstAfterDays": 0,
"everyDays": 1,
"max": 0
},
"expiresAt": "2026-03-02T09:14:31.000Z",
"createdAt": "2026-03-02T09:14:31.000Z",
"sentAt": "2026-03-02T09:14:31.000Z",
"completedAt": "2026-03-02T09:14:31.000Z",
"metadata": {},
"auditHead": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c"
},
"recalled": {
"id": "string",
"title": "string",
"message": "string",
"changeNote": "string",
"status": "draft",
"routing": "sequential",
"documents": [
{
"id": "string",
"name": "string",
"sha256": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"pageCount": 1,
"pageSizes": [
{
"width": 1,
"height": 1
}
]
}
],
"recipients": [
{
"id": "string",
"name": "string",
"email": "asha@example.com",
"phone": "+919876543210",
"role": "signer",
"order": 1,
"auth": "email_link",
"status": "pending",
"declineReason": "string",
"actedAt": "2026-03-02T09:14:31.000Z",
"notifiedAt": "2026-03-02T09:14:31.000Z",
"viewedAt": "2026-03-02T09:14:31.000Z",
"remindersSent": 0,
"lastRemindedAt": "2026-03-02T09:14:31.000Z",
"esign": {
"provider": "leegality",
"status": "pending",
"signerName": "string",
"signedAt": "2026-03-02T09:14:31.000Z",
"ref": "string",
"sandbox": true
}
}
],
"fields": [
{
"id": "string",
"documentId": "string",
"recipientId": "string",
"type": "signature",
"page": 0,
"rect": {
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"required": true,
"label": "string",
"readOnly": true
}
],
"values": [
{
"fieldId": "string",
"value": "string"
}
],
"reminders": {
"firstAfterDays": 0,
"everyDays": 1,
"max": 0
},
"expiresAt": "2026-03-02T09:14:31.000Z",
"createdAt": "2026-03-02T09:14:31.000Z",
"sentAt": "2026-03-02T09:14:31.000Z",
"completedAt": "2026-03-02T09:14:31.000Z",
"metadata": {},
"auditHead": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c"
}
}Revise a declined envelope
POST/v1/envelopes/{id}/revise
Copies a declined envelope to a new draft, like recall, so you can address the decline and send again. The declined envelope stays declined and unchanged; it records envelope.revised with replacementId, and the draft's envelope.created has revisedFrom. Set changeNote on the draft to tell recipients what changed.
Auth Sender API key, as Authorization: Bearer <key>
Path parameters
id string Required
The envelope id.
Returns
201 Created. The new draft and the declined envelope. An object.
Errors
| Status | When |
|---|---|
| 400 | VALIDATION: the request is malformed. details.issues lists each problem. |
| 401 | UNAUTHORIZED: the API key is missing or not valid. |
| 403 | FORBIDDEN: the credential may only read. |
| 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 -X POST https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/revise \
-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 { draft, declined } = await sign.envelopes.revise('7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37');import os
import requests
response = requests.post(
"https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/revise",
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("POST", "https://sign.codevibe.in/api/v1/envelopes/7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a0c37/revise", 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))
}{
"draft": {
"id": "string",
"title": "string",
"message": "string",
"changeNote": "string",
"status": "draft",
"routing": "sequential",
"documents": [
{
"id": "string",
"name": "string",
"sha256": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"pageCount": 1,
"pageSizes": [
{
"width": 1,
"height": 1
}
]
}
],
"recipients": [
{
"id": "string",
"name": "string",
"email": "asha@example.com",
"phone": "+919876543210",
"role": "signer",
"order": 1,
"auth": "email_link",
"status": "pending",
"declineReason": "string",
"actedAt": "2026-03-02T09:14:31.000Z",
"notifiedAt": "2026-03-02T09:14:31.000Z",
"viewedAt": "2026-03-02T09:14:31.000Z",
"remindersSent": 0,
"lastRemindedAt": "2026-03-02T09:14:31.000Z",
"esign": {
"provider": "leegality",
"status": "pending",
"signerName": "string",
"signedAt": "2026-03-02T09:14:31.000Z",
"ref": "string",
"sandbox": true
}
}
],
"fields": [
{
"id": "string",
"documentId": "string",
"recipientId": "string",
"type": "signature",
"page": 0,
"rect": {
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"required": true,
"label": "string",
"readOnly": true
}
],
"values": [
{
"fieldId": "string",
"value": "string"
}
],
"reminders": {
"firstAfterDays": 0,
"everyDays": 1,
"max": 0
},
"expiresAt": "2026-03-02T09:14:31.000Z",
"createdAt": "2026-03-02T09:14:31.000Z",
"sentAt": "2026-03-02T09:14:31.000Z",
"completedAt": "2026-03-02T09:14:31.000Z",
"metadata": {},
"auditHead": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c"
},
"declined": {
"id": "string",
"title": "string",
"message": "string",
"changeNote": "string",
"status": "draft",
"routing": "sequential",
"documents": [
{
"id": "string",
"name": "string",
"sha256": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c",
"pageCount": 1,
"pageSizes": [
{
"width": 1,
"height": 1
}
]
}
],
"recipients": [
{
"id": "string",
"name": "string",
"email": "asha@example.com",
"phone": "+919876543210",
"role": "signer",
"order": 1,
"auth": "email_link",
"status": "pending",
"declineReason": "string",
"actedAt": "2026-03-02T09:14:31.000Z",
"notifiedAt": "2026-03-02T09:14:31.000Z",
"viewedAt": "2026-03-02T09:14:31.000Z",
"remindersSent": 0,
"lastRemindedAt": "2026-03-02T09:14:31.000Z",
"esign": {
"provider": "leegality",
"status": "pending",
"signerName": "string",
"signedAt": "2026-03-02T09:14:31.000Z",
"ref": "string",
"sandbox": true
}
}
],
"fields": [
{
"id": "string",
"documentId": "string",
"recipientId": "string",
"type": "signature",
"page": 0,
"rect": {
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"required": true,
"label": "string",
"readOnly": true
}
],
"values": [
{
"fieldId": "string",
"value": "string"
}
],
"reminders": {
"firstAfterDays": 0,
"everyDays": 1,
"max": 0
},
"expiresAt": "2026-03-02T09:14:31.000Z",
"createdAt": "2026-03-02T09:14:31.000Z",
"sentAt": "2026-03-02T09:14:31.000Z",
"completedAt": "2026-03-02T09:14:31.000Z",
"metadata": {},
"auditHead": "9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c9f2c"
}
}