Copy a form
curl --request POST \
--url https://api.paubox.com/v1/forms/api/forms/copy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"form_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Patient Intake Form (Copy)"
}
'import requests
url = "https://api.paubox.com/v1/forms/api/forms/copy"
payload = {
"form_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Patient Intake Form (Copy)"
}
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({
form_id: '550e8400-e29b-41d4-a716-446655440000',
title: 'Patient Intake Form (Copy)'
})
};
fetch('https://api.paubox.com/v1/forms/api/forms/copy', 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.paubox.com/v1/forms/api/forms/copy",
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([
'form_id' => '550e8400-e29b-41d4-a716-446655440000',
'title' => 'Patient Intake Form (Copy)'
]),
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.paubox.com/v1/forms/api/forms/copy"
payload := strings.NewReader("{\n \"form_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Patient Intake Form (Copy)\"\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.paubox.com/v1/forms/api/forms/copy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"form_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Patient Intake Form (Copy)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paubox.com/v1/forms/api/forms/copy")
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 \"form_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Patient Intake Form (Copy)\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9f8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
"title": "Patient Intake Form (Copy)",
"description": "Please complete before your appointment.",
"form_html": "<form>...</form>",
"form_json": {},
"form_css": "form { font-family: sans-serif; }",
"vanity_url": null,
"version": 2,
"active": false,
"customer_id": 123,
"old_form_id": null,
"recipient": "intake@example.com",
"signable": false,
"signature_confirmation_label": null,
"submission_count": 0,
"type": null,
"subscription_list_id": null,
"deleted": false,
"archived": false,
"created_at": "2024-06-10T12:00:00Z",
"updated_at": "2024-06-10T12:00:00Z"
}{
"message": "form_json.body[1].type `DatePicker` is not a component the form renderer knows; expected one of: Text, Divider, TextInput, TextArea, Dropdown, Checkboxes, Radiobutton, FileUpload, Signature, Button, Conditional, Logo"
}Forms API
Copy a form
Creates a copy of an existing form with a new title. The copy starts with a submission count of 0 and no vanity URL. Returns the full new form object.
POST
/
api
/
forms
/
copy
Copy a form
curl --request POST \
--url https://api.paubox.com/v1/forms/api/forms/copy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"form_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Patient Intake Form (Copy)"
}
'import requests
url = "https://api.paubox.com/v1/forms/api/forms/copy"
payload = {
"form_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Patient Intake Form (Copy)"
}
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({
form_id: '550e8400-e29b-41d4-a716-446655440000',
title: 'Patient Intake Form (Copy)'
})
};
fetch('https://api.paubox.com/v1/forms/api/forms/copy', 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.paubox.com/v1/forms/api/forms/copy",
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([
'form_id' => '550e8400-e29b-41d4-a716-446655440000',
'title' => 'Patient Intake Form (Copy)'
]),
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.paubox.com/v1/forms/api/forms/copy"
payload := strings.NewReader("{\n \"form_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Patient Intake Form (Copy)\"\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.paubox.com/v1/forms/api/forms/copy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"form_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Patient Intake Form (Copy)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paubox.com/v1/forms/api/forms/copy")
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 \"form_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Patient Intake Form (Copy)\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9f8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
"title": "Patient Intake Form (Copy)",
"description": "Please complete before your appointment.",
"form_html": "<form>...</form>",
"form_json": {},
"form_css": "form { font-family: sans-serif; }",
"vanity_url": null,
"version": 2,
"active": false,
"customer_id": 123,
"old_form_id": null,
"recipient": "intake@example.com",
"signable": false,
"signature_confirmation_label": null,
"submission_count": 0,
"type": null,
"subscription_list_id": null,
"deleted": false,
"archived": false,
"created_at": "2024-06-10T12:00:00Z",
"updated_at": "2024-06-10T12:00:00Z"
}{
"message": "form_json.body[1].type `DatePicker` is not a component the form renderer knows; expected one of: Text, Divider, TextInput, TextArea, Dropdown, Checkboxes, Radiobutton, FileUpload, Signature, Button, Conditional, Logo"
}Authorizations
Paubox API key sent as Authorization: Bearer YOUR_API_KEY. API keys are created in the Paubox dashboard and must have the "forms" scope; a key without the forms scope receives 401 Unauthorized. A valid key used against a resource that belongs to a different customer receives 403 Forbidden.
Body
application/json
Response
The newly created form
Comma-separated email addresses notified on each submission.
ID of the connected Marketing contact list. For marketing forms, new subscribers are added to this list.
⌘I