Delete a connected account
curl --request DELETE \
--url https://api.bachs.io/v1/accounts/{account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirm_name": "Ada Stores",
"reason": "Store no longer uses the platform."
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirm_name: 'Ada Stores', reason: 'Store no longer uses the platform.'})
};
fetch('https://api.bachs.io/v1/accounts/{account_id}', 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}"
payload = {
"confirm_name": "Ada Stores",
"reason": "Store no longer uses the platform."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(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}"
payload := strings.NewReader("{\n \"confirm_name\": \"Ada Stores\",\n \"reason\": \"Store no longer uses the platform.\"\n}")
req, _ := http.NewRequest("DELETE", 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))
}{
"organization_id": "acct_3Wq8ZfT1yHnJ5sVe",
"closed_at": "2026-11-23T18:00:00Z",
"reason": "Store no longer uses the platform.",
"confirmation_email_sent": true,
"personal_data_erasure_scheduled": false
}{
"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": "API key does not have permission for this operation",
"error_code": "FORBIDDEN"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}{
"detail": "This account cannot be closed yet.",
"error_code": "ACCOUNT_HAS_CLOSURE_BLOCKERS",
"blockers": [
{
"kind": "pending_balance",
"detail": "Pending balance is not zero: USD 10.00."
}
]
}{
"detail": "Validation failed for one or more fields",
"error_code": "VALIDATION_ERROR",
"doc_url": "https://docs.bachs.io/api-reference/error-reference#general",
"errors": [
{
"field": "name",
"message": "This field is required",
"type": "missing"
}
]
}Connected Accounts
Delete a connected account
Soft deletes a directly owned account after balances and obligations clear. Retains all records and disables access. Returns 200 with the closure, including on retries; a blocked deletion returns 409 without partial closure. Requires connected_accounts:write. See Delete a connected account.
DELETE
/
v1
/
accounts
/
{account_id}
Delete a connected account
curl --request DELETE \
--url https://api.bachs.io/v1/accounts/{account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirm_name": "Ada Stores",
"reason": "Store no longer uses the platform."
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirm_name: 'Ada Stores', reason: 'Store no longer uses the platform.'})
};
fetch('https://api.bachs.io/v1/accounts/{account_id}', 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}"
payload = {
"confirm_name": "Ada Stores",
"reason": "Store no longer uses the platform."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(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}"
payload := strings.NewReader("{\n \"confirm_name\": \"Ada Stores\",\n \"reason\": \"Store no longer uses the platform.\"\n}")
req, _ := http.NewRequest("DELETE", 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))
}{
"organization_id": "acct_3Wq8ZfT1yHnJ5sVe",
"closed_at": "2026-11-23T18:00:00Z",
"reason": "Store no longer uses the platform.",
"confirmation_email_sent": true,
"personal_data_erasure_scheduled": false
}{
"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": "API key does not have permission for this operation",
"error_code": "FORBIDDEN"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}{
"detail": "This account cannot be closed yet.",
"error_code": "ACCOUNT_HAS_CLOSURE_BLOCKERS",
"blockers": [
{
"kind": "pending_balance",
"detail": "Pending balance is not zero: USD 10.00."
}
]
}{
"detail": "Validation failed for one or more fields",
"error_code": "VALIDATION_ERROR",
"doc_url": "https://docs.bachs.io/api-reference/error-reference#general",
"errors": [
{
"field": "name",
"message": "This field is required",
"type": "missing"
}
]
}Authorizations
Bearer token authentication. Pass your API key as Authorization: Bearer sk_.... See Authentication for keys, scopes, and sandbox vs production.
Path Parameters
Body
application/json
Response
Account soft deleted, or the existing closure on retry.

