Publish invoice

Turn a draft into a published invoice with an invoice number.

POST https://cotlet.dev/api/v1/bokio/invoices/{invoice_id}/publish

write Confirm

Publishes a draft invoice, which assigns the invoice number and the payment reference and makes it final for the customer. Publishing does not email the invoice; use send_invoice for that. A published invoice is no longer edited like a draft. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: publish_invoice
NameTypeDescription
invoice_id string required string Invoice ID from list_invoices or create_invoice.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/bokio/invoices/invoice_8c41d2/publish \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("bokio", "publish_invoice", {"invoice_id":"invoice_8c41d2"})
Node.js
const result = await cotlet.call('bokio', 'publish_invoice', {"invoice_id":"invoice_8c41d2"});
CLI
cotlet call bokio publish_invoice --data '{"invoice_id":"invoice_8c41d2"}'

Example response

JSON

{
  "invoice_id": "f2d84b1a-6c30-4e97-8a5b-1d9c7e3a40b2",
  "status": "published",
  "invoice_number": "2026-1042",
  "payment_reference": "2026104242"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.