BillOSDocs
Console
Payments
POST/businesses/{bid}/payment-requests/{id}/email

Requires the documents scope.

A letter in the business's name with the link, to up to 5 addresses (default: the payer's address on the link). Open links only. Rate-limited; never in the sandbox.

Path parameters

bidstringrequired
Business id, from POST /businesses.
idstringrequired
Payment request id.

Body (optional)

toarray of string

Response

200: { "ok": true, … }

okbooleanrequired
sentarray of stringrequired
failedarray of string
urlstring

Errors: 400, 401, 403, 404, 409, 429. Every failure answers { "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }: branch on reason, and read hint for what to change (https://docs.billos.co.il/errors.md).

curl -X POST "$BASE/businesses/$BID/payment-requests/$DOC_ID/email" \
  -H "X-Api-Key: $KEY"
const res = await fetch(`${BASE}/businesses/${BID}/payment-requests/${DOC_ID}/email`, {
  method: 'POST',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.post(
    f"{BASE}/businesses/{BID}/payment-requests/{DOC_ID}/email",
    headers={"X-Api-Key": KEY},
)
data = res.json()
$ch = curl_init("$BASE/businesses/$BID/payment-requests/$DOC_ID/email");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["X-Api-Key: $KEY"],
]);
$data = json_decode(curl_exec($ch), true);
using System.Text.Json;

using var http = new HttpClient();
using var req = new HttpRequestMessage(HttpMethod.Post, $"{BASE}/businesses/{BID}/payment-requests/{DOC_ID}/email");
req.Headers.Add("X-Api-Key", KEY);
using var res = await http.SendAsync(req);
var data = JsonDocument.Parse(await res.Content.ReadAsStringAsync()).RootElement;
$BASE https://api.billos.co.il/v1$KEY a bk_test_… or bk_live_… key