Sign
curl --request POST \
--url https://api.superdoc.dev/v1/sign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document": {},
"signer": {},
"auditTrail": "<array>",
"eventId": "<string>",
"metadata": {}
}
'import requests
url = "https://api.superdoc.dev/v1/sign"
payload = {
"document": {},
"signer": {},
"auditTrail": "<array>",
"eventId": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document: {},
signer: {},
auditTrail: '<array>',
eventId: '<string>',
metadata: {}
})
};
fetch('https://api.superdoc.dev/v1/sign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.superdoc.dev/v1/sign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'document' => [
],
'signer' => [
],
'auditTrail' => '<array>',
'eventId' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.superdoc.dev/v1/sign"
payload := strings.NewReader("{\n \"document\": {},\n \"signer\": {},\n \"auditTrail\": \"<array>\",\n \"eventId\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.superdoc.dev/v1/sign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document\": {},\n \"signer\": {},\n \"auditTrail\": \"<array>\",\n \"eventId\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superdoc.dev/v1/sign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"document\": {},\n \"signer\": {},\n \"auditTrail\": \"<array>\",\n \"eventId\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"document": {
"base64": "<string>",
"contentType": "<string>"
}
}{
"code": "INVALID_FILE_FORMAT",
"error": "Bad Request",
"message": "File is not a valid DOCX",
"requestId": "req_abc123"
}{
"code": "INVALID_FILE_FORMAT",
"error": "Bad Request",
"message": "File is not a valid DOCX",
"requestId": "req_abc123"
}{
"code": "INVALID_FILE_FORMAT",
"error": "Bad Request",
"message": "File is not a valid DOCX",
"requestId": "req_abc123"
}{
"code": "INVALID_FILE_FORMAT",
"error": "Bad Request",
"message": "File is not a valid DOCX",
"requestId": "req_abc123"
}Document Operations
Sign
Sign a PDF or DOCX document with a cryptographic signature.
Send a JSON request body with:
document: object containing eitherbase64orurlsigner: object with signer details (name, email, etc.)auditTrail: array of signing eventseventId: optional unique identifiermetadata: optional metadata (IP, user agent, custom fields)
The response returns the signed PDF as base64.
POST
/
v1
/
sign
Sign
curl --request POST \
--url https://api.superdoc.dev/v1/sign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document": {},
"signer": {},
"auditTrail": "<array>",
"eventId": "<string>",
"metadata": {}
}
'import requests
url = "https://api.superdoc.dev/v1/sign"
payload = {
"document": {},
"signer": {},
"auditTrail": "<array>",
"eventId": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document: {},
signer: {},
auditTrail: '<array>',
eventId: '<string>',
metadata: {}
})
};
fetch('https://api.superdoc.dev/v1/sign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.superdoc.dev/v1/sign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'document' => [
],
'signer' => [
],
'auditTrail' => '<array>',
'eventId' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.superdoc.dev/v1/sign"
payload := strings.NewReader("{\n \"document\": {},\n \"signer\": {},\n \"auditTrail\": \"<array>\",\n \"eventId\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.superdoc.dev/v1/sign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document\": {},\n \"signer\": {},\n \"auditTrail\": \"<array>\",\n \"eventId\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superdoc.dev/v1/sign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"document\": {},\n \"signer\": {},\n \"auditTrail\": \"<array>\",\n \"eventId\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"document": {
"base64": "<string>",
"contentType": "<string>"
}
}{
"code": "INVALID_FILE_FORMAT",
"error": "Bad Request",
"message": "File is not a valid DOCX",
"requestId": "req_abc123"
}{
"code": "INVALID_FILE_FORMAT",
"error": "Bad Request",
"message": "File is not a valid DOCX",
"requestId": "req_abc123"
}{
"code": "INVALID_FILE_FORMAT",
"error": "Bad Request",
"message": "File is not a valid DOCX",
"requestId": "req_abc123"
}{
"code": "INVALID_FILE_FORMAT",
"error": "Bad Request",
"message": "File is not a valid DOCX",
"requestId": "req_abc123"
}Authorizations
API key authentication. Keys start with sd_
Body
application/json
PDF or DOCX input provided as either base64 or URL
Signer details (name, email, etc.)
Array of signing events and user interactions
Unique identifier for this signing event
Optional metadata (IP, user agent, custom fields)
Response
Default Response
Show child attributes
Show child attributes
Was this page helpful?
⌘I

