Stylograph API

Quickstart

Check the account, try a note, then send it.

This walks through one note from start to finish. You need an API key with the account:read, notes:read and notes:send scopes. Keep the key in an environment variable on your server:

export STYLOGRAPH_API_KEY="sg_live_..."

1. Check the account

curl https://composer.stylograph.ai/api/v1/account \
  -H "Authorization: Bearer $STYLOGRAPH_API_KEY"

The answer tells you whether a send can go now. Look at credit_balance, handwriting.ready, return_address_ready, api_notes.remaining and vendor_capacity_available. If any of them says no, a send answers with the matching error, so fix it first.

2. Find the recipient

Search your address book by name or company. The id of a match is the recipient_id you send to.

curl "https://composer.stylograph.ai/api/v1/recipients?q=Lovelace" \
  -H "Authorization: Bearer $STYLOGRAPH_API_KEY"

To send to someone who isn't in your address book yet, send a recipient with their name and address instead. That needs the recipients:write scope. See Sending a note. To add people ahead of time, or load a list, see Recipients.

3. Try the note

A dry run runs every check a send runs and charges nothing. It needs no Idempotency-Key.

curl https://composer.stylograph.ai/api/v1/notes \
  -H "Authorization: Bearer $STYLOGRAPH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "recipient_id": "8c1f2a4e-5b6d-4c3a-9e7f-1a2b3c4d5e6f",
    "format": "folded",
    "message": "Thank you for coming by the shop last week. It was a real pleasure to meet you.",
    "closing": { "salutation": "Warmly,", "signature": true },
    "dry_run": true
  }'

The answer shows the message as it will print, the cover and card back it will carry, and the credits it will cost.

4. Send it

Send the same body without dry_run, and add an Idempotency-Key that is unique to this note. A UUID works.

curl https://composer.stylograph.ai/api/v1/notes \
  -H "Authorization: Bearer $STYLOGRAPH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 3f6d8a52-91b4-4f0e-a1c2-7d9e5b6a4c31" \
  -d '{
    "recipient_id": "8c1f2a4e-5b6d-4c3a-9e7f-1a2b3c4d5e6f",
    "format": "folded",
    "message": "Thank you for coming by the shop last week. It was a real pleasure to meet you.",
    "closing": { "salutation": "Warmly,", "signature": true }
  }'

A new note answers 201 with the note in data. Its status is queued. If the network drops before you see the answer, send the same request again with the same key. You get the same note back with 200 and Idempotent-Replayed: true, and nothing is charged twice.

5. Follow it

curl "https://composer.stylograph.ai/api/v1/notes?updated_since=2026-10-30T00:00:00Z" \
  -H "Authorization: Bearer $STYLOGRAPH_API_KEY"

Keep the newest updated_at you saw and pass it as updated_since next time. See Note status for what each status means.

Next

  • Sending a note covers new recipients, covers, QR codes, closings and postcards.
  • Send later covers picking a print day and cancelling a note.
  • Errors lists every error code.

On this page