The Doctavian API follows a small set of conventions across its Common, Documents and Signatures operations. This page explains them in one place. Each operation's exact request, response and error codes are in the API reference; where an operation departs from a convention, its reference description says so and takes precedence.
https://api.doctavian.com/v1The API version is the first path segment, v1. Every path then names an area (common, documents or signatures), a resource (such as datasource, template, envelope or folder) and an action. When the action targets one record, its id comes before the action: /documents/datasource/{dataSourceId}/update.
| Action | Method | Success status |
|---|---|---|
create, upload | POST | 201 |
get, list, download | GET | 200 |
update, move, edit | PUT | 200 |
delete | DELETE | 200 |
Workflow actions such as generate, send, sign | POST | Usually 200; see the operation |
| Header | When |
|---|---|
X-Api-Key | Every operation. |
Authorization: Bearer <token> | Almost every operation. Recipient-facing signing operations accept a tid query parameter in its place. |
X-Client-Authorization | Required on the async document operations; optional on envelope send, to receive status callbacks. |
Content-Type | application/json for JSON bodies; multipart/form-data for uploads. |
See Authentication for how to obtain each credential and which operations need which.
Every JSON success response wraps its payload in the same envelope:
{
"result": {
"statusCode": 201,
"message": "Created",
"data": { ... }
},
"consumption": [
{ "dimension": "envelopes-created", "value": 1 }
],
"externalContext": { "orderId": "SO-10442" },
"origin": "POST https://api.doctavian.com/v1/signatures/envelope/create",
"dateTime": "2026-11-19T10:04:31.5520417Z",
"userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d",
"operationId": "0d2f7c8e4b1a4f6c9e3d5a7b8c1e2f30"
}| Field | Meaning |
|---|---|
result.data | The payload. Its shape is specific to the operation. |
result.statusCode, result.message | The outcome. The status code normally matches the HTTP status, but not always: generate, manage and merge answer HTTP 200 with result.statusCode 201. |
consumption | On metered operations, what the call counted against your subscription. See Consumption. |
externalContext | Your request's externalContext, echoed back when you sent one. See externalContext. |
origin, dateTime, userId | The method and URL called, when the response was generated (UTC), and the calling user. |
operationId | Identifies the request in Doctavian's logs. Quote it to support. |
Two kinds of success response don't use the envelope:
generate/async, manage/async, merge/async) return 200 with an empty body once the request is queued. The result, in the envelope above, is POSTed to your callback URL.A failure carries error in place of result, and never carries consumption. Branch on error.innerErrors[].code. The metadata fields mean the same as on success. See Error Codes for the envelope and common codes, and Error Handling for retry guidance.
JSON request bodies wrap the resource in a property named after it, with externalContext beside it at the root:
POST https://api.doctavian.com/v1/documents/datasource/create
Authorization: Bearer <token>
x-api-key: <api-key>
Content-Type: application/json
{
"dataSource": {
"name": "Customer invoices",
"loadMethod": "Storage",
"urn": "3f9a7c14-2b8e-4d6a-9f01-5c7e2a1b3d4e"
},
"externalContext": { "orderId": "SO-10442" }
}The wrapper is dataSource, documentTemplate, documentSolution, folder, envelope and so on. Workflow operations such as generate, manage and merge, and envelope create, carry several root properties; each operation's reference shows its body. Signing actions such as accept, send or cancel take only externalContext, or an empty body.
Identifiers, ownership, folder and timestamps are server-assigned. Sending them in a create or update body has no effect, and the record's id travels in the path, not in the body. Uploads are the exception to JSON bodies; see Storage and File IDs.
externalContext is any JSON object you choose, such as your own record id or a trace id. Doctavian does not validate or interpret it. Where you put it decides what happens to it:
envelope.externalContext, template.externalContext, documents[].externalContext, recipients[].externalContext), it is stored with that record, returned by create, update and get, and sent on every envelope status callback.Responses return server ids and do not echo your client reference ids, so a per-document or per-recipient externalContext is how you match each returned entry to the one you sent. Envelope and Envelope Template updates replace the whole record, so leaving a stored externalContext out of an update clears it. Documents records (templates, data sources, solutions, configurations, requests and generated documents) do not store an externalContext.
404 with no body. A GUID that matches nothing is reported differently by area; see Not found.referenceDocumentId, referenceSignerId, referenceSignGroupId) are integers you choose to link the parts of one envelope or Envelope Template request before server ids exist.urn and a record id are different values. See Three kinds of identifier.Most list operations page their results and accept the same query parameters:
| Query parameter | Meaning |
|---|---|
top | Page size. The server applies its own default when omitted. |
skip | Records to skip before the page begins. The third page of 25 is top=25&skip=50. |
orderby | Column|DIRECTION with a literal pipe, such as CreatedDate|DESC. |
filter | A URL-encoded JSON array of clauses. Several clauses narrow the result further. |
A filter clause names a column, its type (string or date), a condition and a value, which is always a string. key is a label you choose to tell clauses apart. Before URL-encoding:
[{"key":"Filter1","column":"Name","type":"string","condition":"CONTAINS","value":"Invoice"}]A paged list returns pagination inside result.data, beside the collection. Use totalCount to size a pager and hasNext to decide whether to fetch another page; count is the number of records on this page, not a total.
Documents lists return full records. Signatures lists return summaries, so fetch the record with get for its structure. On the envelope list, a filter clause with the reserved key folder selects a view, such as inbox, sent, drafts or completed, instead of filtering a column. A few small lists, such as folders, contacts and saved signatures, return everything in one response and don't page.
Metered operations report what they counted in consumption, an array of { dimension, value } entries such as documents-generated, envelopes-created or recipients-sent. Generate, manage, merge, envelope create, Envelope Template create and envelope send are metered. Errors never carry consumption, and on async document operations it arrives with the result on the callback. A dimension your plan does not meter is left out, and on envelope send the MFA-recipient and per-field-type counts are left out when zero, so an absent dimension means none were counted or the plan does not meter it.
When a usage limit has been reached, the call fails with 403 LIMIT_BREACH before any work starts. On async operations, that error arrives at the callback instead.
Timestamps are in UTC, both the response's dateTime and those on records, such as createdDate or sendDate. Some end in Z and some in +00:00, so parse them with an ISO 8601 parser that accepts both forms.
Enum values, such as loadMethod, recipient roles and signature field types, are case-sensitive unless the operation says otherwise. Send them exactly as documented.
Doctavian has no PATCH. An update replaces what it covers: a field you leave out is cleared, not kept. Read the record, change it, and send it back whole.
Draft envelope can be updated.name and description. Links to templates, data sources and configurations have their own operations.edit changes only a sent envelope's expiry, folder update only renames a folder, and the move operations change only the folder.Folders organise four kinds of record. Each folder holds one kind, set by folderEntityId when it is created, and belongs to the user who created it alone. You file a record with its move operation:
folderEntityId | File a record in it with | Body |
|---|---|---|
ENVELOPE_TEMPLATES | PUT /signatures/template/{templateId}/move, or template.folderId on Envelope Template create or update | { "template": { "folderId": … } } |
DOCUMENT_TEMPLATES | PUT /documents/template/{documentTemplateId}/move | { "documentTemplate": { "folderId": … } } |
DATA_SOURCES | PUT /documents/datasource/{dataSourceId}/move | { "dataSource": { "folderId": … } } |
DOCUMENT_SOLUTIONS | PUT /documents/solution/{documentSolutionId}/move | { "documentSolution": { "folderId": … } } |
folderId as null, or leave it out.Data source, document template and document solution create can link the new record to others by id in the same call. That linking is best-effort: an id that cannot be found is skipped, not reported as an error. Compare the lists in the response with what you sent. Links can also be added and removed afterwards with the solution's add and remove operations.