curl --request POST \
--url https://app.demand-iq.com/api/presentations/{presentationId}/sign-contract \
--header 'Content-Type: application/json' \
--header 'x-presentation-token: <api-key>' \
--data '
{
"variables": {
"full_name": "<string>",
"first_name": "<string>",
"last_name": "<string>"
},
"signature": "<string>",
"configId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agreedToTerms": true
}
'import requests
url = "https://app.demand-iq.com/api/presentations/{presentationId}/sign-contract"
payload = {
"variables": {
"full_name": "<string>",
"first_name": "<string>",
"last_name": "<string>"
},
"signature": "<string>",
"configId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agreedToTerms": True
}
headers = {
"x-presentation-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-presentation-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variables: {full_name: '<string>', first_name: '<string>', last_name: '<string>'},
signature: '<string>',
configId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agreedToTerms: true
})
};
fetch('https://app.demand-iq.com/api/presentations/{presentationId}/sign-contract', 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://app.demand-iq.com/api/presentations/{presentationId}/sign-contract",
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([
'variables' => [
'full_name' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>'
],
'signature' => '<string>',
'configId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agreedToTerms' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-presentation-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://app.demand-iq.com/api/presentations/{presentationId}/sign-contract"
payload := strings.NewReader("{\n \"variables\": {\n \"full_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"signature\": \"<string>\",\n \"configId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agreedToTerms\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-presentation-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://app.demand-iq.com/api/presentations/{presentationId}/sign-contract")
.header("x-presentation-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"variables\": {\n \"full_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"signature\": \"<string>\",\n \"configId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agreedToTerms\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/presentations/{presentationId}/sign-contract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-presentation-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variables\": {\n \"full_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"signature\": \"<string>\",\n \"configId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agreedToTerms\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signedAt": "2023-11-07T05:31:56Z",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Sign a contract
Submits a contract signature. Validates the typed signature against the customer name, resolves the template with variables, and creates an audit-trailed signed document. Requires an x-presentation-token scoped to this presentation, matching the sibling events and appointment routes. Obtain the token from POST /api/presentations/{presentationId}/events-token. Soft-deleted presentations are refused with 404 even when the caller holds a still-valid token minted before the delete. Client-supplied variables are filtered through an allow-list before storage. Non-whitelisted keys are dropped rather than persisted to resolvedVariables.
curl --request POST \
--url https://app.demand-iq.com/api/presentations/{presentationId}/sign-contract \
--header 'Content-Type: application/json' \
--header 'x-presentation-token: <api-key>' \
--data '
{
"variables": {
"full_name": "<string>",
"first_name": "<string>",
"last_name": "<string>"
},
"signature": "<string>",
"configId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agreedToTerms": true
}
'import requests
url = "https://app.demand-iq.com/api/presentations/{presentationId}/sign-contract"
payload = {
"variables": {
"full_name": "<string>",
"first_name": "<string>",
"last_name": "<string>"
},
"signature": "<string>",
"configId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agreedToTerms": True
}
headers = {
"x-presentation-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-presentation-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variables: {full_name: '<string>', first_name: '<string>', last_name: '<string>'},
signature: '<string>',
configId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agreedToTerms: true
})
};
fetch('https://app.demand-iq.com/api/presentations/{presentationId}/sign-contract', 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://app.demand-iq.com/api/presentations/{presentationId}/sign-contract",
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([
'variables' => [
'full_name' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>'
],
'signature' => '<string>',
'configId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agreedToTerms' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-presentation-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://app.demand-iq.com/api/presentations/{presentationId}/sign-contract"
payload := strings.NewReader("{\n \"variables\": {\n \"full_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"signature\": \"<string>\",\n \"configId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agreedToTerms\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-presentation-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://app.demand-iq.com/api/presentations/{presentationId}/sign-contract")
.header("x-presentation-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"variables\": {\n \"full_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"signature\": \"<string>\",\n \"configId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agreedToTerms\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/presentations/{presentationId}/sign-contract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-presentation-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variables\": {\n \"full_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n },\n \"signature\": \"<string>\",\n \"configId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agreedToTerms\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signedAt": "2023-11-07T05:31:56Z",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
HMAC-signed token scoped to a specific presentation. Obtained from POST /api/presentations/{presentationId}/events-token.
Path Parameters
Body
Variable values substituted into the template. Keys outside the server-side allow-list are dropped before storage. The allow-list covers customer fields (first_name, last_name, full_name, address, city, state, zip, email, phone), company fields (company_name, company_address, company_city, company_state, company_zip, company_phone, company_email, license_number, rep_name), and date fields (today, month, year, date, signature_timestamp). Non-string values are also dropped.
Show child attributes
Show child attributes
Typed signature (must match the customer name)