Signature
Send an approved contract or offer to its recipients, follow each recipient and archive the document once everyone has signed.
On this page
Only an approved contract or offer is sent for signature. The recipients are the signatory of your company and the contacts named at the counterparty of the document. The example sends the offer DOC-2026-0397 to ana-rusu, liviu-petcu, simona-vlad.
curl
curl -X POST "$RDC_BASE_URL/documents/v1/documents/a88f20a7-5780-43ad-83ff-ce70dde35f59/signature-requests" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "fd18085b-442a-421c-85e6-8b076d422360",
"expectedRevision": 8,
"by": "andrei-pop",
"recipients": [
"ana-rusu",
"liviu-petcu",
"simona-vlad"
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/documents/v1/documents/a88f20a7-5780-43ad-83ff-ce70dde35f59/signature-requests`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "fd18085b-442a-421c-85e6-8b076d422360",
"expectedRevision": 8,
"by": "andrei-pop",
"recipients": [
"ana-rusu",
"liviu-petcu",
"simona-vlad"
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/documents/v1/documents/a88f20a7-5780-43ad-83ff-ce70dde35f59/signature-requests',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'fd18085b-442a-421c-85e6-8b076d422360',
'expectedRevision': 8,
'by': 'andrei-pop',
'recipients': [
'ana-rusu',
'liviu-petcu',
'simona-vlad',
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "fd18085b-442a-421c-85e6-8b076d422360",
"expectedRevision": 8,
"by": "andrei-pop",
"recipients": [
"ana-rusu",
"liviu-petcu",
"simona-vlad"
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/documents/v1/documents/a88f20a7-5780-43ad-83ff-ce70dde35f59/signature-requests');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/documents/v1/documents/a88f20a7-5780-43ad-83ff-ce70dde35f59/signature-requests");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "fd18085b-442a-421c-85e6-8b076d422360",
"expectedRevision": 8,
"by": "andrei-pop",
"recipients": [
"ana-rusu",
"liviu-petcu",
"simona-vlad"
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "fd18085b-442a-421c-85e6-8b076d422360",
"status": "accepted",
"aggregateRevision": 9,
"signatureRequestId": "bcecb49b-0690-42b9-9b12-64a8efd0f8cb"
} The answer carries the signatureRequestId of the new request and the revision of the document after the change.
Who can be a recipient
A recipient is the signatory of your company or a contact named at the counterparty, here Market Trei Brazi SRL. A document without a counterparty has the signatory of your company alone. The same person twice is refused with recipient_duplicated, and an empty list with recipients_required.
| Recipient | Name | Role | Of |
|---|---|---|---|
ana-rusu | Ana Rusu | Finance director | Brumar Distribuție SRL |
liviu-petcu | Liviu Petcu | Purchasing manager | Market Trei Brazi SRL |
simona-vlad | Simona Vlad | Shop manager | Market Trei Brazi SRL |
Any other person is refused with recipient_not_found. The recipients sign in any order.
Follow each recipient
Read the current request of a document with getSignatureRequest. The example is DOC-2026-0398: one recipient has signed, one received the document and one is still at sent.
curl
curl "$RDC_BASE_URL/documents/v1/documents/472fda2c-c118-43fc-80a9-5a708911c856/signature-request" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/documents/v1/documents/472fda2c-c118-43fc-80a9-5a708911c856/signature-request`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/documents/v1/documents/472fda2c-c118-43fc-80a9-5a708911c856/signature-request',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/documents/v1/documents/472fda2c-c118-43fc-80a9-5a708911c856/signature-request');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/documents/v1/documents/472fda2c-c118-43fc-80a9-5a708911c856/signature-request");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"documentId": "472fda2c-c118-43fc-80a9-5a708911c856",
"id": "e4dd8cf2-2e3f-4179-a4fc-2eac1f3ae3bc",
"state": "open",
"sentAt": "2026-11-20T10:00:00Z",
"sentBy": "andrei-pop",
"recipients": [
{
"id": "ana-rusu",
"state": "signed",
"time": "2026-11-20T10:05:00Z"
},
{
"id": "mircea-balan",
"state": "delivered",
"time": "2026-11-20T10:02:00Z"
},
{
"id": "carmen-diaconu",
"state": "sent",
"time": "2026-11-20T10:00:00Z"
}
]
} | Recipient state | Meaning |
|---|---|
sent | The request was sent. The recipient has not received the document. |
delivered | The recipient received the document to sign. |
signed | The recipient signed. |
declined | The recipient declined and gave a reason. |
listSignatureRequests returns the current request of each document that has one. Filter it by state or by recipient to find the requests that wait for a person.
curl
curl "$RDC_BASE_URL/documents/v1/signature-requests?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/documents/v1/signature-requests?limit=20`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/documents/v1/signature-requests?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/documents/v1/signature-requests?limit=20');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/documents/v1/signature-requests?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"documentId": "472fda2c-c118-43fc-80a9-5a708911c856",
"id": "e4dd8cf2-2e3f-4179-a4fc-2eac1f3ae3bc",
"state": "open",
"sentAt": "2026-11-20T10:00:00Z",
"sentBy": "andrei-pop",
"recipients": [
{
"id": "ana-rusu",
"state": "signed",
"time": "2026-11-20T10:05:00Z"
},
{
"id": "mircea-balan",
"state": "delivered",
"time": "2026-11-20T10:02:00Z"
},
{
"id": "carmen-diaconu",
"state": "sent",
"time": "2026-11-20T10:00:00Z"
}
]
},
{
"documentId": "a88f20a7-5780-43ad-83ff-ce70dde35f59",
"id": "5fecfc4e-a69d-4b8c-bfb4-4047e51257dd",
"state": "declined",
"sentAt": "2026-11-11T09:00:00Z",
"sentBy": "andrei-pop",
"recipients": [
{
"id": "ana-rusu",
"state": "signed",
"time": "2026-11-11T10:30:00Z"
},
{
"id": "liviu-petcu",
"state": "declined",
"time": "2026-11-16T15:40:00Z",
"reason": "Asks for a lower delivery fee before signing."
}
]
}
],
"nextCursor": null
} Every step of a recipient adds a line to the audit trail, so the revision of the document grows. Read the document again before you send the next change.
How the request ends
| Request state | Document status | Meaning | Next |
|---|---|---|---|
open | approved | Not every recipient has signed, and none has declined. | Wait for the events, or read the request. |
signed | signed | Every recipient signed. | Archive the document. |
declined | approved | One recipient declined. That ends the request. | Send a new request. |
When a recipient declines
A decline ends the request and the document stays approved. The reason is on the recipient and in the audit trail. Send a new request with sendForSignature: it replaces the old one, and every recipient of it starts at sent, those who signed before included.
While a request is open, a second one is refused with signature_request_open. Once every recipient has signed, the document is signed and a new request is refused with already_signed.
Archive the signed document
Archive a contract or an offer after it is signed. Before that, archiveDocument answers signature_required. The example archives DOC-2026-0394, which both recipients signed.
curl
curl -X POST "$RDC_BASE_URL/documents/v1/documents/1ac68de2-2c38-4777-8300-64463eb461b3/archive" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a2fff411-d74b-45a7-a967-98b1b163ade5",
"expectedRevision": 8,
"by": "ioana-marin"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/documents/v1/documents/1ac68de2-2c38-4777-8300-64463eb461b3/archive`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a2fff411-d74b-45a7-a967-98b1b163ade5",
"expectedRevision": 8,
"by": "ioana-marin"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/documents/v1/documents/1ac68de2-2c38-4777-8300-64463eb461b3/archive',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a2fff411-d74b-45a7-a967-98b1b163ade5',
'expectedRevision': 8,
'by': 'ioana-marin',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a2fff411-d74b-45a7-a967-98b1b163ade5",
"expectedRevision": 8,
"by": "ioana-marin"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/documents/v1/documents/1ac68de2-2c38-4777-8300-64463eb461b3/archive');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/documents/v1/documents/1ac68de2-2c38-4777-8300-64463eb461b3/archive");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a2fff411-d74b-45a7-a967-98b1b163ade5",
"expectedRevision": 8,
"by": "ioana-marin"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "a2fff411-d74b-45a7-a967-98b1b163ade5",
"status": "accepted",
"aggregateRevision": 9
} Events
| Event | When |
|---|---|
document.signature_requested | A request for signature was sent. |
document.signature_delivered | A recipient received the document to sign. |
document.signature_signed | A recipient signed. status is signed once the last recipient has. |
document.signature_declined | A recipient declined to sign, with a reason. The request ends. |
document.archived | A document was archived. |
Every event has the number of the document in data. See the Event catalogue.
Codes and what to do
| Code | Status | Cause | What to do |
|---|---|---|---|
document_not_approved | 409 | The document is not approved yet. | Finish the approval, then send the request. |
class_not_signed | 422 | The class is not contract or offer. | No retry. Archive an approved invoice or report. |
recipient_not_found | 404 | A recipient is not a person who can sign this document. | Use the signatory of your company or a contact of the counterparty. |
recipients_required | 422 | The list of recipients is empty. | Name at least one recipient. |
recipient_duplicated | 422 | A person is named twice. | Name each person once. |
signature_request_open | 409 | A request is out and has not ended. | No retry. Read the request, and wait for it to end. |
already_signed | 409 | Every recipient has signed. | No retry. Archive the document. |
signature_request_not_found | 404 | No request was sent for the document. | Send one with sendForSignature. |
signature_required | 409 | A contract or an offer is archived before it is signed. | Wait until the document is signed, then archive it. |
document_not_final | 409 | The document is not approved, so it cannot be archived. | No retry. Read the document again. |
revision_conflict | 409 | The expectedRevision is older than the document. | Read the document again and send its revision. |
Related pages
- Approvals: approve the document before it is signed.
- Retention: how long an archived document is kept.
- Event catalogue: the events of a request.
- Errors: every code of the API.