Archive a product
curl --request POST \
--url https://api.bachs.io/v1/products/{product_id}/archive \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bachs.io/v1/products/{product_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/products/{product_id}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/products/{product_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "prod_1a2b3c4d5e6f7g8h",
"organization_id": "acct_7KpQ2mNv4XbR9dLc",
"name": "Pro Plan",
"description": "Full access, billed monthly.",
"price": {
"currency": "USD",
"price_type": "fixed",
"amount": "29.00",
"preset_amount": null,
"minimum_amount": null,
"maximum_amount": null,
"currency_options": []
},
"prices": [
{
"currency": "USD",
"amount": "29.00",
"minimum_amount": null,
"maximum_amount": null,
"is_default": true
}
],
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"status": "archived",
"metadata": {
"tier": "pro"
},
"media": [],
"actor_id": "usr_abc123",
"total_payments": 0,
"total_amount": "0.00",
"created_at": "2026-07-13T14:00:00.000Z",
"updated_at": "2026-07-13T14:00:00.000Z",
"archived_at": "2026-07-13T14:30:00.000Z"
}{
"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"
}Products
Archive a product
Archives a product so it can no longer be used in new checkouts or subscriptions. Existing subscriptions keep billing. This is idempotent: archiving an already-archived product succeeds. Reverse it with Unarchive Product. Requires the products:write scope.
POST
/
v1
/
products
/
{product_id}
/
archive
Archive a product
curl --request POST \
--url https://api.bachs.io/v1/products/{product_id}/archive \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bachs.io/v1/products/{product_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/products/{product_id}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/products/{product_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "prod_1a2b3c4d5e6f7g8h",
"organization_id": "acct_7KpQ2mNv4XbR9dLc",
"name": "Pro Plan",
"description": "Full access, billed monthly.",
"price": {
"currency": "USD",
"price_type": "fixed",
"amount": "29.00",
"preset_amount": null,
"minimum_amount": null,
"maximum_amount": null,
"currency_options": []
},
"prices": [
{
"currency": "USD",
"amount": "29.00",
"minimum_amount": null,
"maximum_amount": null,
"is_default": true
}
],
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"status": "archived",
"metadata": {
"tier": "pro"
},
"media": [],
"actor_id": "usr_abc123",
"total_payments": 0,
"total_amount": "0.00",
"created_at": "2026-07-13T14:00:00.000Z",
"updated_at": "2026-07-13T14:00:00.000Z",
"archived_at": "2026-07-13T14:30:00.000Z"
}{
"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"
}Authorizations
Bearer token authentication. Pass your API key as Authorization: Bearer sk_.... See Authentication for keys, scopes, and sandbox vs production.
Response
Product archived

