Common

User Contact Create

Markdown for LLMs
POST
/common/user/contact/create

Adds a contact — a name and email address — to the calling user's contacts, which the signing interface offers when choosing envelope recipients. The body is { "userContact": { "name", "email" }, "externalContext" }; both name and email are mandatory.

Contacts are matched by email. If the caller already has a contact with the same email, no new one is added: the call returns 201 with the existing contact's id and leaves its name as it was. Recipients of the envelopes the caller sends are added the same way, automatically, when an envelope is sent.

sharedWithAccount is recorded from the account's ALLOW_CONTACT_SHARE setting and cannot be sent. A contact stays the caller's own whatever its value: the contact operations only ever return or change the caller's contacts. email is stored as given; it is not checked to be a valid address. The response returns only the contact's id — read the contact with common-user-contact-get.

Send a bearer token: contacts belong to the signed-in user, and a call without one is rejected at the gateway with 401 AUTHORIZATION_ERROR.

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 UserContactRequest. A body without userContact, or a userContact without name or email, is rejected with 400 VALIDATION_ERROR.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/common/user/contact/create" \  -H "Content-Type: application/json" \  -d '{    "userContact": {      "name": "Jane Doe",      "email": "jane.doe@example.com"    },    "externalContext": {      "id": "12345"    }  }'
{  "result": {    "statusCode": 201,    "message": "Created",    "data": {      "userContact": {        "id": "4b0cc61e-b776-4d26-8439-f03749675d0a"      }    }  },  "externalContext": {    "id": "12345"  },  "origin": "POST https://api.doctavian.com/v1/common/user/contact/create",  "dateTime": "2026-10-16T11:42:10.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "6f2c9a1e4b7d40388e5a0c3d9f1b7e62"}
{  "error": {    "statusCode": 400,    "message": "Bad Request",    "innerErrors": [      {        "code": "VALIDATION_ERROR",        "message": "There were validation errors with the request.",        "userMessage": "The field in the request is not valid. Details: Email is required."      }    ],    "externalErrors": []  },  "externalContext": {    "id": "12345"  },  "origin": "POST https://api.doctavian.com/v1/common/user/contact/create",  "dateTime": "2026-10-16T11:43:00.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "48a00e0a1c691c3ccfe73ff0406addc0"}
{  "error": {    "statusCode": 401,    "message": "Unauthorized",    "innerErrors": [      {        "code": "AUTHORIZATION_ERROR",        "message": "Authorization header is missing.",        "userMessage": "Authorization header is missing."      }    ]  },  "origin": "POST https://api.doctavian.com/v1/common/user/contact/create",  "dateTime": "2026-10-16T11:43:02.000Z"}
{  "error": {    "statusCode": 500,    "message": "Internal Server Error",    "innerErrors": [      {        "code": "FUNCTION_EXECUTION_ERROR",        "message": "Function execution failed.",        "userMessage": "Something went wrong while processing your request. Please try again or contact support.",        "eventId": "3b8e1d6f-0a4c-4e92-9f5b-7c2d1a8e6b30"      }    ],    "externalErrors": []  },  "externalContext": {    "id": "12345"  },  "origin": "POST https://api.doctavian.com/v1/common/user/contact/create",  "dateTime": "2026-10-16T11:43:04.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "e78436357c37f2b1eeec52d1adeadad8"}