curl --request GET \
--url https://api.platform.dakota.xyz/applications/{application_id}/legal-documents/{document_key} \
--header 'X-Application-Token: <api-key>'const options = {method: 'GET', headers: {'X-Application-Token': '<api-key>'}};
fetch('https://api.platform.dakota.xyz/applications/{application_id}/legal-documents/{document_key}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.dakota.xyz/applications/{application_id}/legal-documents/{document_key}"
headers = {"X-Application-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.platform.dakota.xyz/applications/{application_id}/legal-documents/{document_key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Application-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"key": "cards_tos",
"version": "2026-08-04",
"revision": 5,
"title": "Spend Card Terms",
"content_type": "text/markdown",
"effective_date": "2026-08-04",
"content": "# Spend Card Terms\n\nCall Acme Corp at 555-0100...",
"content_sha256": "3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Customer Not Found",
"status": 404,
"detail": "Customer cst_2abc123 was not found in your organization.",
"instance": "https://api.platform.dakota.xyz/customers/cst_2abc123",
"request_id": "req_7f3a8b2c"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Customer Not Found",
"status": 404,
"detail": "Customer cst_2abc123 was not found in your organization.",
"instance": "https://api.platform.dakota.xyz/customers/cst_2abc123",
"request_id": "req_7f3a8b2c"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Customer Not Found",
"status": 404,
"detail": "Customer cst_2abc123 was not found in your organization.",
"instance": "https://api.platform.dakota.xyz/customers/cst_2abc123",
"request_id": "req_7f3a8b2c"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#internal-error",
"title": "Internal error",
"status": 500,
"detail": "An unexpected error occurred."
}Read a legal document as this application's customer is shown it
Returns one legal document with the application’s client’s values filled in for the placeholders the text contains. This is the text to display to the customer, and the text an acceptance records.
GET /legal/documents/{document_key} returns the published text as
written, which may contain [NAME] placeholders. Display this
endpoint’s content instead. A placeholder the client has no value for
is left as written.
Send content_sha256 back with the attestation (POST /applications/{application_id}/attestations). If the text changed between
reading and accepting, because the client’s values or the revision
changed, the attestation is refused with 409 (legal-document-changed)
and the customer must read the document again.
Omit version for the revision in force now. A revision named by
version must be in force or have been; a revision with no published
text is not found. A past revision is rendered with the client’s values
as they are now, so its content and content_sha256 can differ from
what an earlier acceptance of it recorded; the acceptance keeps its own
record.
Authentication: Accepts Application Token (X-Application-Token header), including the narrow legal-acceptance token issued by a terms refusal.
curl --request GET \
--url https://api.platform.dakota.xyz/applications/{application_id}/legal-documents/{document_key} \
--header 'X-Application-Token: <api-key>'const options = {method: 'GET', headers: {'X-Application-Token': '<api-key>'}};
fetch('https://api.platform.dakota.xyz/applications/{application_id}/legal-documents/{document_key}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.dakota.xyz/applications/{application_id}/legal-documents/{document_key}"
headers = {"X-Application-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.platform.dakota.xyz/applications/{application_id}/legal-documents/{document_key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Application-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"key": "cards_tos",
"version": "2026-08-04",
"revision": 5,
"title": "Spend Card Terms",
"content_type": "text/markdown",
"effective_date": "2026-08-04",
"content": "# Spend Card Terms\n\nCall Acme Corp at 555-0100...",
"content_sha256": "3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Customer Not Found",
"status": 404,
"detail": "Customer cst_2abc123 was not found in your organization.",
"instance": "https://api.platform.dakota.xyz/customers/cst_2abc123",
"request_id": "req_7f3a8b2c"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Customer Not Found",
"status": 404,
"detail": "Customer cst_2abc123 was not found in your organization.",
"instance": "https://api.platform.dakota.xyz/customers/cst_2abc123",
"request_id": "req_7f3a8b2c"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Customer Not Found",
"status": 404,
"detail": "Customer cst_2abc123 was not found in your organization.",
"instance": "https://api.platform.dakota.xyz/customers/cst_2abc123",
"request_id": "req_7f3a8b2c"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#internal-error",
"title": "Internal error",
"status": 500,
"detail": "An unexpected error occurred."
}Authorizations
Path Parameters
The unique identifier for the application KSUID is a 27-character globally unique ID that combines a timestamp with a random component. Used for all entity identifiers in the Dakota platform.
27^[0-9A-Za-z]{27}$"1NFHrqBHb3cTfLVkFSGmHZqdDPi"
Query Parameters
Response
The document as this customer is shown it.
One revision of a legal document as one application's customer is shown it: the published text with the client's values filled in.
Was this page helpful?

