Signatures

Signature Create

Markdown for LLMs
POST
/signatures/signature/create

Saves a signature image for the calling user, for the signing interface to offer for reuse: signatures-envelope-open returns the saved signatures of the Doctavian user a recipient's email address belongs to. A user can save any number of signatures, and the signature operations act only on the caller's own.

Send the image as raw Base64-encoded PNG or JPEG data, with no data: prefix — the form a signature field's value takes on signatures-envelope-sign, where signatures-envelope-open hands saved signatures back for reuse. Anything else, a data: URI included, is rejected with 400 SIGNATURE_IMAGE_INVALID. The value is stored and returned exactly as sent.

Send signature.isDefault true to make the new signature the caller's default, the one the signing interface preselects. The default moves from whichever signature held it in the same call, so a caller has at most one. Left out, it is false.

Authorization

AuthorizationBearer <token>

JWT token to authenticate the request.

In: header

X-Api-Key<token>

API key, sent as a request header.

In: header

Request Body

application/json

Mandatory, as SavedSignatureUpsertRequest. A request with no body fails with 500.

TypeScript Definitions

Use the request body type in TypeScript.

Request body for signatures-signature-create and signatures-signature-update: the signature image in signature.value and, optionally, whether it is the caller's default. An update replaces both: value must be sent again even when only isDefault changes.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/signatures/signature/create" \  -H "Content-Type: application/json" \  -d '{    "signature": {      "value": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==",      "isDefault": true    },    "externalContext": {      "id": "12345"    }  }'
{  "result": {    "statusCode": 201,    "message": "Created",    "data": {      "signature": {        "id": "4f1c9a2e-6b3d-4e87-9a05-c2d81e7f3b64",        "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==",        "isDefault": true      }    }  },  "origin": "POST https://api.doctavian.com/v1/signatures/signature/create",  "dateTime": "2026-10-06T09:41:06.000Z",  "externalContext": {    "id": "12345"  },  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "091e6c0c59a51ab8dd44538a10bc9c6e"}
{  "error": {    "statusCode": 400,    "message": "Bad Request",    "innerErrors": [      {        "code": "SIGNATURE_VALUE_REQUIRED",        "message": "Signature value is required.",        "userMessage": "Please provide a signature.",        "urn": "Value"      }    ],    "externalErrors": []  },  "origin": "POST https://api.doctavian.com/v1/signatures/signature/create",  "dateTime": "2026-10-16T07:12:22.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "9d2e6b0a4c8f41739e5a1d0b7c3f2e86",  "externalContext": {    "id": "12345"  }}
{  "error": {    "statusCode": 500,    "message": "Internal Server Error",    "innerErrors": [      {        "code": "FUNCTION_EXECUTION_ERROR",        "message": "An error ocurred during function execution",        "userMessage": "An error ocurred during function execution",        "eventId": "c848be05-fc1c-4299-9112-ffe95756037d"      }    ],    "externalErrors": []  },  "origin": "POST https://api.doctavian.com/v1/signatures/signature/create",  "dateTime": "2026-10-16T07:12:47.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "a4e9c07b3d5f4182b6e0f9a1c8d37b52",  "externalContext": {    "id": "12345"  }}