Atomside docsThis page as Markdown

Get a letter: get_letter

Returns a letter: its status with a sentence to repeat, the timeline, the approval and its link while it waits, the decline note if a person declined it, what was held, charged or returned, and the posting evidence once it is on record. A group reference (grp_…) returns the counts by status and one line for each letter. Free.

MCP toolget_letter
RESTGET /v1/letters/{letter}
CLIatomside get-letter
Key needsRead (letters:read)
Changes anythingNo. It only reads.
Idempotency keyNot used.

Example

A real call and its real answer, made against the API in test mode. A test runs it again and fails if the answer changes. Ids, keys and links are replaced with stand-ins.

A call that works

REST:

curl https://api.atomside.com/v1/letters/ltr_example000000002 \
  -H "Authorization: Bearer $ATOMSIDE_API_KEY"

MCP:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_letter",
    "arguments": {
      "letter": "ltr_example000000002"
    }
  }
}

CLI:

atomside get-letter \
  --letter ltr_example000000002

The answer (HTTP 200; over MCP, the same JSON is the result's structuredContent):

{
  "letter": "ltr_example000000002",
  "status": "queued",
  "group": null,
  "n": null,
  "test": true,
  "says": "It is queued to print and is posted on Mon 16 Nov. It can be cancelled until it goes to print.",
  "to": {
    "name": "Ms A. Sample",
    "prints_as": [
      "Ms A. Sample",
      "12 Specimen Road",
      "Exampleton",
      "XX1 1XX"
    ]
  },
  "pages": 1,
  "sheets": 1,
  "class": "second",
  "colour": false,
  "sides": "both",
  "price": {
    "credits": 15,
    "gbp": "1.50"
  },
  "sha256": "43341b592305c74063413681ae2bbd2106cd255d3829a72aada68d74272ca368",
  "reference": null,
  "on_behalf_of": null,
  "customer": null,
  "labels": [],
  "agent": "lettings-helper",
  "created_at": "2026-11-16T09:30:00.000Z",
  "updated_at": "2026-11-16T09:30:00.000Z",
  "posts_on": "2026-11-16",
  "post_on": null,
  "scheduled": false,
  "cancel_until": "2026-11-16T16:00:00.000Z",
  "moved": null,
  "waiting_reason": null,
  "fixed_by": null,
  "duplicate_of": null,
  "approval": null,
  "money": {
    "held": {
      "credits": 15,
      "gbp": "1.50"
    },
    "charged": {
      "credits": 0,
      "gbp": "0.00"
    },
    "returned": {
      "credits": 0,
      "gbp": "0.00"
    },
    "say": "15 credits (£1.50) are held."
  },
  "timeline": [
    {
      "seq": 1,
      "status": "quoted",
      "event": "created",
      "at": "2026-11-16T09:30:00.000Z",
      "by": "your_agent",
      "note": null
    },
    {
      "seq": 2,
      "status": "queued",
      "event": "queued",
      "at": "2026-11-16T09:30:00.000Z",
      "by": "your_agent",
      "note": null
    }
  ],
  "evidence": null,
  "record": null,
  "next": "Call advance_test_letter to move it on."
}

A group: counts and one line for each letter

REST:

curl https://api.atomside.com/v1/letters/grp_example000000002 \
  -H "Authorization: Bearer $ATOMSIDE_API_KEY"

MCP:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_letter",
    "arguments": {
      "letter": "grp_example000000002"
    }
  }
}

CLI:

atomside get-letter \
  --letter grp_example000000002

The answer (HTTP 200; over MCP, the same JSON is the result's structuredContent):

{
  "group": "grp_example000000002",
  "test": true,
  "purpose": "Rent review notice to current tenants",
  "reference": "Rent review 2027",
  "agent": "lettings-helper",
  "created_at": "2026-11-16T09:30:00.000Z",
  "total": 3,
  "counts": {
    "queued": 3
  },
  "settled": false,
  "settled_at": null,
  "posts_on": "2026-11-16",
  "can_cancel_until": null,
  "fields": [
    "salutation",
    "new_rent"
  ],
  "approval": null,
  "letters": [
    {
      "n": 1,
      "letter": "ltr_example000000011",
      "to": "Ms A. Sample, XX1 1XX",
      "status": "queued",
      "can_cancel_until": null,
      "note": null,
      "money": {
        "held": {
          "credits": 15,
          "gbp": "1.50"
        },
        "charged": {
          "credits": 0,
          "gbp": "0.00"
        },
        "returned": {
          "credits": 0,
          "gbp": "0.00"
        }
      }
    },
    {
      "n": 2,
      "letter": "ltr_example000000012",
      "to": "Mr B. Specimen, XX1 1XX",
      "status": "queued",
      "can_cancel_until": null,
      "note": null,
      "money": {
        "held": {
          "credits": 15,
          "gbp": "1.50"
        },
        "charged": {
          "credits": 0,
          "gbp": "0.00"
        },
        "returned": {
          "credits": 0,
          "gbp": "0.00"
        }
      }
    },
    {
      "n": 3,
      "letter": "ltr_example000000013",
      "to": "Ms C. Example, XX2 2XX",
      "status": "queued",
      "can_cancel_until": null,
      "note": null,
      "money": {
        "held": {
          "credits": 15,
          "gbp": "1.50"
        },
        "charged": {
          "credits": 0,
          "gbp": "0.00"
        },
        "returned": {
          "credits": 0,
          "gbp": "0.00"
        }
      }
    }
  ],
  "money": {
    "held": {
      "credits": 45,
      "gbp": "4.50"
    },
    "charged": {
      "credits": 0,
      "gbp": "0.00"
    },
    "returned": {
      "credits": 0,
      "gbp": "0.00"
    },
    "say": "45 credits (£4.50) held."
  },
  "says": "3 letters: 3 queued.",
  "next": "Call advance_test_letter on a letter to move it on."
}

Input

Over REST, fields in the path go in the path, GET fields in the query string, and POST fields in the JSON body. Over MCP, every field is an argument of the tool.

{
  "type": "object",
  "properties": {
    "letter": {
      "type": "string",
      "description": "The letter id, ltr_…, or a group, grp_…."
    }
  },
  "required": [
    "letter"
  ],
  "additionalProperties": false
}

Output

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "letter": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "quoted",
            "waiting_for_approval",
            "queued",
            "printing",
            "printed",
            "posted",
            "on_record",
            "declined",
            "lapsed",
            "cancelled",
            "held",
            "failed",
            "returned"
          ]
        },
        "group": {
          "description": "The group it was sent in, grp_…, when it went to several people in one send.",
          "type": [
            "string",
            "null"
          ]
        },
        "n": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ],
          "description": "Its place in the group's list, from 1. Null outside a group."
        },
        "test": {
          "type": "boolean",
          "description": "True for a test letter: nothing is printed or posted."
        },
        "says": {
          "type": "string",
          "description": "A sentence to repeat to your person as it stands."
        },
        "to": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "prints_as": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "name",
            "prints_as"
          ],
          "additionalProperties": false
        },
        "pages": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "sheets": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "class": {
          "type": "string",
          "enum": [
            "second",
            "first"
          ]
        },
        "colour": {
          "type": "boolean"
        },
        "sides": {
          "type": "string",
          "enum": [
            "both",
            "one"
          ]
        },
        "price": {
          "type": "object",
          "properties": {
            "credits": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991,
              "description": "Whole credits. 1 credit is 10p."
            },
            "gbp": {
              "type": "string",
              "pattern": "^-?\\d+\\.\\d{2}$",
              "description": "The same amount in pounds, ex VAT, as a decimal string."
            }
          },
          "required": [
            "credits",
            "gbp"
          ],
          "additionalProperties": false,
          "description": "An amount in credits, with pounds beside it."
        },
        "sha256": {
          "type": [
            "string",
            "null"
          ]
        },
        "reference": {
          "type": [
            "string",
            "null"
          ]
        },
        "on_behalf_of": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "ref": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "ref",
                "name"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "customer": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "ref": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "ref",
                "name"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "The customer it is for, by ref and name now, or null for your own letter."
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "agent": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "posts_on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "null"
            }
          ],
          "description": "The posting day booked. Differs from post_on only when the letter was moved (see moved)."
        },
        "post_on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "null"
            }
          ],
          "description": "The posting day asked for, or null for the next cut-off."
        },
        "scheduled": {
          "type": "boolean",
          "description": "True while a letter asked for a day waits to go on it. status stays queued (or waiting_for_approval)."
        },
        "cancel_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ],
          "description": "It can be cancelled until this cut-off on its posting day. Null once it went to print or finished."
        },
        "moved": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "from": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "to": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "why": {
                  "type": "string",
                  "enum": [
                    "print_room_full",
                    "day_away",
                    "printing_stopped",
                    "day_full_at_approval",
                    "changed_by_person",
                    "checked_after_its_day"
                  ]
                },
                "at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                }
              },
              "required": [
                "from",
                "to",
                "why",
                "at"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "The latest move of its posting day, by us or by a person; null when it never moved."
        },
        "waiting_reason": {
          "description": "What it waits for now, as a code: why it waits for a person, or for a held letter what holds it (waiting_for_credit, customer_sender, customer_suspended). Null when nothing holds it.",
          "type": [
            "string",
            "null"
          ]
        },
        "fixed_by": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "agent",
                "person",
                "wait",
                "nobody"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "While it waits or is held, who can move it on, as fixed_by in a refusal: agent (you), person (someone on your side), wait (it goes on by itself, Atomside is at work on it). Null otherwise."
        },
        "duplicate_of": {
          "type": [
            "string",
            "null"
          ]
        },
        "approval": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The approval, apr_…."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "waiting",
                    "approved",
                    "declined",
                    "lapsed",
                    "withdrawn"
                  ]
                },
                "reason": {
                  "type": "string",
                  "description": "Why it waits, as a code."
                },
                "why": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "url": {
                  "type": "string",
                  "description": "The approval page. Approvers only; it opens nothing by itself."
                },
                "expires": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "covers": {
                  "type": "string",
                  "description": "The print file the approval covers."
                },
                "decided_by": {
                  "description": "The approver, by name, once decided.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "via": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "email",
                        "console",
                        "chat_link",
                        "test_trigger",
                        "link"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decided_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "note": {
                  "description": "The decline note, word for word.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "by_link": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "approval": {
                          "type": "string",
                          "description": "The approval, apr_…, to pass to create_approval_link."
                        },
                        "make_with": {
                          "type": "string",
                          "const": "create_approval_link"
                        }
                      },
                      "required": [
                        "approval",
                        "make_with"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "While it waits and a person at the letter's customer approves it, by a link you make: the approval to make it for. Null otherwise."
                }
              },
              "required": [
                "id",
                "status",
                "reason",
                "why",
                "url",
                "expires",
                "covers",
                "decided_by",
                "via",
                "decided_at",
                "note",
                "by_link"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "money": {
          "type": "object",
          "properties": {
            "held": {
              "type": "object",
              "properties": {
                "credits": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Whole credits. 1 credit is 10p."
                },
                "gbp": {
                  "type": "string",
                  "pattern": "^-?\\d+\\.\\d{2}$",
                  "description": "The same amount in pounds, ex VAT, as a decimal string."
                }
              },
              "required": [
                "credits",
                "gbp"
              ],
              "additionalProperties": false,
              "description": "An amount in credits, with pounds beside it."
            },
            "charged": {
              "type": "object",
              "properties": {
                "credits": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Whole credits. 1 credit is 10p."
                },
                "gbp": {
                  "type": "string",
                  "pattern": "^-?\\d+\\.\\d{2}$",
                  "description": "The same amount in pounds, ex VAT, as a decimal string."
                }
              },
              "required": [
                "credits",
                "gbp"
              ],
              "additionalProperties": false,
              "description": "An amount in credits, with pounds beside it."
            },
            "returned": {
              "type": "object",
              "properties": {
                "credits": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Whole credits. 1 credit is 10p."
                },
                "gbp": {
                  "type": "string",
                  "pattern": "^-?\\d+\\.\\d{2}$",
                  "description": "The same amount in pounds, ex VAT, as a decimal string."
                }
              },
              "required": [
                "credits",
                "gbp"
              ],
              "additionalProperties": false,
              "description": "An amount in credits, with pounds beside it."
            },
            "say": {
              "type": "string",
              "description": "A sentence to repeat to your person as it stands."
            }
          },
          "required": [
            "held",
            "charged",
            "returned",
            "say"
          ],
          "additionalProperties": false
        },
        "timeline": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "seq": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "status": {
                "type": "string",
                "enum": [
                  "quoted",
                  "waiting_for_approval",
                  "queued",
                  "printing",
                  "printed",
                  "posted",
                  "on_record",
                  "declined",
                  "lapsed",
                  "cancelled",
                  "held",
                  "failed",
                  "returned"
                ]
              },
              "event": {
                "type": "string"
              },
              "at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "by": {
                "type": "string",
                "enum": [
                  "your_agent",
                  "a_person",
                  "atomside",
                  "a_sample_person"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "seq",
              "status",
              "event",
              "at",
              "by",
              "note"
            ],
            "additionalProperties": false
          }
        },
        "evidence": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "posted_at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "posted_by": {
                  "type": "string"
                },
                "place": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "photo": {
                  "type": "boolean"
                },
                "simulated": {
                  "type": "boolean"
                }
              },
              "required": [
                "posted_at",
                "posted_by",
                "place",
                "photo",
                "simulated"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "The posting evidence, once posted. Proof of posting, not of delivery."
        },
        "record": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "url": {
                  "description": "The public record page. Anyone holding the link can read and check it.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sha256": {
                  "type": "string",
                  "description": "SHA-256 of the record document: what is signed and chained."
                },
                "signed": {
                  "type": "boolean",
                  "description": "False for a few seconds after it goes on record."
                }
              },
              "required": [
                "id",
                "url",
                "sha256",
                "signed"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "The signed record, once on record. A test record is signed with the test key."
        },
        "next": {
          "type": "string"
        }
      },
      "required": [
        "letter",
        "status",
        "group",
        "n",
        "test",
        "says",
        "to",
        "pages",
        "sheets",
        "class",
        "colour",
        "sides",
        "price",
        "sha256",
        "reference",
        "on_behalf_of",
        "customer",
        "labels",
        "agent",
        "created_at",
        "updated_at",
        "posts_on",
        "post_on",
        "scheduled",
        "cancel_until",
        "moved",
        "waiting_reason",
        "fixed_by",
        "duplicate_of",
        "approval",
        "money",
        "timeline",
        "evidence",
        "record",
        "next"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "group": {
          "type": "string",
          "description": "The group, grp_…. It has no status of its own: read the counts."
        },
        "test": {
          "type": "boolean",
          "description": "True for a test group: nothing is printed or posted."
        },
        "purpose": {
          "type": "string",
          "description": "What the send is for, as you gave it. Never printed."
        },
        "reference": {
          "type": [
            "string",
            "null"
          ]
        },
        "agent": {
          "type": "string",
          "description": "Who sent it: the agent, or the person in the console."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "total": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "How many letters the group has."
        },
        "counts": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "enum": [
              "quoted",
              "waiting_for_approval",
              "queued",
              "printing",
              "printed",
              "posted",
              "on_record",
              "declined",
              "lapsed",
              "cancelled",
              "held",
              "failed",
              "returned"
            ]
          },
          "additionalProperties": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "description": "Letters by status. Report these first, then the exceptions by name."
        },
        "settled": {
          "type": "boolean",
          "description": "True once every letter is on record, declined, cancelled, failed or lapsed."
        },
        "settled_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "posts_on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "null"
            }
          ],
          "description": "The day its queued letters are posted: they go together."
        },
        "can_cancel_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ],
          "description": "The print cut-off, while any letter can go."
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The field names its letters fill. Never the values."
        },
        "approval": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "waiting": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Letters still waiting for a person."
                },
                "link": {
                  "type": "string",
                  "description": "The approval page for the whole group. Approvers only."
                },
                "expires": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                }
              },
              "required": [
                "waiting",
                "link",
                "expires"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "While any letter waits for a person."
        },
        "letters": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "n": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Its place in your list, from 1."
              },
              "letter": {
                "type": "string",
                "description": "The letter, ltr_…: read it alone with get_letter."
              },
              "to": {
                "type": "string",
                "description": "Name and postcode."
              },
              "status": {
                "type": "string",
                "enum": [
                  "quoted",
                  "waiting_for_approval",
                  "queued",
                  "printing",
                  "printed",
                  "posted",
                  "on_record",
                  "declined",
                  "lapsed",
                  "cancelled",
                  "held",
                  "failed",
                  "returned"
                ]
              },
              "can_cancel_until": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The print cut-off, while it can be cancelled."
              },
              "note": {
                "description": "Why a person declined it, word for word.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "money": {
                "type": "object",
                "properties": {
                  "held": {
                    "type": "object",
                    "properties": {
                      "credits": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Whole credits. 1 credit is 10p."
                      },
                      "gbp": {
                        "type": "string",
                        "pattern": "^-?\\d+\\.\\d{2}$",
                        "description": "The same amount in pounds, ex VAT, as a decimal string."
                      }
                    },
                    "required": [
                      "credits",
                      "gbp"
                    ],
                    "additionalProperties": false,
                    "description": "An amount in credits, with pounds beside it."
                  },
                  "charged": {
                    "type": "object",
                    "properties": {
                      "credits": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Whole credits. 1 credit is 10p."
                      },
                      "gbp": {
                        "type": "string",
                        "pattern": "^-?\\d+\\.\\d{2}$",
                        "description": "The same amount in pounds, ex VAT, as a decimal string."
                      }
                    },
                    "required": [
                      "credits",
                      "gbp"
                    ],
                    "additionalProperties": false,
                    "description": "An amount in credits, with pounds beside it."
                  },
                  "returned": {
                    "type": "object",
                    "properties": {
                      "credits": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Whole credits. 1 credit is 10p."
                      },
                      "gbp": {
                        "type": "string",
                        "pattern": "^-?\\d+\\.\\d{2}$",
                        "description": "The same amount in pounds, ex VAT, as a decimal string."
                      }
                    },
                    "required": [
                      "credits",
                      "gbp"
                    ],
                    "additionalProperties": false,
                    "description": "An amount in credits, with pounds beside it."
                  }
                },
                "required": [
                  "held",
                  "charged",
                  "returned"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "n",
              "letter",
              "to",
              "status",
              "can_cancel_until",
              "note",
              "money"
            ],
            "additionalProperties": false
          },
          "description": "Every letter of the group, in your order."
        },
        "money": {
          "type": "object",
          "properties": {
            "held": {
              "type": "object",
              "properties": {
                "credits": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Whole credits. 1 credit is 10p."
                },
                "gbp": {
                  "type": "string",
                  "pattern": "^-?\\d+\\.\\d{2}$",
                  "description": "The same amount in pounds, ex VAT, as a decimal string."
                }
              },
              "required": [
                "credits",
                "gbp"
              ],
              "additionalProperties": false,
              "description": "An amount in credits, with pounds beside it."
            },
            "charged": {
              "type": "object",
              "properties": {
                "credits": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Whole credits. 1 credit is 10p."
                },
                "gbp": {
                  "type": "string",
                  "pattern": "^-?\\d+\\.\\d{2}$",
                  "description": "The same amount in pounds, ex VAT, as a decimal string."
                }
              },
              "required": [
                "credits",
                "gbp"
              ],
              "additionalProperties": false,
              "description": "An amount in credits, with pounds beside it."
            },
            "returned": {
              "type": "object",
              "properties": {
                "credits": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Whole credits. 1 credit is 10p."
                },
                "gbp": {
                  "type": "string",
                  "pattern": "^-?\\d+\\.\\d{2}$",
                  "description": "The same amount in pounds, ex VAT, as a decimal string."
                }
              },
              "required": [
                "credits",
                "gbp"
              ],
              "additionalProperties": false,
              "description": "An amount in credits, with pounds beside it."
            },
            "say": {
              "type": "string",
              "description": "A sentence to repeat to your person as it stands."
            }
          },
          "required": [
            "held",
            "charged",
            "returned",
            "say"
          ],
          "additionalProperties": false
        },
        "says": {
          "type": "string",
          "description": "A sentence to repeat to your person as it stands."
        },
        "next": {
          "type": "string"
        }
      },
      "required": [
        "group",
        "test",
        "purpose",
        "reference",
        "agent",
        "created_at",
        "total",
        "counts",
        "settled",
        "settled_at",
        "posts_on",
        "can_cancel_until",
        "fields",
        "approval",
        "letters",
        "money",
        "says",
        "next"
      ],
      "additionalProperties": false
    }
  ]
}

Refusals

Every refusal has the same shape. Branch on code, answer and retry; repeat say to your person.

CodeAnswerRetryHTTPWhat to do next
key_missingnoafter_fix401Send the key as "Authorization: Bearer as_test_…". Ask your person if you have none.
key_not_validnonever401Ask your person for a new key. There is no link: we cannot say whose it was.
scope_missingnoafter_person403Ask your person to give the key that permission.
invalid_requestnoafter_fix400Fix the field named in details.field. The same idempotency key is fine.
rate_limitednoat_time429Wait. The same idempotency key never sends twice.
try_again_shortlynoat_time503Try again after retry_after with the same idempotency key.
account_expirednonever401Start again with start_account if your person still wants this.
connection_endednoafter_person401Tell your person. To carry on, they connect Atomside again in your assistant.
letter_not_foundnoafter_fix404Check the id with list_letters.
not_foundnoafter_fix404Check the name against the tool list or /v1/openapi.json.