How do I make my first API call?
Replace $FLAXXA_KEY with a key from your workspace. The first call returns a real id you can use for the next ones.
curl -X POST https://flaxxa.com/api/v1/sign/envelopes/send \
-H "Authorization: Bearer flx_live_YOUR_KEY" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-d '{
"title": "Service agreement — Acme Ltd",
"external_id": "PROPOSAL-42",
"documents": [{ "name": "Agreement.pdf", "url": "https://your-app.com/proposals/42.pdf" }],
"recipients": [{ "key": "customer", "name": "Asha Verma", "email": "[email protected]" }],
"return_signing_links": true
}'$res = Http::withToken(env('FLAXXA_SIGN_KEY'))->acceptJson()
->post('https://flaxxa.com/api/v1/sign/envelopes/send', [
'title' => "Proposal #{$proposal->id}",
'external_id' => "PROPOSAL-{$proposal->id}",
'documents' => [['name' => 'Proposal.pdf', 'base64' => base64_encode($pdfBytes)]],
'recipients' => [['name' => $customer->name, 'email' => $customer->email]],
'return_signing_links' => true,
])->throw()->json('data');
// $res['id'], $res['status'] === 'sent', $res['signing_links'][0]['url']const res = await fetch("https://flaxxa.com/api/v1/sign/envelopes/send", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FLAXXA_SIGN_KEY}`, Accept: "application/json", "Content-Type": "application/json" },
body: JSON.stringify({
title: "Proposal #42",
external_id: "PROPOSAL-42",
documents: [{ name: "Proposal", pages: [
"<h1>Proposal #42</h1><p>Scope, price and terms…</p>",
'<p>Accepted:</p><div data-type="signature-block" data-signer="Asha Verma"></div>',
] }],
recipients: [{ name: "Asha Verma", email: "[email protected]" }],
}),
});
const { data } = await res.json(); // data.id, data.statusimport requests, base64
r = requests.post("https://flaxxa.com/api/v1/sign/envelopes/send",
headers={"Authorization": f"Bearer {KEY}", "Accept": "application/json"},
json={
"title": "Service agreement",
"external_id": "PROPOSAL-42",
"documents": [{"name": "Agreement.pdf", "base64": base64.b64encode(pdf_bytes).decode()}],
"recipients": [{"name": "Asha Verma", "email": "[email protected]"}],
})
r.raise_for_status()
envelope = r.json()["data"]POST /api/v1/sign/envelopes/send HTTP/1.1
Host: flaxxa.com
Authorization: Bearer flx_live_·············
Content-Type: application/json
Idempotency-Key: proposal-42-send
{
"title": "Service agreement — Acme Ltd",
"external_id": "PROPOSAL-42",
"documents": [{ "name": "Agreement.pdf", "url": "https://your-app.com/proposals/42.pdf" }],
"recipients": [{ "key": "customer", "name": "Asha Verma", "email": "[email protected]" }],
"return_signing_links": true
}HTTP/1.1 201 Created
Content-Type: application/json
{
"data": {
"id": 123,
"status": "sent",
"external_id": "PROPOSAL-42",
"sent_at": "2026-10-27T10:00:00+00:00",
"expires_at": "2027-01-25T10:00:00+00:00",
"documents": [{ "id": 77, "name": "Agreement.pdf", "pages": 4, "status": "ready" }],
"recipients": [{ "id": 9, "name": "Asha Verma", "email": "[email protected]", "role": "signer", "order": 1, "status": "notified" }],
"download_path": "/api/v1/sign/envelopes/123/download",
"signing_links": [{ "recipient_id": 9, "email": "[email protected]", "url": "https://flaxxa.com/sign/r/…" }]
}
}
