Create submission
Send a template to one or more submitters for signing.
Quick Sign Mode: Set quick_sign_mode to enable streamlined signing flows.
When using confirmation_modal, signers see a summary of pre-filled data and can
confirm with a single click. Use review_and_sign to show a summary on the welcome
screen.
Default behavior: If omitted, quick_sign_mode defaults to confirmation_modal.
prefill_behavior defaults to:
skip_if_prefilled: trueeditable_if_prefilled: falseSetquick_sign_mode: normalto force legacy behavior.
Auto-Generated Signatures: When quick_sign_mode is not normal and a submitter
has a name, any unfilled signature fields will be automatically populated with a
typed signature image generated from the submitter’s name.
Cover Page: Pass a cover_page object to generate a branded PDF cover page
prepended as page 0 of the signing package. The cover page is generated per submission
with dynamic financial data (amounts, phases, company name). All monetary values are
integers in whole dollars. Admin fees must be negative.
Start Screen Customization: Use template preferences to customize the signing
welcome screen: disable_start_screen (skip directly to signing),
start_screen_title, and start_screen_message.
curl --request POST \
--url https://spitshake.io/api/submissions \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"template_id": "<string>",
"submitters": [
{
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"role": "<string>",
"external_id": "<string>",
"metadata": {},
"values": {},
"completed_redirect_url": "<string>",
"preferences": {},
"field_overrides": {},
"completed": false,
"fields": [
{
"name": "<string>",
"default_value": "<string>"
}
]
}
],
"send_email": true,
"send_sms": false,
"order": "preserved",
"expire_at": "2023-11-07T05:31:56Z",
"metadata": {},
"completed_redirect_url": "<string>",
"reply_to": "jsmith@example.com",
"bcc_completed": "jsmith@example.com",
"message": {
"subject": "<string>",
"body": "<string>"
},
"quick_sign_mode": "confirmation_modal",
"prefill_behavior": {
"skip_if_prefilled": true,
"editable_if_prefilled": false
},
"preferences": {
"display_title": "Acme Legal Retainer",
"logo_url": "<string>",
"company_name": "<string>",
"favicon_url": "<string>",
"primary_button_color": "#2f5d8a",
"header_color": "#14213d",
"show_branding": true,
"brand_id": 7,
"custom_domain": "sign.example.com",
"signing_nav_style": "standard"
}
}
'import requests
url = "https://spitshake.io/api/submissions"
payload = {
"template_id": "<string>",
"submitters": [
{
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"role": "<string>",
"external_id": "<string>",
"metadata": {},
"values": {},
"completed_redirect_url": "<string>",
"preferences": {},
"field_overrides": {},
"completed": False,
"fields": [
{
"name": "<string>",
"default_value": "<string>"
}
]
}
],
"send_email": True,
"send_sms": False,
"order": "preserved",
"expire_at": "2023-11-07T05:31:56Z",
"metadata": {},
"completed_redirect_url": "<string>",
"reply_to": "jsmith@example.com",
"bcc_completed": "jsmith@example.com",
"message": {
"subject": "<string>",
"body": "<string>"
},
"quick_sign_mode": "confirmation_modal",
"prefill_behavior": {
"skip_if_prefilled": True,
"editable_if_prefilled": False
},
"preferences": {
"display_title": "Acme Legal Retainer",
"logo_url": "<string>",
"company_name": "<string>",
"favicon_url": "<string>",
"primary_button_color": "#2f5d8a",
"header_color": "#14213d",
"show_branding": True,
"brand_id": 7,
"custom_domain": "sign.example.com",
"signing_nav_style": "standard"
}
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_id: '<string>',
submitters: [
{
email: 'jsmith@example.com',
name: '<string>',
phone: '<string>',
role: '<string>',
external_id: '<string>',
metadata: {},
values: {},
completed_redirect_url: '<string>',
preferences: {},
field_overrides: {},
completed: false,
fields: [{name: '<string>', default_value: '<string>'}]
}
],
send_email: true,
send_sms: false,
order: 'preserved',
expire_at: '2023-11-07T05:31:56Z',
metadata: {},
completed_redirect_url: '<string>',
reply_to: 'jsmith@example.com',
bcc_completed: 'jsmith@example.com',
message: {subject: '<string>', body: JSON.stringify('<string>')},
quick_sign_mode: 'confirmation_modal',
prefill_behavior: {skip_if_prefilled: true, editable_if_prefilled: false},
preferences: {
display_title: 'Acme Legal Retainer',
logo_url: '<string>',
company_name: '<string>',
favicon_url: '<string>',
primary_button_color: '#2f5d8a',
header_color: '#14213d',
show_branding: true,
brand_id: 7,
custom_domain: 'sign.example.com',
signing_nav_style: 'standard'
}
})
};
fetch('https://spitshake.io/api/submissions', 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://spitshake.io/api/submissions",
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([
'template_id' => '<string>',
'submitters' => [
[
'email' => 'jsmith@example.com',
'name' => '<string>',
'phone' => '<string>',
'role' => '<string>',
'external_id' => '<string>',
'metadata' => [
],
'values' => [
],
'completed_redirect_url' => '<string>',
'preferences' => [
],
'field_overrides' => [
],
'completed' => false,
'fields' => [
[
'name' => '<string>',
'default_value' => '<string>'
]
]
]
],
'send_email' => true,
'send_sms' => false,
'order' => 'preserved',
'expire_at' => '2023-11-07T05:31:56Z',
'metadata' => [
],
'completed_redirect_url' => '<string>',
'reply_to' => 'jsmith@example.com',
'bcc_completed' => 'jsmith@example.com',
'message' => [
'subject' => '<string>',
'body' => '<string>'
],
'quick_sign_mode' => 'confirmation_modal',
'prefill_behavior' => [
'skip_if_prefilled' => true,
'editable_if_prefilled' => false
],
'preferences' => [
'display_title' => 'Acme Legal Retainer',
'logo_url' => '<string>',
'company_name' => '<string>',
'favicon_url' => '<string>',
'primary_button_color' => '#2f5d8a',
'header_color' => '#14213d',
'show_branding' => true,
'brand_id' => 7,
'custom_domain' => 'sign.example.com',
'signing_nav_style' => 'standard'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-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://spitshake.io/api/submissions"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"submitters\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {},\n \"values\": {},\n \"completed_redirect_url\": \"<string>\",\n \"preferences\": {},\n \"field_overrides\": {},\n \"completed\": false,\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"default_value\": \"<string>\"\n }\n ]\n }\n ],\n \"send_email\": true,\n \"send_sms\": false,\n \"order\": \"preserved\",\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"completed_redirect_url\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"bcc_completed\": \"jsmith@example.com\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n },\n \"preferences\": {\n \"display_title\": \"Acme Legal Retainer\",\n \"logo_url\": \"<string>\",\n \"company_name\": \"<string>\",\n \"favicon_url\": \"<string>\",\n \"primary_button_color\": \"#2f5d8a\",\n \"header_color\": \"#14213d\",\n \"show_branding\": true,\n \"brand_id\": 7,\n \"custom_domain\": \"sign.example.com\",\n \"signing_nav_style\": \"standard\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-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://spitshake.io/api/submissions")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"submitters\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {},\n \"values\": {},\n \"completed_redirect_url\": \"<string>\",\n \"preferences\": {},\n \"field_overrides\": {},\n \"completed\": false,\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"default_value\": \"<string>\"\n }\n ]\n }\n ],\n \"send_email\": true,\n \"send_sms\": false,\n \"order\": \"preserved\",\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"completed_redirect_url\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"bcc_completed\": \"jsmith@example.com\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n },\n \"preferences\": {\n \"display_title\": \"Acme Legal Retainer\",\n \"logo_url\": \"<string>\",\n \"company_name\": \"<string>\",\n \"favicon_url\": \"<string>\",\n \"primary_button_color\": \"#2f5d8a\",\n \"header_color\": \"#14213d\",\n \"show_branding\": true,\n \"brand_id\": 7,\n \"custom_domain\": \"sign.example.com\",\n \"signing_nav_style\": \"standard\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/submissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\",\n \"submitters\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {},\n \"values\": {},\n \"completed_redirect_url\": \"<string>\",\n \"preferences\": {},\n \"field_overrides\": {},\n \"completed\": false,\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"default_value\": \"<string>\"\n }\n ]\n }\n ],\n \"send_email\": true,\n \"send_sms\": false,\n \"order\": \"preserved\",\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"completed_redirect_url\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"bcc_completed\": \"jsmith@example.com\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n },\n \"preferences\": {\n \"display_title\": \"Acme Legal Retainer\",\n \"logo_url\": \"<string>\",\n \"company_name\": \"<string>\",\n \"favicon_url\": \"<string>\",\n \"primary_button_color\": \"#2f5d8a\",\n \"header_color\": \"#14213d\",\n \"show_branding\": true,\n \"brand_id\": 7,\n \"custom_domain\": \"sign.example.com\",\n \"signing_nav_style\": \"standard\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"slug": "<string>",
"source": "<string>",
"status": "<string>",
"template_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"expire_at": "2023-11-07T05:31:56Z",
"submitters": [
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"signing_url": "https://sign.yourcompany.com/s/OGZGoWBpoM8nN8",
"email": "jsmith@example.com",
"name": "<string>",
"role": "<string>",
"status": "waiting",
"submission_id": 123,
"opened_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"phone": "<string>",
"external_id": "<string>",
"values": {},
"metadata": {},
"preferences": {},
"declined_at": "2023-11-07T05:31:56Z",
"documents": [
{
"name": "<string>",
"url": "<string>"
}
],
"submission_events": [
{}
],
"template": {
"id": 123,
"name": "<string>"
},
"submission": {
"id": 123,
"slug": "<string>",
"status": "<string>"
}
}
],
"audit_log": [
{}
],
"metadata": {},
"template": {
"id": "<string>",
"name": "<string>",
"schema": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "text",
"submitter_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"readonly": true,
"key": "<string>",
"default_value": "<string>",
"placeholder": "<string>",
"pattern": "<string>",
"validation": "ssn",
"options": [
"<string>"
],
"formula": "<string>",
"areas": [
{
"x": 23.07,
"y": 20.35,
"w": 25,
"h": 5,
"page": 1,
"attachment_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"preferences": {}
}
],
"submitters": [
{}
],
"documents": [
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"page_count": 123,
"page_dimensions": [
{
"width": 123,
"height": 123
}
],
"url": "<string>"
}
]
},
"documents": [
{
"id": 123,
"filename": "<string>",
"document_type": "<string>",
"byte_size": 123
}
]
}{
"error": "<string>"
}{
"error": "<string>",
"code": "invalid_field_values",
"errors": [
{
"code": "<string>",
"key": "<string>",
"field_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_name": "<string>",
"field_type": "<string>",
"message": "<string>",
"expected_count": 123,
"unmatched_count": 123,
"received_count": 123
}
],
"warnings": [
{
"code": "<string>",
"key": "<string>",
"field_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_name": "<string>",
"field_type": "<string>",
"message": "<string>",
"expected_count": 123,
"unmatched_count": 123,
"received_count": 123
}
]
}Authorizations
API token generated at Settings > API
Headers
Prevents duplicate submissions on retry. Same key + same body replays the original response.
255Body
Show child attributes
Show child attributes
Send invitation emails to submitters
Text each signer their signing link through this account's OWN SMS sender
(Twilio, Telnyx or Vonage - configure it with PUT /api/verification/config).
SMS is IN ADDITION to email unless send_email: false. Every submitter needs a
phone. Refused with 422 before anything is created: sms_not_configured (no
sender on the account) or sms_phone_missing. A sequential (preserved)
submission texts the first signer now and each next signer as the previous one
completes. The outcome is recorded on the submitter (metadata.sms_delivery_status)
and in the audit log (sms_invitation_sent / sms_invitation_failed).
preserved, random Where to send every signer after they complete, unless the signer has their
own submitters[].completed_redirect_url. Falls back to the submission's
preferences.redirect_url, then the template's redirect_url; the account
settings.redirect_url is not used. Must be an absolute http/https URL
(422 invalid_redirect_url otherwise). When the signer finishes, they see
the completion screen and are then redirected (the whole tab when the
signing page is embedded in an iframe). A signer who reopens the link
later, or submits from a stale tab, gets the "Already Completed" page
with a Continue link to this URL (opened in the top window) instead
of an automatic redirect.
Show child attributes
Show child attributes
Submission-level quick-sign mode. Set to normal to force legacy behavior.
normal, review_and_sign, auto_scroll_signature, confirmation_modal Submission-level prefill behavior. Defaults to skip prefilled fields and make them read-only.
Show child attributes
Show child attributes
Generate a dynamic cover page and prepend it as page 0 of the signing package. The cover page is rendered per submission with the provided financial data. All monetary values are integers in whole dollars (no cents). Admin fees must be negative.
Show child attributes
Show child attributes
Submission preferences. The branding and domain keys below override the template's for this submission only; see the Preferences guide for every other key.
Show child attributes
Show child attributes
Response
Created submission with submitters
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
curl --request POST \
--url https://spitshake.io/api/submissions \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"template_id": "<string>",
"submitters": [
{
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"role": "<string>",
"external_id": "<string>",
"metadata": {},
"values": {},
"completed_redirect_url": "<string>",
"preferences": {},
"field_overrides": {},
"completed": false,
"fields": [
{
"name": "<string>",
"default_value": "<string>"
}
]
}
],
"send_email": true,
"send_sms": false,
"order": "preserved",
"expire_at": "2023-11-07T05:31:56Z",
"metadata": {},
"completed_redirect_url": "<string>",
"reply_to": "jsmith@example.com",
"bcc_completed": "jsmith@example.com",
"message": {
"subject": "<string>",
"body": "<string>"
},
"quick_sign_mode": "confirmation_modal",
"prefill_behavior": {
"skip_if_prefilled": true,
"editable_if_prefilled": false
},
"preferences": {
"display_title": "Acme Legal Retainer",
"logo_url": "<string>",
"company_name": "<string>",
"favicon_url": "<string>",
"primary_button_color": "#2f5d8a",
"header_color": "#14213d",
"show_branding": true,
"brand_id": 7,
"custom_domain": "sign.example.com",
"signing_nav_style": "standard"
}
}
'import requests
url = "https://spitshake.io/api/submissions"
payload = {
"template_id": "<string>",
"submitters": [
{
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"role": "<string>",
"external_id": "<string>",
"metadata": {},
"values": {},
"completed_redirect_url": "<string>",
"preferences": {},
"field_overrides": {},
"completed": False,
"fields": [
{
"name": "<string>",
"default_value": "<string>"
}
]
}
],
"send_email": True,
"send_sms": False,
"order": "preserved",
"expire_at": "2023-11-07T05:31:56Z",
"metadata": {},
"completed_redirect_url": "<string>",
"reply_to": "jsmith@example.com",
"bcc_completed": "jsmith@example.com",
"message": {
"subject": "<string>",
"body": "<string>"
},
"quick_sign_mode": "confirmation_modal",
"prefill_behavior": {
"skip_if_prefilled": True,
"editable_if_prefilled": False
},
"preferences": {
"display_title": "Acme Legal Retainer",
"logo_url": "<string>",
"company_name": "<string>",
"favicon_url": "<string>",
"primary_button_color": "#2f5d8a",
"header_color": "#14213d",
"show_branding": True,
"brand_id": 7,
"custom_domain": "sign.example.com",
"signing_nav_style": "standard"
}
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_id: '<string>',
submitters: [
{
email: 'jsmith@example.com',
name: '<string>',
phone: '<string>',
role: '<string>',
external_id: '<string>',
metadata: {},
values: {},
completed_redirect_url: '<string>',
preferences: {},
field_overrides: {},
completed: false,
fields: [{name: '<string>', default_value: '<string>'}]
}
],
send_email: true,
send_sms: false,
order: 'preserved',
expire_at: '2023-11-07T05:31:56Z',
metadata: {},
completed_redirect_url: '<string>',
reply_to: 'jsmith@example.com',
bcc_completed: 'jsmith@example.com',
message: {subject: '<string>', body: JSON.stringify('<string>')},
quick_sign_mode: 'confirmation_modal',
prefill_behavior: {skip_if_prefilled: true, editable_if_prefilled: false},
preferences: {
display_title: 'Acme Legal Retainer',
logo_url: '<string>',
company_name: '<string>',
favicon_url: '<string>',
primary_button_color: '#2f5d8a',
header_color: '#14213d',
show_branding: true,
brand_id: 7,
custom_domain: 'sign.example.com',
signing_nav_style: 'standard'
}
})
};
fetch('https://spitshake.io/api/submissions', 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://spitshake.io/api/submissions",
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([
'template_id' => '<string>',
'submitters' => [
[
'email' => 'jsmith@example.com',
'name' => '<string>',
'phone' => '<string>',
'role' => '<string>',
'external_id' => '<string>',
'metadata' => [
],
'values' => [
],
'completed_redirect_url' => '<string>',
'preferences' => [
],
'field_overrides' => [
],
'completed' => false,
'fields' => [
[
'name' => '<string>',
'default_value' => '<string>'
]
]
]
],
'send_email' => true,
'send_sms' => false,
'order' => 'preserved',
'expire_at' => '2023-11-07T05:31:56Z',
'metadata' => [
],
'completed_redirect_url' => '<string>',
'reply_to' => 'jsmith@example.com',
'bcc_completed' => 'jsmith@example.com',
'message' => [
'subject' => '<string>',
'body' => '<string>'
],
'quick_sign_mode' => 'confirmation_modal',
'prefill_behavior' => [
'skip_if_prefilled' => true,
'editable_if_prefilled' => false
],
'preferences' => [
'display_title' => 'Acme Legal Retainer',
'logo_url' => '<string>',
'company_name' => '<string>',
'favicon_url' => '<string>',
'primary_button_color' => '#2f5d8a',
'header_color' => '#14213d',
'show_branding' => true,
'brand_id' => 7,
'custom_domain' => 'sign.example.com',
'signing_nav_style' => 'standard'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-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://spitshake.io/api/submissions"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"submitters\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {},\n \"values\": {},\n \"completed_redirect_url\": \"<string>\",\n \"preferences\": {},\n \"field_overrides\": {},\n \"completed\": false,\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"default_value\": \"<string>\"\n }\n ]\n }\n ],\n \"send_email\": true,\n \"send_sms\": false,\n \"order\": \"preserved\",\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"completed_redirect_url\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"bcc_completed\": \"jsmith@example.com\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n },\n \"preferences\": {\n \"display_title\": \"Acme Legal Retainer\",\n \"logo_url\": \"<string>\",\n \"company_name\": \"<string>\",\n \"favicon_url\": \"<string>\",\n \"primary_button_color\": \"#2f5d8a\",\n \"header_color\": \"#14213d\",\n \"show_branding\": true,\n \"brand_id\": 7,\n \"custom_domain\": \"sign.example.com\",\n \"signing_nav_style\": \"standard\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-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://spitshake.io/api/submissions")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"submitters\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {},\n \"values\": {},\n \"completed_redirect_url\": \"<string>\",\n \"preferences\": {},\n \"field_overrides\": {},\n \"completed\": false,\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"default_value\": \"<string>\"\n }\n ]\n }\n ],\n \"send_email\": true,\n \"send_sms\": false,\n \"order\": \"preserved\",\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"completed_redirect_url\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"bcc_completed\": \"jsmith@example.com\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n },\n \"preferences\": {\n \"display_title\": \"Acme Legal Retainer\",\n \"logo_url\": \"<string>\",\n \"company_name\": \"<string>\",\n \"favicon_url\": \"<string>\",\n \"primary_button_color\": \"#2f5d8a\",\n \"header_color\": \"#14213d\",\n \"show_branding\": true,\n \"brand_id\": 7,\n \"custom_domain\": \"sign.example.com\",\n \"signing_nav_style\": \"standard\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/submissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\",\n \"submitters\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {},\n \"values\": {},\n \"completed_redirect_url\": \"<string>\",\n \"preferences\": {},\n \"field_overrides\": {},\n \"completed\": false,\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"default_value\": \"<string>\"\n }\n ]\n }\n ],\n \"send_email\": true,\n \"send_sms\": false,\n \"order\": \"preserved\",\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {},\n \"completed_redirect_url\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"bcc_completed\": \"jsmith@example.com\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n },\n \"preferences\": {\n \"display_title\": \"Acme Legal Retainer\",\n \"logo_url\": \"<string>\",\n \"company_name\": \"<string>\",\n \"favicon_url\": \"<string>\",\n \"primary_button_color\": \"#2f5d8a\",\n \"header_color\": \"#14213d\",\n \"show_branding\": true,\n \"brand_id\": 7,\n \"custom_domain\": \"sign.example.com\",\n \"signing_nav_style\": \"standard\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"slug": "<string>",
"source": "<string>",
"status": "<string>",
"template_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"expire_at": "2023-11-07T05:31:56Z",
"submitters": [
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"signing_url": "https://sign.yourcompany.com/s/OGZGoWBpoM8nN8",
"email": "jsmith@example.com",
"name": "<string>",
"role": "<string>",
"status": "waiting",
"submission_id": 123,
"opened_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"phone": "<string>",
"external_id": "<string>",
"values": {},
"metadata": {},
"preferences": {},
"declined_at": "2023-11-07T05:31:56Z",
"documents": [
{
"name": "<string>",
"url": "<string>"
}
],
"submission_events": [
{}
],
"template": {
"id": 123,
"name": "<string>"
},
"submission": {
"id": 123,
"slug": "<string>",
"status": "<string>"
}
}
],
"audit_log": [
{}
],
"metadata": {},
"template": {
"id": "<string>",
"name": "<string>",
"schema": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "text",
"submitter_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"readonly": true,
"key": "<string>",
"default_value": "<string>",
"placeholder": "<string>",
"pattern": "<string>",
"validation": "ssn",
"options": [
"<string>"
],
"formula": "<string>",
"areas": [
{
"x": 23.07,
"y": 20.35,
"w": 25,
"h": 5,
"page": 1,
"attachment_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"preferences": {}
}
],
"submitters": [
{}
],
"documents": [
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"page_count": 123,
"page_dimensions": [
{
"width": 123,
"height": 123
}
],
"url": "<string>"
}
]
},
"documents": [
{
"id": 123,
"filename": "<string>",
"document_type": "<string>",
"byte_size": 123
}
]
}{
"error": "<string>"
}{
"error": "<string>",
"code": "invalid_field_values",
"errors": [
{
"code": "<string>",
"key": "<string>",
"field_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_name": "<string>",
"field_type": "<string>",
"message": "<string>",
"expected_count": 123,
"unmatched_count": 123,
"received_count": 123
}
],
"warnings": [
{
"code": "<string>",
"key": "<string>",
"field_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_name": "<string>",
"field_type": "<string>",
"message": "<string>",
"expected_count": 123,
"unmatched_count": 123,
"received_count": 123
}
]
}
