API: create and send a quote
Create a quote from your own systems and send it with a cadence, in one request.
If your estimates start somewhere else, like a field-service app or your own spreadsheet macro, the API lets you create the quote in Carbonset and send it, and the follow-up runs from there.
Authentication
Create a key under Settings, then API. It is shown once, so copy it somewhere safe. Send it as a bearer token on every request. The examples below read it from an environment variable called CARBONSET_KEY, which is where it should live: never in a file you share or a spreadsheet cell.
Create and send
One request creates the customer if needed, builds the quote from your price book items, attaches a cadence and sends it.
curl https://api.carbonset.example/v1/quotes \
-H "Authorization: Bearer $CARBONSET_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer": { "name": "Marisol T.", "phone": "+17185550163", "email": "marisol.t@mail.example" },
"job_site": "Astoria, NY",
"lines": [ { "item": "pb_service_200", "qty": 1 }, { "item": "pb_panel_200", "qty": 1 } ],
"deposit": { "percent": 30 },
"cadence": "residential-replacement",
"send": ["email", "text"]
}'Leave out "send" to create a draft instead. It lands on the board in Draft for someone in the office to check.
Response
A 201 with the new quote's id, its number and the customer link. Store the id if you want to look it up later or match it against webhooks.
{
"id": "q_001047",
"number": "001047",
"link": "https://q.carbonset.example/1047",
"status": "sent"
}Testing without bothering a customer
Point your first requests at your own phone number and email, the same way the quickstart sends the first quote to yourself. Open the link, watch the open land on the board, then delete the test quote from its page. Deleted test quotes never reach your accounting software.
Errors
| Status | Code | What to do |
|---|---|---|
| 400 | missing_lines | Add at least one line. |
| 409 | texting_not_registered | Send by email only until your texting number is approved. |
| 422 | unknown_cadence | Use a cadence id from Cadences, or leave it out. |
| 429 | rate_limited | Slow down: 60 requests a minute per key. |
A key can send quotes in your company's name. If one leaks, delete it under Settings, then API, and make a new one. Old keys stop working at once.