Note status
Follow a note from queued to delivered, and what happens when one fails.
A note moves through these statuses:
| Status | Meaning |
|---|---|
queued | Accepted and waiting to print. |
printed | Written by the plotter. |
mailed | Handed to USPS. |
delivered | Delivered, from USPS scans. |
returned | Sent back, from USPS scans. |
failed | Not sent. See failure_code. |
cancelled | A queued note you cancelled before the printer started on it. Nothing is mailed and the credits go back. See Cancelling. |
GET /api/v1/notes/{noteId} adds the note's history and, once USPS has scanned it, a delivery estimate.
Polling for changes
GET /api/v1/notes lists the account's notes, newest first. It takes these query fields:
limit, from 1 to 100. The default is 25.cursor, thenext_cursorof the page before.status, to list one status.recipient_id, to list one person's notes.updated_since, a time with its time zone, to list only notes changed after it.
To follow your notes, keep the newest updated_at you saw and pass it as updated_since on the next call. Write the time zone as Z, or encode + as %2B.
Failed notes
A failed note carries a failure_code when a reason was given.
content_rejected means the card was declined because of its content, by our review before printing or by our print partner. It can't be sent again as it is. A note our review declines is refunded. A note our print partner declines is not.
Refunds
A note sent through the API that fails before it is printed is refunded once, soon after it fails. The note's refund shows the credits given back and when. If bought credits reached the end of their term while the note waited, those credits are not given back, and refund shows only what came back.
A cancelled note is refunded when you cancel it, and its refund shows that too.
These are not refunded:
- A note our print partner declined for its content.
- A note that failed after it was printed.
Deleting a note's content
Once a note is mailed, you can delete what it held: the message, the recipient's name and address, and the drawing files. This is permanent. Nothing brings the content back.
curl -X DELETE https://composer.stylograph.ai/api/v1/notes/NOTE_ID/content \
-H "Authorization: Bearer $STYLOGRAPH_API_KEY"- It needs the
notes:sendscope. - It answers
200with the note, now withcontent_purged: true,content_purged_atset, andrecipient.first_nameandrecipient.last_namenull. The note keeps its id, status, dates and credits. - Deleting again answers
200with the same note. - It works on a note that is mailed, delivered, returned, failed or cancelled. A note still queued or printed answers
409NOTE_CONTENT_STILL_NEEDED, because the printer needs its content. Cancel it while it is queued, or delete its content once it is mailed. - An account can also have its notes' content deleted a set number of days after mailing. Ask Stylograph to set that up.
In an agent, the MCP server's delete_note_content tool does the same. It should only be used when the person asks.