List documents
curl --request GET \
--url https://suresign.si/api/v1/documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://suresign.si/api/v1/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://suresign.si/api/v1/documents', 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://suresign.si/api/v1/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://suresign.si/api/v1/documents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://suresign.si/api/v1/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://suresign.si/api/v1/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"title": "<string>",
"status": "DRAFT",
"fileName": "<string>",
"pageCount": 123,
"fileSize": 123,
"signingOrder": "PARALLEL",
"createdAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"progress": {
"done": 123,
"total": 123
},
"recipients": [
{
"id": "<string>",
"name": "<string>",
"email": "<string>",
"role": "SIGNER",
"status": "PENDING",
"order": 123,
"sentAt": "2023-11-07T05:31:56Z",
"viewedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"declinedAt": "2023-11-07T05:31:56Z",
"declineReason": "<string>"
}
],
"links": {
"self": "/api/v1/documents/doc_123",
"download": "/api/v1/documents/doc_123/download"
}
}
],
"nextCursor": "<string>"
}{
"error": "<string>"
}{
"error": "That key is not valid."
}{
"error": "<string>",
"details": {
"code": "plan_limit",
"upgrade": "pro",
"href": "<string>"
}
}{
"error": "This workspace is suspended, so its API keys are refused."
}{
"error": "Rate limit exceeded. Try again in 12 seconds."
}List documents
Lists the documents in the key’s workspace, newest first. Deleted documents are not included. Uses cursor pagination: pass the nextCursor from one response as cursor on the next request.
GET
/
api
/
v1
/
documents
List documents
curl --request GET \
--url https://suresign.si/api/v1/documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://suresign.si/api/v1/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://suresign.si/api/v1/documents', 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://suresign.si/api/v1/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://suresign.si/api/v1/documents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://suresign.si/api/v1/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://suresign.si/api/v1/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"title": "<string>",
"status": "DRAFT",
"fileName": "<string>",
"pageCount": 123,
"fileSize": 123,
"signingOrder": "PARALLEL",
"createdAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"progress": {
"done": 123,
"total": 123
},
"recipients": [
{
"id": "<string>",
"name": "<string>",
"email": "<string>",
"role": "SIGNER",
"status": "PENDING",
"order": 123,
"sentAt": "2023-11-07T05:31:56Z",
"viewedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"declinedAt": "2023-11-07T05:31:56Z",
"declineReason": "<string>"
}
],
"links": {
"self": "/api/v1/documents/doc_123",
"download": "/api/v1/documents/doc_123/download"
}
}
],
"nextCursor": "<string>"
}{
"error": "<string>"
}{
"error": "That key is not valid."
}{
"error": "<string>",
"details": {
"code": "plan_limit",
"upgrade": "pro",
"href": "<string>"
}
}{
"error": "This workspace is suspended, so its API keys are refused."
}{
"error": "Rate limit exceeded. Try again in 12 seconds."
}Authorizations
Your workspace API key, which starts with dtd_. Send it as Authorization: Bearer dtd_....
Query Parameters
Only return documents with this status.
Available options:
DRAFT, SENT, VIEWED, COMPLETED, DECLINED, CANCELLED, EXPIRED How many documents to return, from 1 to 100.
Required range:
1 <= x <= 100The nextCursor value from the previous page. Leave it out to get the first page.
⌘I

