Attach a document to a person
curl --request POST \
--url https://api.bachs.io/v1/accounts/{account_id}/persons/{person_id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "upl_7c2f9a10bd4e",
"document": "primary_verification",
"side": "front"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: 'upl_7c2f9a10bd4e', document: 'primary_verification', side: 'front'})
};
fetch('https://api.bachs.io/v1/accounts/{account_id}/persons/{person_id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/accounts/{account_id}/persons/{person_id}/documents"
payload = {
"file": "upl_7c2f9a10bd4e",
"document": "primary_verification",
"side": "front"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/accounts/{account_id}/persons/{person_id}/documents"
payload := strings.NewReader("{\n \"file\": \"upl_7c2f9a10bd4e\",\n \"document\": \"primary_verification\",\n \"side\": \"front\"\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))
}{
"id": "doc_5f0339fac1ae",
"person": "per_3a91c0d7f6e2b8149a05",
"document_type": "primary_verification",
"file_name": "ada-nin.jpg",
"uploaded_at": "2026-08-07T09:23:00.000Z"
}{
"detail": "Invalid request parameters",
"error_code": "VALIDATION_ERROR",
"errors": [
{
"field": "amount",
"message": "Amount must be a positive decimal string",
"type": "value_error"
}
]
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}Persons
Attach a document to a person
Point one of a person’s document slots at an already-uploaded file. Upload the file first with POST /v1/utilities/uploads, then reference its upload_id here as file. document is primary_verification (government ID) or secondary_verification (address evidence); a two-sided card is two attachments, each with its own side. Attaching does not verify: a reviewer accepting the document is what moves the person’s verification.status to passed. See Verify an account’s identity.
POST
/
v1
/
accounts
/
{account_id}
/
persons
/
{person_id}
/
documents
Attach a document to a person
curl --request POST \
--url https://api.bachs.io/v1/accounts/{account_id}/persons/{person_id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "upl_7c2f9a10bd4e",
"document": "primary_verification",
"side": "front"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: 'upl_7c2f9a10bd4e', document: 'primary_verification', side: 'front'})
};
fetch('https://api.bachs.io/v1/accounts/{account_id}/persons/{person_id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/accounts/{account_id}/persons/{person_id}/documents"
payload = {
"file": "upl_7c2f9a10bd4e",
"document": "primary_verification",
"side": "front"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/accounts/{account_id}/persons/{person_id}/documents"
payload := strings.NewReader("{\n \"file\": \"upl_7c2f9a10bd4e\",\n \"document\": \"primary_verification\",\n \"side\": \"front\"\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))
}{
"id": "doc_5f0339fac1ae",
"person": "per_3a91c0d7f6e2b8149a05",
"document_type": "primary_verification",
"file_name": "ada-nin.jpg",
"uploaded_at": "2026-08-07T09:23:00.000Z"
}{
"detail": "Invalid request parameters",
"error_code": "VALIDATION_ERROR",
"errors": [
{
"field": "amount",
"message": "Amount must be a positive decimal string",
"type": "value_error"
}
]
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}Authorizations
Bearer token authentication. Pass your API key as Authorization: Bearer sk_.... See Authentication for keys, scopes, and sandbox vs production.
Response
The document attached to the person.

