Get a User Document by ID
curl --request GET \
--url https://staging.crossmint.com/api/2025-06-09/documents/{documentId} \
--header 'X-API-KEY: <x-api-key>'import requests
url = "https://staging.crossmint.com/api/2025-06-09/documents/{documentId}"
headers = {"X-API-KEY": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<x-api-key>'}};
fetch('https://staging.crossmint.com/api/2025-06-09/documents/{documentId}', 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://staging.crossmint.com/api/2025-06-09/documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <x-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"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/2025-06-09/documents/{documentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.crossmint.com/api/2025-06-09/documents/{documentId}")
.header("X-API-KEY", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2025-06-09/documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"createdAt": "2024-12-05T10:30:00.000Z",
"documentType": "id-passport",
"id": "doc_abc123xyz",
"expiresAt": "2030-12-31"
}User Identity
Get a User Document by ID
Get a specific document by its ID.
API scope required: users.read
GET
/
2025-06-09
/
documents
/
{documentId}
Get a User Document by ID
curl --request GET \
--url https://staging.crossmint.com/api/2025-06-09/documents/{documentId} \
--header 'X-API-KEY: <x-api-key>'import requests
url = "https://staging.crossmint.com/api/2025-06-09/documents/{documentId}"
headers = {"X-API-KEY": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<x-api-key>'}};
fetch('https://staging.crossmint.com/api/2025-06-09/documents/{documentId}', 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://staging.crossmint.com/api/2025-06-09/documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <x-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"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/2025-06-09/documents/{documentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.crossmint.com/api/2025-06-09/documents/{documentId}")
.header("X-API-KEY", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2025-06-09/documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"createdAt": "2024-12-05T10:30:00.000Z",
"documentType": "id-passport",
"id": "doc_abc123xyz",
"expiresAt": "2030-12-31"
}Headers
API key required for authentication
Path Parameters
Response
Document retrieved successfully
ISO 8601 timestamp when the document was created
Example:
"2024-12-05T10:30:00.000Z"
Type of document
Available options:
id-idcard-back, id-idcard-front, id-passport, id-residency-permit, proof-of-address, selfie-front, selfie-left, selfie-right, source-of-wealth Example:
"id-passport"
Unique identifier for the document
Example:
"doc_abc123xyz"
Document expiration date in YYYY-MM-DD format
Example:
"2030-12-31"
Was this page helpful?

