curl --request POST \
--url https://api.bachs.io/v1/accounts/{account_id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "upl_7c2f9a10bd4e",
"document": "certificate_of_incorporation"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: 'upl_7c2f9a10bd4e', document: 'certificate_of_incorporation'})
};
fetch('https://api.bachs.io/v1/accounts/{account_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}/documents"
payload = {
"file": "upl_7c2f9a10bd4e",
"document": "certificate_of_incorporation"
}
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}/documents"
payload := strings.NewReader("{\n \"file\": \"upl_7c2f9a10bd4e\",\n \"document\": \"certificate_of_incorporation\"\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_9b21ec70f5aa",
"document_type": "certificate_of_incorporation",
"file_name": "cac-certificate.pdf",
"uploaded_at": "2026-08-07T09:24: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": "Attachment not found",
"error_code": "NOT_FOUND"
}Attach a company document
Point one of the company’s document slots at an already-uploaded file. Upload the file first with POST /v1/files, using purpose=account_requirement and X-Account-Id set to this account, then reference the returned id here as file. The file must belong to the account in the URL. A file uploaded under your platform account returns 404 NOT_FOUND with Attachment not found. document names the company slot the file satisfies (for example a certificate of incorporation or a memorandum), and which slots exist depends on the company’s structure and country. This attaches company-level paperwork; a person’s ID document attaches to the person instead. See Requirements.
curl --request POST \
--url https://api.bachs.io/v1/accounts/{account_id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "upl_7c2f9a10bd4e",
"document": "certificate_of_incorporation"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: 'upl_7c2f9a10bd4e', document: 'certificate_of_incorporation'})
};
fetch('https://api.bachs.io/v1/accounts/{account_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}/documents"
payload = {
"file": "upl_7c2f9a10bd4e",
"document": "certificate_of_incorporation"
}
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}/documents"
payload := strings.NewReader("{\n \"file\": \"upl_7c2f9a10bd4e\",\n \"document\": \"certificate_of_incorporation\"\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_9b21ec70f5aa",
"document_type": "certificate_of_incorporation",
"file_name": "cac-certificate.pdf",
"uploaded_at": "2026-08-07T09:24: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": "Attachment 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 company.

