Developer API
Connect manuscript uploads, quotes, payments and delivery to your app.
API keys
Each key can access only the manuscripts uploaded with it. Store keys on your server.
Sign in to manage keysIntegrate with Draftup
These shell examples use curl and jq. Run the tabs in order from your server with DRAFTUP_KEY set. Send the key only to https://draftup.net/api/draftup.
# In the same shell, set DRAFTUP_KEY and place manuscript.pdf here.
API=https://draftup.net/api/draftup
FILE=manuscript.pdf
MIME=application/pdf
# For Word, set FILE=manuscript.docx and MIME=application/vnd.openxmlformats-officedocument.wordprocessingml.document
UPLOAD=$(curl -fsS "$API/uploads" \
-H "X-Draftup-Key: $DRAFTUP_KEY" -H 'Content-Type: application/json' \
-d "$(jq -n --arg name "$FILE" --argjson size "$(wc -c < "$FILE")" \
'{filename: $name, size: $size}')")
UPLOAD_ID=$(printf '%s' "$UPLOAD" | jq -er '.uploadId')
UPLOAD_URL=$(printf '%s' "$UPLOAD" | jq -er '.uploadUrl')
# The signed storage URL takes the file and its MIME type.
curl -fsS -X PUT "$UPLOAD_URL" \
-H "Content-Type: $MIME" \
--data-binary "@$FILE"- Upload the manuscript. Send
filenameand file size in bytes (size) toPOST /uploads. Save the returneduploadIdand PUT the file touploadUrlwith its DOCX or PDF media type. PDF imports need selectable text and accept up to 100 pages. For revisions, accepted PDFs retain figures and tables in reading order. If the layout cannot be preserved, the quote request returns an error. Both formats have a 10 MB limit. For an existing draft, include at least 50 English words. For writing from scratch, upload written instructions as DOCX or PDF. PDF briefs may contain recognised table values. Describe figures in words because a brief with visual material is rejected before quoting. - Show the quote. Send
uploadIdwithtask(full_write,optimize, ordetect_reduce) andrewriteLevel(standardorultra) toPOST /quotes. Forfull_write, checkfullWritingEnabledfirst, includetargetWords(250–3,000) and optionally add instructions inbrief. Fordetect_reduce, the first quote covers only the scan. Setcurrencytousd(default) orgbp. UseGET /configfor rates underpricing. Show the word count,round.quote.currencyandround.quote.totalCents. Amounts are integers in cents or pence. - Open checkout. Once the customer approves, send
roundIdandconfirmed: truetoPOST /orders/{id}/checkout. Open the Stripe URL in the response so the customer can pay with an eligible card or wallet. - Deliver the files. Poll
GET /orders/{id}. WhenpdfAvailableordocxAvailableis true, request/orders/{id}/download/pdfor/orders/{id}/download/docxwith?roundId={roundId}. WhendocxAvailableis true,/download/manuscript-pdfalso exports the manuscript as PDF, without another credit charge. WhenzipAvailableis true,/download/zipon that order includes the project files. If the order’ssourcePdfAvailableis true, retrieve the uploaded file from/orders/{id}/download/original-pdfwith the same credentials. This download is available from the quote onward, without a round ID. - Confirm each new round. A new
quotedround uses the original currency. Show its price and obtain fresh approval before opening checkout again.