Attach a company document
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": "Resource not found",
"error_code": "NOT_FOUND"
}Connected Accounts
Attach a company document
Point one of the company’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 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.
POST
/
v1
/
accounts
/
{account_id}
/
documents
Attach a company document
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": "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.
Path Parameters
The account to act on. It must be one of your own accounts.
Response
The document attached to the company.

