Send an eSignature draft
curl --request POST \
--url https://core-api.getaptly.com/api/esignature/drafts/{draftId}/send \
--header 'Content-Type: application/json' \
--header 'x-token: <api-key>' \
--data '
{
"userId": "<string>"
}
'import requests
url = "https://core-api.getaptly.com/api/esignature/drafts/{draftId}/send"
payload = { "userId": "<string>" }
headers = {
"x-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>'})
};
fetch('https://core-api.getaptly.com/api/esignature/drafts/{draftId}/send', 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://core-api.getaptly.com/api/esignature/drafts/{draftId}/send",
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([
'userId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-token: <api-key>"
],
]);
$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://core-api.getaptly.com/api/esignature/drafts/{draftId}/send"
payload := strings.NewReader("{\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-token", "<api-key>")
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://core-api.getaptly.com/api/esignature/drafts/{draftId}/send")
.header("x-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/esignature/drafts/{draftId}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "<string>"
}
}eSignature
Send an eSignature draft
Creates an eSignature document from the draft’s values and emails it to
its recipients. Only documents made with the v2 document builder can be
sent here. Merge fields still holding a reference are filled from the
card, contact and document fields are stamped, and the invitations are
emailed once the document is saved. The acting user
needs the esignature_create role permission and access to the card.
The values must be a complete v2 builder document (400 naming the
missing fields otherwise). A draft is sent once (409 after); it is
archived afterwards. With revisionOf, the new document
replaces a sent one (Edit & Resend): the old document is archived and
its signing links stop working.
POST
/
api
/
esignature
/
drafts
/
{draftId}
/
send
Send an eSignature draft
curl --request POST \
--url https://core-api.getaptly.com/api/esignature/drafts/{draftId}/send \
--header 'Content-Type: application/json' \
--header 'x-token: <api-key>' \
--data '
{
"userId": "<string>"
}
'import requests
url = "https://core-api.getaptly.com/api/esignature/drafts/{draftId}/send"
payload = { "userId": "<string>" }
headers = {
"x-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>'})
};
fetch('https://core-api.getaptly.com/api/esignature/drafts/{draftId}/send', 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://core-api.getaptly.com/api/esignature/drafts/{draftId}/send",
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([
'userId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-token: <api-key>"
],
]);
$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://core-api.getaptly.com/api/esignature/drafts/{draftId}/send"
payload := strings.NewReader("{\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-token", "<api-key>")
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://core-api.getaptly.com/api/esignature/drafts/{draftId}/send")
.header("x-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/esignature/drafts/{draftId}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "<string>"
}
}