Create submissions from email list
Create one submission per email address from a comma-separated list. Each email gets its own submission with a single submitter assigned to the first role defined in the template. Returns an array of submitter objects with embed URLs for each created submission.
curl --request POST \
--url https://spitshake.io/api/submissions/emails \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"template_id": "<string>",
"emails": "alice@example.com, bob@example.com, carol@example.com",
"send_email": true,
"name": "<string>",
"message": {
"subject": "<string>",
"body": "<string>"
},
"expire_at": "2023-11-07T05:31:56Z",
"quick_sign_mode": "confirmation_modal",
"prefill_behavior": {
"skip_if_prefilled": true,
"editable_if_prefilled": false
}
}
'import requests
url = "https://spitshake.io/api/submissions/emails"
payload = {
"template_id": "<string>",
"emails": "alice@example.com, bob@example.com, carol@example.com",
"send_email": True,
"name": "<string>",
"message": {
"subject": "<string>",
"body": "<string>"
},
"expire_at": "2023-11-07T05:31:56Z",
"quick_sign_mode": "confirmation_modal",
"prefill_behavior": {
"skip_if_prefilled": True,
"editable_if_prefilled": False
}
}
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>',
emails: 'alice@example.com, bob@example.com, carol@example.com',
send_email: true,
name: '<string>',
message: {subject: '<string>', body: JSON.stringify('<string>')},
expire_at: '2023-11-07T05:31:56Z',
quick_sign_mode: 'confirmation_modal',
prefill_behavior: {skip_if_prefilled: true, editable_if_prefilled: false}
})
};
fetch('https://spitshake.io/api/submissions/emails', 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/emails",
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>',
'emails' => 'alice@example.com, bob@example.com, carol@example.com',
'send_email' => true,
'name' => '<string>',
'message' => [
'subject' => '<string>',
'body' => '<string>'
],
'expire_at' => '2023-11-07T05:31:56Z',
'quick_sign_mode' => 'confirmation_modal',
'prefill_behavior' => [
'skip_if_prefilled' => true,
'editable_if_prefilled' => false
]
]),
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/emails"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"emails\": \"alice@example.com, bob@example.com, carol@example.com\",\n \"send_email\": true,\n \"name\": \"<string>\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\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/emails")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"emails\": \"alice@example.com, bob@example.com, carol@example.com\",\n \"send_email\": true,\n \"name\": \"<string>\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/submissions/emails")
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 \"emails\": \"alice@example.com, bob@example.com, carol@example.com\",\n \"send_email\": true,\n \"name\": \"<string>\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n }\n}"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"role": "<string>",
"status": "waiting",
"submission_id": 123,
"embed_src": "<string>"
}
]{
"error": "<string>"
}Authorizations
API token generated at Settings > API
Body
Template to use for each submission
Comma-separated email addresses
"alice@example.com, bob@example.com, carol@example.com"
Send invitation emails to each submitter
Default name for all submitters
Show child attributes
Show child attributes
Expiration date for all created submissions
Submission-level quick-sign mode for every created submission.
normal, review_and_sign, auto_scroll_signature, confirmation_modal Submission-level prefill behavior for every created submission.
Show child attributes
Show child attributes
Response
Array of created submitters (one per email)
waiting The submitter's absolute signing link, to embed or redirect to. On the submission's signing domain (its custom domain when one applies), like signing_url in POST /api/submissions. This endpoint returns no separate signing_url field.
curl --request POST \
--url https://spitshake.io/api/submissions/emails \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"template_id": "<string>",
"emails": "alice@example.com, bob@example.com, carol@example.com",
"send_email": true,
"name": "<string>",
"message": {
"subject": "<string>",
"body": "<string>"
},
"expire_at": "2023-11-07T05:31:56Z",
"quick_sign_mode": "confirmation_modal",
"prefill_behavior": {
"skip_if_prefilled": true,
"editable_if_prefilled": false
}
}
'import requests
url = "https://spitshake.io/api/submissions/emails"
payload = {
"template_id": "<string>",
"emails": "alice@example.com, bob@example.com, carol@example.com",
"send_email": True,
"name": "<string>",
"message": {
"subject": "<string>",
"body": "<string>"
},
"expire_at": "2023-11-07T05:31:56Z",
"quick_sign_mode": "confirmation_modal",
"prefill_behavior": {
"skip_if_prefilled": True,
"editable_if_prefilled": False
}
}
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>',
emails: 'alice@example.com, bob@example.com, carol@example.com',
send_email: true,
name: '<string>',
message: {subject: '<string>', body: JSON.stringify('<string>')},
expire_at: '2023-11-07T05:31:56Z',
quick_sign_mode: 'confirmation_modal',
prefill_behavior: {skip_if_prefilled: true, editable_if_prefilled: false}
})
};
fetch('https://spitshake.io/api/submissions/emails', 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/emails",
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>',
'emails' => 'alice@example.com, bob@example.com, carol@example.com',
'send_email' => true,
'name' => '<string>',
'message' => [
'subject' => '<string>',
'body' => '<string>'
],
'expire_at' => '2023-11-07T05:31:56Z',
'quick_sign_mode' => 'confirmation_modal',
'prefill_behavior' => [
'skip_if_prefilled' => true,
'editable_if_prefilled' => false
]
]),
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/emails"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"emails\": \"alice@example.com, bob@example.com, carol@example.com\",\n \"send_email\": true,\n \"name\": \"<string>\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\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/emails")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"emails\": \"alice@example.com, bob@example.com, carol@example.com\",\n \"send_email\": true,\n \"name\": \"<string>\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/submissions/emails")
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 \"emails\": \"alice@example.com, bob@example.com, carol@example.com\",\n \"send_email\": true,\n \"name\": \"<string>\",\n \"message\": {\n \"subject\": \"<string>\",\n \"body\": \"<string>\"\n },\n \"expire_at\": \"2023-11-07T05:31:56Z\",\n \"quick_sign_mode\": \"confirmation_modal\",\n \"prefill_behavior\": {\n \"skip_if_prefilled\": true,\n \"editable_if_prefilled\": false\n }\n}"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"role": "<string>",
"status": "waiting",
"submission_id": 123,
"embed_src": "<string>"
}
]{
"error": "<string>"
}
