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 keys

Integrate 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.

POST/api/draftup/uploads
# 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"
  1. Upload the manuscript. Send filename and file size in bytes (size) to POST /uploads. Save the returned uploadId and PUT the file to uploadUrl with 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.
  2. Show the quote. Send uploadId with task (full_write, optimize, or detect_reduce) and rewriteLevel (standard or ultra) to POST /quotes. For full_write, check fullWritingEnabled first, include targetWords (250–3,000) and optionally add instructions in brief. For detect_reduce, the first quote covers only the scan. Set currency to usd (default) or gbp. Use GET /config for rates under pricing. Show the word count, round.quote.currency and round.quote.totalCents. Amounts are integers in cents or pence.
  3. Open checkout. Once the customer approves, send roundId and confirmed: true to POST /orders/{id}/checkout. Open the Stripe URL in the response so the customer can pay with an eligible card or wallet.
  4. Deliver the files. Poll GET /orders/{id}. When pdfAvailable or docxAvailable is true, request /orders/{id}/download/pdf or /orders/{id}/download/docx with ?roundId={roundId}. When docxAvailable is true, /download/manuscript-pdf also exports the manuscript as PDF, without another credit charge. When zipAvailable is true, /download/zip on that order includes the project files. If the order’s sourcePdfAvailable is true, retrieve the uploaded file from /orders/{id}/download/original-pdf with the same credentials. This download is available from the quote onward, without a round ID.
  5. Confirm each new round. A new quoted round uses the original currency. Show its price and obtain fresh approval before opening checkout again.