Get started

URL
https://app.onlinenotarycenter.com/api

The ONC API provides programmatic access to start Notary/e-Sign sessions, complete the process and retrieve signed documents.

Authentication

Authorization URL
GET
/oauth/authorize/?response_type=code&client_id=[CLIENT_ID]&state=xyz


Request Access Token
POST
/oauth/token
Request samples

# Here is a curl example
curl \
-u CLIENT_ID:CLIENT_SECRET
-X POST https://app.onlinenotarycenter.com/oauth/token \
-d 'grant_type=authorization_code&code=AUTHORIZATION_CODE'

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://app.onlinenotarycenter.com/oauth/token');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'CLIENT_ID:CLIENT_SECRET');
curl_setopt($ch, CURLOPT_POSTFIELDS, ['grant_type=authorization_code&code=AUTHORIZATION_CODE']);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

Many operations require OAuth 2.0 authentication or return additional information if you are authenticated. Additionally, you can make more requests per hour when you are authenticated.
We Also have a long-live token option available, that will be provided based on request.

1. Use authorization URL with your CLIENT_ID to retrieve the authorization code.

2. Use authorization code along with CLIENT_ID and CLIENT_SECRET to request the access token and refresh token.

You can now authenticate all your requests by sending a token in the Authorization header.

Create Notary Session

POST
/api/create-notary-session
Request samples

# Here is a curl example
curl \
-H 'Authorization: Bearer [TOKEN]'
-X POST https://app.onlinenotarycenter.com/api/createEsignSession \
-F files[0]=@/var/www/documents/test-1.pdf \
-F files[1]=@/var/www/documents/test-2.pdf

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://app.onlinenotarycenter.com/api/create-notary-session');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$post = array(
    'files[0]' => curl_file_create('/var/www/documents/test-1.pdf', 'mime', 'test1.pdf'),
    'files[1]' => curl_file_create('/var/www/documents/test-2.pdf', 'mime', 'test2.pdf')
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

$headers = array();
$headers[] = 'Authorization: Bearer [TOKEN]';
$headers[] = 'Content-Type: multipart/form-data';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}

curl_close($ch);
Response samples

{
  "title": "Customer Notary",
  "created_by": "9999999999",
  "notary_id": "97f1cd16-5e43-11ee-913f-2cea7fe1bf2e",
  "status": "active"
}

{
  "error": "invalid_token",
  "error_description": "The access token provided is invalid"
}

To create a new notary session you need to make a POST call to the following url and pass PDF file(s)
https://app.onlinenotarycenter.com/api/create-notary-session

This will return a NOTARY_SESSION_ID which will be required in subsequent calls


QUERY PARAMETERS

Field Type Description
Bearer String Your ACCESS_TOKEN
PDF File(s) Array of Absolute Path(s) Required array of absolute path for a single PDF file or multiple PDF files.

Adding Signer(s)

POST
/api/update-notary-signers
Request samples

# Here is a curl example
curl \
-H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-X POST https://app.onlinenotarycenter.com/api/update-notary-signers \
-d '{
      "notary_id": "NOTARY_SESSION_ID",
      "contact_type": "self",
      "share_room": "0",
      "first_name": "SIGNER",
      "last_name": "S_LASTNAME",
      "email": "MAIN_SIGNER_EMAIL,
      "phone": "999 999 9999",
      "other_signers": [
        {
          "first_name": "SIGNER1",
          "last_name": "S_LASTNAME1",
          "email": "[email protected]",
          "phone": "444 444 4444"
        },
        {
          "first_name": "SIGNER2",
          "last_name": "S_LASTNAME2",
          "email": "[email protected]",
          "phone": "555 555 5555"
        }
      ]
    }'

$ch = curl_init();

$headers = array();
$headers[] = 'Authorization: Bearer [TOKEN]';
$headers[] = 'Content-Type: application/json';

$DATA = '{
  "notary_id": "NOTARY_SESSION_ID",
  "contact_type": "self",
  "share_room": "0",
  "first_name": "SIGNER",
  "last_name": "S_LASTNAME",
  "email": "MAIN_SIGNER_EMAIL,
  "phone": "999 999 9999",
  "other_signers": [
    {
      "first_name": "SIGNER1",
      "last_name": "S1_LASTNAME",
      "email": "[email protected]",
      "phone": "444 444 4444"
    },
    {
      "first_name": "SIGNER2",
      "last_name": "S2_LASTNAME",
      "email": "[email protected]",
      "phone": "555 555 5555"
    }
  ]
}';

curl_setopt($ch, CURLOPT_URL, 'https://app.onlinenotarycenter.com/api/update-notary-signers');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $DATA);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}

curl_close($ch);
Response samples

{
  "notary_id": "e350eb84-5e4f-11ee-913f-2cea7fe1bf2e",
  "type": "notary",
  "title": "Customer Notary",
  "status": "pending",
  "notarial_act": "",
  "meeting_date": null,
  "meeting_start": "00:00:00",
  "meeting_end": "00:00:00",
  "user_live_date": null,
  "is_live": "0",
  "vonage_sess_id": "",
  "notarized_by": "0",
  "payment_type": "standard",
  "loan_signing": "0",
  "notary_ip_address": "",
  "journal_note": "",
  "created_by": "364",
  "redirect_uri": "",
  "date_created": "2023-09-28 15:39:30",
  "active": "1"
}

{
  "error": "invalid_token",
  "error_description": "The access token provided is invalid"
}

To add the main signer and additional signer details you need to make a POST call to the following url passing signer(s) information
https://app.onlinenotarycenter.com/api/update-notary-signers


QUERY PARAMETERS

Field Type Description
Bearer String Your ACCESS_TOKEN
notary_id String The session NOTARY_SESSION_ID that was created by /api/create-notary-session end point.
contact_type string Signer type (self/other).
share_room Integer 0 if signers are using different devices, 1 if signers are sharing the same device.
first_name String First Name of the main Signer.
last_name String Last Name of the main Signer.
email String Email of the main Signer.
phone String Phone number of the main Signer.
other_signers Array (JSON) Array of signers (Same format as the main signer).

Prepare Notary Session

POST
/api/prepare-notary-session
Request samples

# Here is a curl example
curl \
-H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-X POST https://app.onlinenotarycenter.com/api/prepare-notary-session \
-d '{
      "notary_id": "NOTARY_SESSION_ID",
      "business_pay": "true",
      "redirect_uri": "REDIRECT_URL"
    }'

$ch = curl_init();

$headers = array();
$headers[] = 'Authorization: Bearer [TOKEN]';
$headers[] = 'Content-Type: application/json';

$DATA = '{
  "notary_id": "NOTARY_SESSION_ID",
  "business_pay": "true",
  "redirect_uri": "REDIRECT_URL"
}';

curl_setopt($ch, CURLOPT_URL, 'https://app.onlinenotarycenter.com/api/prepare-notary-session');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $DATA);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}

curl_close($ch);
Response samples

{
  "success": "true",
  "session_link": "http://devserver:1200/notary/client-join/e350eb84-5e4f-11ee-913f-2cea7fe1bf2e",
  "passcode": "HyufXF"
}

{
  "error": "invalid_token",
  "error_description": "The access token provided is invalid"
}

Final step is to prepare the session and send notification to all signers
We may also pass a URL to redirect the signers after the session is completed.
https://app.onlinenotarycenter.com/api/prepare-notary-session

In repsponse we will get complete link with a unique password to start the notarization session.


QUERY PARAMETERS

Field Type Description
Bearer String Your ACCESS_TOKEN
notary_id String The session NOTARY_SESSION_ID that was created by /api/create-notary-session end point.
business_pay Boolean (Optional) To control if the business owner (API account) is paying for the session.
redirect_uri String URL to redirect users after the session is completed.

Download Notary Session Files

GET
/api/download-notarized-files/NOTARY_SESSION_ID
Request samples

# Here is a curl example
curl \
-H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-X GET https://app.onlinenotarycenter.com/api/download-notarized-files/NOTARY_SESSION_ID

$ch = curl_init();

$headers = array();
$headers[] = 'Authorization: Bearer [TOKEN]';

curl_setopt($ch, CURLOPT_URL, 'https://app.onlinenotarycenter.com/api/download-notarized-files/NOTARY_SESSION_ID');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $DATA);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}

curl_close($ch);
Response samples

Zip file content

{
  "error": "invalid_token",
  "error_description": "The access token provided is invalid"
}

After the session is completed, download the session files in a zip package using below end-point
https://app.onlinenotarycenter.com/api/download-notarized-files/NOTARY_SESSION_ID

The response contains all notarized files as content of a zip file.


QUERY PARAMETERS

Field Type Description
Bearer String Your ACCESS_TOKEN
notary_id String The session NOTARY_SESSION_ID that was created by /api/create-notary-session end point.

Create e-Sign Session

POST
/api/create-esign-session
Request samples

# Here is a curl example
curl \
-H 'Authorization: Bearer [TOKEN]'
-X POST https://app.onlinenotarycenter.com/api/createEsignSession \
-F files[0]=@/var/www/documents/test-1.pdf \
-F files[1]=@/var/www/documents/test-2.pdf

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://app.onlinenotarycenter.com/api/create-esign-session');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$post = array(
    'files[0]' => curl_file_create('/var/www/documents/test-1.pdf', 'mime', 'test1.pdf'),
    'files[1]' => curl_file_create('/var/www/documents/test-2.pdf', 'mime', 'test2.pdf')
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

$headers = array();
$headers[] = 'Authorization: Bearer [TOKEN]';
$headers[] = 'Content-Type: multipart/form-data';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}

curl_close($ch);
Response samples

{
  "title": "Customer Notary",
  "created_by": "9999999999",
  "notary_id": "97f1cd16-5e43-11ee-913f-2cea7fe1bf2e",
  "status": "active"
}

{
  "error": "invalid_token",
  "error_description": "The access token provided is invalid"
}

To create a new e-Sign session you need to make a POST call to the following url and pass your PDF file(s)
https://app.onlinenotarycenter.com/api/create-esign-session

This will return a ESIGN_SESSION_ID which will be required in subsequent calls


QUERY PARAMETERS

Field Type Description
Bearer String Your ACCESS_TOKEN
PDF File(s) Array of Absolute Path(s) Required array of absolute path for a single PDF file or multiple PDF files.

Adding Signer(s)

POST
/api/update-esign-signers
Request samples

# Here is a curl example
curl \
-H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-X POST https://app.onlinenotarycenter.com/api/update-esign-signers \
-d '{
      "notary_id": "ESIGN_SESSION_ID",
      "contact_type": "self",
      "share_room": "0",
      "first_name": "SIGNER",
      "last_name": "S_LASTNAME",
      "email": "MAIN_SIGNER_EMAIL,
      "phone": "999 999 9999",
      "other_signers": [
        {
          "first_name": "SIGNER1",
          "last_name": "S_LASTNAME1",
          "email": "[email protected]",
          "phone": "444 444 4444"
        },
        {
          "first_name": "SIGNER2",
          "last_name": "S_LASTNAME2",
          "email": "[email protected]",
          "phone": "555 555 5555"
        }
      ]
    }'

$ch = curl_init();

$headers = array();
$headers[] = 'Authorization: Bearer [TOKEN]';
$headers[] = 'Content-Type: application/json';

$DATA = '{
  "notary_id": "ESIGN_SESSION_ID",
  "contact_type": "self",
  "share_room": "0",
  "first_name": "SIGNER",
  "last_name": "S_LASTNAME",
  "email": "MAIN_SIGNER_EMAIL,
  "phone": "999 999 9999",
  "other_signers": [
    {
      "first_name": "SIGNER1",
      "last_name": "S1_LASTNAME",
      "email": "[email protected]",
      "phone": "444 444 4444"
    },
    {
      "first_name": "SIGNER2",
      "last_name": "S2_LASTNAME",
      "email": "[email protected]",
      "phone": "555 555 5555"
    }
  ]
}';

curl_setopt($ch, CURLOPT_URL, 'https://app.onlinenotarycenter.com/api/update-esign-signers');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $DATA);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}

curl_close($ch);
Response samples

{
  "notary_id": "e350eb84-5e4f-11ee-913f-2cea7fe1bf2e",
  "type": "notary",
  "title": "Customer Notary",
  "status": "pending",
  "notarial_act": "",
  "meeting_date": null,
  "meeting_start": "00:00:00",
  "meeting_end": "00:00:00",
  "user_live_date": null,
  "is_live": "0",
  "vonage_sess_id": "",
  "notarized_by": "0",
  "payment_type": "standard",
  "loan_signing": "0",
  "notary_ip_address": "",
  "journal_note": "",
  "created_by": "364",
  "redirect_uri": "",
  "date_created": "2023-09-28 15:39:30",
  "active": "1"
}

{
  "error": "invalid_token",
  "error_description": "The access token provided is invalid"
}

To add the main signer and additional signer details you need to make a POST call to the following url passing signer(s) information
https://app.onlinenotarycenter.com/api/update-esign-signers


QUERY PARAMETERS

Field Type Description
Bearer String Your ACCESS_TOKEN
notary_id String The session ESIGN_SESSION_ID that was created by /api/create-esign-session end point.
contact_type string Signer type (self/other).
share_room Integer 0 if signers are using different devices, 1 if signers are sharing the same device.
first_name String First Name of the main Signer.
last_name String Last Name of the main Signer.
email String Email of the main Signer.
phone String Phone number of the main Signer.
other_signers Array (JSON) Array of signers (Same format as the main signer).

Prepare e-Sign Session

POST
/api/prepare-esign-session
Request samples

# Here is a curl example
curl \
-H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-X POST https://app.onlinenotarycenter.com/api/prepare-esign-session \
-d '{
      "notary_id": "ESIGN_SESSION_ID",
      "redirect_uri": "REDIRECT_URL"
    }'

$ch = curl_init();

$headers = array();
$headers[] = 'Authorization: Bearer [TOKEN]';
$headers[] = 'Content-Type: application/json';

$DATA = '{
  "notary_id": "ESIGN_SESSION_ID",
  "redirect_uri": "REDIRECT_URL"
}';

curl_setopt($ch, CURLOPT_URL, 'https://app.onlinenotarycenter.com/api/prepare-esign-session');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $DATA);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}

curl_close($ch);
Response samples

{
  "success": "true",
  "session_link": "http://devserver:1200/notary/client-join/e350eb84-5e4f-11ee-913f-2cea7fe1bf2e",
  "passcode": "HyufXF"
}

{
  "error": "invalid_token",
  "error_description": "The access token provided is invalid"
}

Final step is to prepare the session and send notification to all signers
We may also pass a URL to redirect the signers after the session is completed.
https://app.onlinenotarycenter.com/api/prepare-esign-session

In repsponse we will get complete link with a unique password to start the notarization session.


QUERY PARAMETERS

Field Type Description
Bearer String Your ACCESS_TOKEN
notary_id String The session ESIGN_SESSION_ID that was created by /api/create-esign-session end point.
redirect_uri String URL to redirect users after the session is completed.

Download e-Sign Session Files

GET
/api/download-notarized-files/ESIGN_SESSION_ID
Request samples

    # Here is a curl example
    curl \
    -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    -X GET https://app.onlinenotarycenter.com/api/download-notarized-files/ESIGN_SESSION_ID
    

    $ch = curl_init();

    $headers = array();
    $headers[] = 'Authorization: Bearer [TOKEN]';

    curl_setopt($ch, CURLOPT_URL, 'https://app.onlinenotarycenter.com/api/download-notarized-files/ESIGN_SESSION_ID');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $DATA);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

    $result = curl_exec($ch);
    if (curl_errno($ch)) {
        echo 'Error:' . curl_error($ch);
    }

    curl_close($ch);
Response samples
    
    Zip file content
    

{
  "error": "invalid_token",
  "error_description": "The access token provided is invalid"
}

After the session is completed, download the session files in a zip package using below end-point
https://app.onlinenotarycenter.com/api/download-notarized-files/ESIGN_SESSION_ID

The response contains all signed files as content of a zip file.


QUERY PARAMETERS

Field Type Description
Bearer String Your ACCESS_TOKEN
notary_id String The session NOTARY_SESSION_ID that was created by /api/create-notary-session end point.

Errors

The ONC API uses the following error codes:

Error Code Meaning
X000 Some parameters are missing. This error appears when you don't pass every mandatory parameters.
X001 Unknown or unvalid secret_key. This error appears if you use an unknow API key or if your API key expired.
X002 Unvalid secret_key for this domain. This error appears if you use an API key non specified for your domain. Developper or Universal API keys doesn't have domain checker.
X003 Unknown or unvalid user token. This error appears if you use an unknow user token or if the user token expired.