Forms
List all forms
GET
/
forms
cURL
curl --request GET \
--url https://api.caspen.com/v1/formsimport requests
url = "https://api.caspen.com/v1/forms"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.caspen.com/v1/forms', 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.caspen.com/v1/forms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.caspen.com/v1/forms"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.caspen.com/v1/forms")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.caspen.com/v1/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "for_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"client_id": "cli_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"location_id": "loc_01HZR88VXZ3G2NTVPEB2PCCKDY",
"form_template_id": "fte_01HYHYQHA682J0K1RW7B2HVA9F",
"appointment_client_id": "apc_01HYHYW37MTYJPMT5JV4RN99GK",
"name": "Intake questionnaire",
"color": "blue",
"completion_message": "Thanks for completing your form.",
"prefill_client_fields": true,
"override_client_fields": false,
"status": "completed",
"sent_status": "viewed",
"content": [
{
"sections": [
{
"title": "<string>",
"description": "<string>",
"questions": [
{}
]
}
]
}
],
"hosted_form_url": "https://example.caspen.com/form/for_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"sent_at": "2024-01-01T12:00:00Z",
"viewed_at": "2024-01-01T13:00:00Z",
"completed_at": "2024-01-01T14:00:00Z",
"archived_at": "2024-02-01T09:00:00Z",
"created_at": "2024-01-01T12:00:00Z"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Query Parameters
Available options:
not_started, in_progress, completed Show child attributes
Show child attributes
Required range:
1 <= x <= 10⌘I
cURL
curl --request GET \
--url https://api.caspen.com/v1/formsimport requests
url = "https://api.caspen.com/v1/forms"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.caspen.com/v1/forms', 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.caspen.com/v1/forms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.caspen.com/v1/forms"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.caspen.com/v1/forms")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.caspen.com/v1/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "for_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"client_id": "cli_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"location_id": "loc_01HZR88VXZ3G2NTVPEB2PCCKDY",
"form_template_id": "fte_01HYHYQHA682J0K1RW7B2HVA9F",
"appointment_client_id": "apc_01HYHYW37MTYJPMT5JV4RN99GK",
"name": "Intake questionnaire",
"color": "blue",
"completion_message": "Thanks for completing your form.",
"prefill_client_fields": true,
"override_client_fields": false,
"status": "completed",
"sent_status": "viewed",
"content": [
{
"sections": [
{
"title": "<string>",
"description": "<string>",
"questions": [
{}
]
}
]
}
],
"hosted_form_url": "https://example.caspen.com/form/for_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"sent_at": "2024-01-01T12:00:00Z",
"viewed_at": "2024-01-01T13:00:00Z",
"completed_at": "2024-01-01T14:00:00Z",
"archived_at": "2024-02-01T09:00:00Z",
"created_at": "2024-01-01T12:00:00Z"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}