{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Atomside API","version":"2026-11-24","description":"Post real UK letters: quote, approve, execute, prove. The same operations are MCP tools at /mcp. Send your key as a bearer token."},"servers":[{"url":"https://api.atomside.com"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key: as_test_… in test mode, as_live_… in live mode."}},"schemas":{"Refusal":{"type":"object","properties":{"answer":{"type":"string","enum":["no","not_yet","yes_later"]},"code":{"type":"string","enum":["file_not_usable","too_many_sheets","address_not_found","quote_expired","quote_already_used","idempotency_key_reused","quote_not_found","file_not_found","test_postcode_in_live","on_behalf_of_required","origin_required","mode_mismatch","letter_not_found","approval_declined","print_failed","invalid_request","not_found","too_many_recipients","field_not_filled","post_on_not_available","needs_approval","possible_duplicate","paused_same_text","paused_failed_letters","waiting_for_credit","over_daily_limit","over_monthly_limit","over_per_letter_limit","over_recipient_limit","outside_agent_rules","customer_over_limit","customer_paused","customer_ref_not_allowed","customer_sender_unverified","customer_suspended","customer_closed","customer_not_found","customer_exists","customer_ref_not_valid","customer_relationship_not_allowed","customer_limit_reached","customer_sender_code_wrong","customer_sender_code_expired","customer_sender_not_waiting","customer_sender_code_limit","sender_required","test_customer_fixed","test_customer_in_live","approval_links_off","approval_not_waiting","approval_link_gone","approval_not_for_customer","month_not_valid","unclaimed_limit_reached","approval_expired","agent_paused","account_suspended","sending_stopped","not_ready_for_live","key_cannot_send","scope_missing","address_on_do_not_write","key_not_valid","key_missing","connection_ended","returned_to_sender","prints_later","held_for_check","print_queue_full","rate_limited","request_in_progress","unclaimed_hourly_limit","new_account_daily_limit","try_again_shortly","address_not_uk","service_not_offered","declined_by_atomside","too_late_to_cancel","already_cancelled","account_expired","account_already_claimed","test_mode_only"]},"fixed_by":{"type":"string","enum":["agent","person","wait","nobody"]},"say":{"type":"string","description":"One sentence for the person. Repeat it; never parse it."},"money":{"type":"object","properties":{"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."},"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."},"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"}},"required":["charged","held","returned","say"],"additionalProperties":false},"retry":{"type":"string","enum":["never","after_fix","after_person","at_time","not_needed"]},"retry_after":{"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"}]},"agent_can":{"type":"array","items":{"type":"object","properties":{"do":{"type":"string"},"tool":{"type":"string"},"with":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"changes_wording":{"type":"boolean"},"changes_day":{"type":"boolean"}},"required":["do","tool","with","changes_wording","changes_day"],"additionalProperties":false}},"person":{"anyOf":[{"type":"object","properties":{"ask":{"type":"string"},"who":{"type":"string"},"link":{"type":["string","null"]},"if_nothing":{"type":"string"}},"required":["ask","who","link","if_nothing"],"additionalProperties":false},{"type":"null"}]},"quote":{"type":["string","null"]},"letter":{"type":["string","null"]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"docs":{"type":"string","format":"uri"},"request_id":{"type":"string"}},"required":["answer","code","fixed_by","say","money","retry","retry_after","agent_can","person","quote","letter","details","docs","request_id"],"additionalProperties":false,"description":"A refusal: what happened, whether money moved, and what to do next."}}},"paths":{"/v1/account":{"get":{"operationId":"get_account","summary":"Get account","description":"Call this first, before any work. Says whether this is test or live mode, who your letters are sent as, what this key may do, what is left of each limit, whether the next letter goes ahead or waits for a person, and when the post goes. Start with summary. credits.auto_top_up says whether a pack may be bought automatically: plan on the balance; no tool buys credits. Free, read only, and never counts against a limit.","x-atomside-scope":"letters:read","x-atomside-permission":"Read","x-atomside-effect":"read","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","not_found"],"parameters":[{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"as_of":{"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))$"},"summary":{"type":"string","description":"In the first person, so your agent can repeat it to you. Read this first."},"verdict":{"type":"object","properties":{"can_send_now":{"type":"boolean"},"next_letter":{"type":"string","enum":["goes_ahead","waits_for_approval","refused"],"description":"What happens to a one-sheet letter to a known address."},"reasons":{"type":"array","items":{"type":"string"},"description":"Refusal codes behind the verdict."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["can_send_now","next_letter","reasons","says"],"additionalProperties":false},"mode":{"type":"object","properties":{"name":{"type":"string","enum":["test","live"]},"real":{"type":"boolean","description":"True only in live mode. The one field never to get wrong."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["name","real","says"],"additionalProperties":false},"agent":{"type":"object","properties":{"name":{"type":"string"},"key":{"description":"Masked. Null for a connected agent.","type":["string","null"]},"connected_through":{"description":"For an agent an assistant connected with no key: the app, as the person saw it named on the consent screen. Null for a key.","type":["string","null"]},"workspace":{"type":"string"},"may":{"type":"array","items":{"type":"string","enum":["read","quote","send","cancel"]}}},"required":["name","key","connected_through","workspace","may"],"additionalProperties":false},"sender":{"type":"object","properties":{"name":{"type":["string","null"]},"verified":{"type":"boolean"},"can_change":{"type":"boolean","const":false},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["name","verified","can_change","says"],"additionalProperties":false},"credits":{"type":"object","properties":{"balance":{"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."},"first_sheet":{"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."},"extra_sheet":{"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."},"typical_letter":{"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."},"auto_top_up":{"type":"object","properties":{"state":{"type":"string","enum":["off","on","buying","one_in_24_hours","ceiling_reached","card_declined","needs_bank_approval","held"],"description":"off, on, buying, one_in_24_hours, ceiling_reached, card_declined, needs_bank_approval or held."},"real":{"type":"boolean","description":"False in test mode: a rehearsal with free test credits."},"when_below":{"anyOf":[{"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."},{"type":"null"}],"description":"A pack may be bought when fewer than this can be spent."},"adds":{"anyOf":[{"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."},{"type":"null"}],"description":"The credits one automatic purchase adds."},"left_this_month":{"anyOf":[{"type":"object","properties":{"purchases":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gbp":{"type":"string"}},"required":["purchases","credits","gbp"],"additionalProperties":false},{"type":"null"}],"description":"Automatic purchases left this calendar month (UK time), and the credits they add."},"resets_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"}],"description":"When the month starts again."},"next_possible_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"}],"description":"The earliest the next purchase can happen, when something stops it now."},"can_change":{"type":"boolean","const":false,"description":"Always false: no agent can change it."},"can_trigger":{"type":"boolean","const":false,"description":"Always false: no agent can make it buy."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["state","real","when_below","adds","left_this_month","resets_at","next_possible_at","can_change","can_trigger","says"],"additionalProperties":false,"description":"Whether a pack may be bought automatically when credit runs low. \"May\", never \"will\": plan on the balance."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["balance","first_sheet","extra_sheet","typical_letter","auto_top_up","says"],"additionalProperties":false},"limits":{"type":"object","properties":{"per_day":{"type":"object","properties":{"limit":{"anyOf":[{"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."},{"type":"null"}],"description":"Null when there is no limit."},"used":{"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."},"left":{"anyOf":[{"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."},{"type":"null"}],"description":"Worked out for you. Null when there is no limit."},"resets_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":["limit","used","left","resets_at"],"additionalProperties":false},"per_month":{"type":"object","properties":{"limit":{"anyOf":[{"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."},{"type":"null"}],"description":"Null when there is no limit."},"used":{"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."},"left":{"anyOf":[{"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."},{"type":"null"}],"description":"Worked out for you. Null when there is no limit."},"resets_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":["limit","used","left","resets_at"],"additionalProperties":false},"per_letter":{"type":"object","properties":{"limit":{"anyOf":[{"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."},{"type":"null"}]},"max_sheets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["limit","max_sheets"],"additionalProperties":false},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["per_day","per_month","per_letter","per_recipient","says"],"additionalProperties":false},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["ask_every_time","ask_for_new_addresses","ask_over_limits","autopilot"]},"on_send":{"type":"object","properties":{"known_address":{"type":"string","enum":["goes_ahead","waits_for_approval","refused"]},"new_address":{"type":"string","enum":["goes_ahead","waits_for_approval","refused"]},"over_a_limit":{"type":"string","enum":["goes_ahead","waits_for_approval","refused"]}},"required":["known_address","new_address","over_a_limit"],"additionalProperties":false},"approver":{"type":"string","description":"A role, never a name."},"usually_within_hours":{"description":"Null until there is a month of history.","type":["number","null"]},"expires_after_hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["mode","on_send","approver","usually_within_hours","expires_after_hours","says"],"additionalProperties":false},"sending":{"type":"object","properties":{"state":{"type":"string","enum":["open","paused","stopped"]},"by":{"anyOf":[{"type":"string","enum":["safeguard","a_person","stop_all"]},{"type":"null"}]},"since_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"}]},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["state","by","since_at","says"],"additionalProperties":false},"posting":{"type":"object","properties":{"cutoff_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_if_by_cutoff":{"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])))$"},"posts_on_if_after":{"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])))$"},"capacity_today":{"type":"string","enum":["open","nearly_full","full"]},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["cutoff_at","posts_on_if_by_cutoff","posts_on_if_after","capacity_today","says"],"additionalProperties":false},"post_on":{"type":"object","properties":{"earliest":{"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])))$","description":"The first day quote_letter takes as post_on now."},"latest":{"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])))$","description":"The last day it takes now."},"not_posting":{"type":"array","items":{"type":"object","properties":{"day":{"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":["bank_holiday","day_away","day_full"]}},"required":["day","why"],"additionalProperties":false},"description":"Weekdays between them that cannot be asked for: bank holidays, days the print room is away, days full for letters sent ahead. We never post at weekends."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["earliest","latest","not_posting","says"],"additionalProperties":false,"description":"Send on a later date: the posting days post_on can be now."},"letters":{"type":"object","properties":{"countries":{"type":"array","items":{"type":"string"}},"max_sheets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_pages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"file_types":{"type":"array","items":{"type":"string"}},"cannot":{"type":"array","items":{"type":"string"}},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["countries","max_sheets","max_pages","file_types","cannot","says"],"additionalProperties":false},"groups":{"type":"object","properties":{"max_recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most people one send of yours may go to: 1, 10 or 50. Your person sets it."},"same_letter_addresses_left_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Addresses the same letter can still go to today before a person is asked, counted for the letter you have sent most today. A new letter starts at asks_above."},"asks_above":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The same letter to more addresses than this in a day always asks a person."},"atomside_reads_above":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"A live group larger than this is read by Atomside before it prints."},"new_account_max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"While we check a new live account's first letters, the most in one send. Null otherwise."},"print_room_today":{"type":"object","properties":{"room":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Letters the next print run can still take. A group prints together. Null in test mode: test letters never fill it."}},"required":["room"],"additionalProperties":false},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["max_recipients","same_letter_addresses_left_today","asks_above","atomside_reads_above","new_account_max","print_room_today","says"],"additionalProperties":false,"description":"One letter to several people: what a list in quote_letter may hold today."},"claim":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unclaimed","claimed"]},"expires_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"}],"description":"When an unclaimed account is deleted."},"expires_soon":{"type":"boolean","description":"True in its last 7 days: remind your person."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["status","expires_at","expires_soon","says"],"additionalProperties":false},{"type":"null"}],"description":"For an account made by start_account. Null for any other."},"recheck_after_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))$","description":"When this answer goes stale."},"letters_for":{"anyOf":[{"type":"string","enum":["own","customers"]},{"type":"null"}],"description":"Whose letters the organisation sends: its own, or its customers' (on_behalf_of). Null until someone says; treated as own."},"next":{"type":"string","description":"What to call next."}},"required":["as_of","summary","verdict","mode","agent","sender","credits","limits","approval","sending","posting","post_on","letters","groups","claim","recheck_after_at","letters_for","next"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/addresses/check":{"post":{"operationId":"check_address","summary":"Check an address","description":"Checks a UK address and returns it as it will print, or close matches if it is not found. Free. quote_letter runs the same check, so use this when you are unsure of an address. In test mode, postcodes TEST 01 to TEST 13 rehearse outcomes.","x-atomside-scope":"letters:read","x-atomside-permission":"Read","x-atomside-effect":"read","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","address_not_uk","test_postcode_in_live","unclaimed_limit_reached","not_found"],"parameters":[{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":100},"line2":{"type":"string","minLength":1,"maxLength":100},"line3":{"type":"string","minLength":1,"maxLength":100},"town":{"type":"string","minLength":1,"maxLength":60},"postcode":{"type":"string","minLength":2,"maxLength":10},"country":{"type":"string","minLength":1,"maxLength":60}},"additionalProperties":false,"required":["line1","postcode"]}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["valid","corrected","not_found","ambiguous"],"description":"valid: right as sent. corrected: found, written differently. Otherwise not usable."},"test":{"type":"boolean","description":"True for a TEST postcode: nothing is looked up."},"address":{"anyOf":[{"type":"object","properties":{"lines":{"type":"array","items":{"type":"string"}},"town":{"type":"string"},"postcode":{"type":"string"}},"required":["lines","town","postcode"],"additionalProperties":false},{"type":"null"}],"description":"The address as it will print. Null unless found."},"prints_as":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"changes":{"type":"array","items":{"type":"string"},"description":"What we changed from what you sent."},"matches":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Close matches. Use one only if it is clearly the same place."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."},"next":{"type":"string"}},"required":["status","test","address","prints_as","changes","matches","says","next"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/files":{"post":{"operationId":"upload_file","summary":"Upload a file","description":"Takes a file (PDF, Word, ODT, RTF, plain text, Markdown, HTML, JPG or PNG, up to 10 MB) as base64 and returns an id to use in quote_letter or check_letter pages. Kept for 24 hours unless a letter uses it. Free. For a letter you write yourself, pass text in the quote instead.","x-atomside-scope":"letters:quote","x-atomside-permission":"Quote","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","file_not_usable","not_found"],"parameters":[{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The file name, with its extension."},"content_base64":{"type":"string","maxLength":13981016,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$","description":"The file, base64 encoded."},"media_type":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false,"required":["name","content_base64"]}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"Use this in a quote: { \"file\": \"file_…\" }."},"name":{"type":"string"},"kind":{"type":"string","enum":["text","markdown","html","pdf","docx","odt","rtf","png","jpg"]},"size_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"pages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"For a PDF, how many pages it has: choose some with \"pages\" in a quote. Else null."},"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))$","description":"Kept until then unless a letter uses it."},"next":{"type":"string"}},"required":["file","name","kind","size_bytes","sha256","pages","expires","next"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/quotes":{"post":{"operationId":"quote_letter","summary":"Quote a letter","description":"Checks the address and the pages, renders the proof, fixes the print file and returns the price in credits and pounds, the page and sheet count, and what will happen on send: goes ahead, waits for a person (and why), or refused (and why). Nothing is charged. Pass \"check\" from check_letter to quote those exact pages. A quote lasts 24 hours. reference, on_behalf_of, labels, reason and origin are yours and never printed.","x-atomside-scope":"letters:quote","x-atomside-permission":"Quote","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","too_many_recipients","field_not_filled","address_not_found","address_not_uk","address_on_do_not_write","test_postcode_in_live","too_many_sheets","file_not_usable","file_not_found","service_not_offered","on_behalf_of_required","origin_required","customer_paused","customer_suspended","customer_closed","customer_limit_reached","test_customer_in_live","customer_ref_not_valid","customer_ref_not_allowed","post_on_not_available","not_found"],"parameters":[{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"One recipient, or a list of up to 50: one letter each, from one quote and one send. Leave out when you pass check.","anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"As it should print, e.g. \"Ms A. Sample\"."},"line1":{"type":"string","minLength":1,"maxLength":100},"line2":{"type":"string","minLength":1,"maxLength":100},"line3":{"type":"string","minLength":1,"maxLength":100},"town":{"type":"string","minLength":1,"maxLength":60},"postcode":{"type":"string","minLength":2,"maxLength":10},"country":{"description":"Leave out for the UK. We post to UK addresses only.","type":"string","minLength":1,"maxLength":60},"fields":{"description":"Values for the {names} in your text pages. Never printed elsewhere.","type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"additionalProperties":{"type":"string","maxLength":200,"pattern":"^[^\\r\\n{}]*$"}},"repeat_of":{"description":"An earlier letter this person should get again on purpose. A person still decides.","type":"string","minLength":1,"maxLength":40},"repeat_reason":{"description":"Why they get it again. Shown to the person who decides.","type":"string","minLength":1,"maxLength":500}},"required":["name","line1","postcode"],"additionalProperties":false},{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"As it should print, e.g. \"Ms A. Sample\"."},"line1":{"type":"string","minLength":1,"maxLength":100},"line2":{"type":"string","minLength":1,"maxLength":100},"line3":{"type":"string","minLength":1,"maxLength":100},"town":{"type":"string","minLength":1,"maxLength":60},"postcode":{"type":"string","minLength":2,"maxLength":10},"country":{"description":"Leave out for the UK. We post to UK addresses only.","type":"string","minLength":1,"maxLength":60},"fields":{"description":"Values for the {names} in your text pages. Never printed elsewhere.","type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"additionalProperties":{"type":"string","maxLength":200,"pattern":"^[^\\r\\n{}]*$"}},"repeat_of":{"description":"An earlier letter this person should get again on purpose. A person still decides.","type":"string","minLength":1,"maxLength":40},"repeat_reason":{"description":"Why they get it again. Shown to the person who decides.","type":"string","minLength":1,"maxLength":500}},"required":["name","line1","postcode"],"additionalProperties":false},"description":"Up to 50 recipients: one letter each."}]},"pages":{"description":"Leave out when you pass check.","minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100000,"description":"The letter, written in the call. We lay it out."},"format":{"default":"text","type":"string","enum":["text","markdown","html"]}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"file":{"type":"string","description":"An id from upload_file."},"pages":{"description":"PDF only: which of its pages go in, in this order, e.g. \"2-3\" or \"1,4\". Leave out for every page.","type":"string","pattern":"^\\s*\\d{1,3}(\\s*-\\s*\\d{1,3})?(\\s*,\\s*\\d{1,3}(\\s*-\\s*\\d{1,3})?){0,19}\\s*$"}},"required":["file"],"additionalProperties":false},{"type":"object","properties":{"file_url":{"type":"string","format":"uri","description":"An https link we fetch once, at quote time."}},"required":["file_url"],"additionalProperties":false}]}},"check":{"description":"A check id from check_letter: quote those exact pages.","type":"string"},"class":{"description":"second (default) or first.","type":"string","enum":["second","first","signed_for","tracked","special_delivery"]},"colour":{"description":"Colour adds 2 credits. Default false.","type":"boolean"},"sides":{"description":"Default both. We charge by the sheet.","type":"string","enum":["both","one"]},"reference":{"type":"string","minLength":1,"maxLength":200},"on_behalf_of":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^@\\s]+$","description":"Your own id for the customer. Never printed."},"name":{"description":"A label. Never printed.","type":"string","minLength":1,"maxLength":100}},"required":["ref"],"additionalProperties":false},"labels":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":50}},"reason":{"description":"Why you send it. Shown to the approver, marked as your words.","type":"string","minLength":1,"maxLength":500},"origin":{"type":"object","properties":{"run":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":500,"format":"uri"},"software":{"type":"string","minLength":1,"maxLength":100},"model":{"type":"string","minLength":1,"maxLength":100},"asked_by":{"type":"string","minLength":1,"maxLength":100}},"additionalProperties":false},"post_on":{"description":"A later posting day, YYYY-MM-DD, read as a UK day: we print and post it that day. A posting day (Monday to Friday, not a bank holiday) up to 60 days ahead. Leave out to go at the next cut-off. The letter is dated that day. Never an arrival day. For one recipient only.","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])))$"},"purpose":{"description":"Needed from 2 recipients: one plain sentence on what the send is for. Never printed. Shown to the person who approves and to our checker.","type":"string","minLength":1,"maxLength":300},"all_or_none":{"description":"With a list: refuse the quote if anyone would be left out, instead of quoting the rest.","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string"},"check":{"description":"The check these pages came from, if any.","type":["string","null"]},"test":{"type":"boolean","description":"True in test mode: this quote can never print."},"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":"The total. Nothing is charged until send_letter."},"price_lines":{"type":"array","items":{"type":"object","properties":{"what":{"type":"string"},"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."}},"required":["what","price"],"additionalProperties":false}},"sha256":{"type":"string","description":"The print file this quote fixes. An approval covers this hash."},"proof":{"type":"string","description":"The print file, as it will print."},"images":{"type":"array","items":{"type":"string"}},"parts":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","description":"\"the text\", a file id, or a link."},"first_page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The page of the letter it starts on."},"pages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","first_page","pages"],"additionalProperties":false},"description":"Each part of pages, in order: where it came from and the pages it became."},"address":{"type":"object","properties":{"match":{"type":"string","enum":["found","not_found"]},"test":{"type":"boolean","description":"True for a TEST postcode: nothing is looked up."},"prints_as":{"type":"array","items":{"type":"string"}},"changes":{"type":"array","items":{"type":"string"},"description":"What we changed from what you sent."},"matches":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Close matches when it is not found."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["match","test","prints_as","changes","matches","says"],"additionalProperties":false},"sender":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"of":{"type":"string","enum":["workspace","customer"]},"verified":{"type":"boolean"}},"required":["name","of","verified"],"additionalProperties":false},{"type":"null"}],"description":"The sender printed on the letter. Null in test mode before a sender is set."},"checks":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"level":{"type":"string","enum":["blocking","warning","passed"]},"page":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"area_mm":{"default":null,"description":"Where on the page it looked or found the problem, in millimetres from the page's top-left corner: x, y, width, height. Null when the check is about the whole letter.","anyOf":[{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"items":false,"minItems":4,"maxItems":4},{"type":"null"}]},"says":{"type":"string"},"fix":{"type":["string","null"]}},"required":["n","code","level","page","area_mm","says","fix"],"additionalProperties":false},"description":"Warnings travel to the approver word for word."},"on_send":{"type":"string","enum":["goes_ahead","waits_for_approval","refused"],"description":"What send_letter would do now. Same words as get_account."},"on_send_reason":{"description":"Why, as a code: over_daily_limit, new_address, waiting_for_credit…","type":["string","null"]},"on_send_says":{"type":"string","description":"A sentence to repeat to your person as it stands."},"posting":{"type":"object","properties":{"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 UK date it will be posted."},"cutoff_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"}]},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["posts_on","cutoff_at","says"],"additionalProperties":false},"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. The letter is dated that day."},"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":"With post_on: once sent, it can be cancelled until this cut-off on its posting day."},"post_on_range":{"type":"object","properties":{"earliest":{"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])))$"},"latest":{"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])))$"}},"required":["earliest","latest"],"additionalProperties":false,"description":"The first and last posting days post_on can be now. Days we do not post between them are refused."},"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))$"},"next":{"type":"string"}},"required":["quote","check","test","pages","sheets","class","colour","sides","price","price_lines","sha256","proof","images","parts","address","sender","checks","on_send","on_send_reason","on_send_says","posting","post_on","cancel_until","post_on_range","expires","next"],"additionalProperties":false},{"type":"object","properties":{"quote":{"type":"string","description":"The group quote. Send it with send_letter and one idempotency key."},"test":{"type":"boolean","description":"True in test mode: this quote can never print."},"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Letters in the quote: the recipients that are ready."},"left_out":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recipients left out: each[] says why, and how to fix it."},"sheets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Sheets in all."},"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":"The total: each letter priced by its own sheets. Nothing is charged yet."},"price_lines":{"type":"array","items":{"type":"object","properties":{"what":{"type":"string"},"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."}},"required":["what","price"],"additionalProperties":false}},"each":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place in your list, from 1."},"to":{"type":"string","description":"\"Ms A. Sample, XX1 1XX\"."},"ready":{"type":"boolean","description":"True when this recipient is in the quote."},"quote":{"description":"This letter of the group, for its page pictures. Never sent on its own.","type":["string","null"]},"pages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"sheets":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"proof":{"description":"The print file, as it will print.","type":["string","null"]},"images":{"type":"array","items":{"type":"string"}},"sha256":{"description":"The print file this letter fixes.","type":["string","null"]},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The values this letter was filled with."},"code":{"anyOf":[{"type":"string","enum":["address_not_found","address_not_uk","address_on_do_not_write","test_postcode_in_live","possible_duplicate","too_many_sheets","file_not_usable","over_per_letter_limit","over_recipient_limit","outside_agent_rules","field_not_filled","merged"]},{"type":"null"}],"description":"Why it is left out, as a refusal code."},"say":{"type":["string","null"]},"agent_can":{"type":"array","items":{"type":"object","properties":{"do":{"type":"string"},"tool":{"type":"string"},"with":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"changes_wording":{"type":"boolean"},"changes_day":{"type":"boolean"}},"required":["do","tool","with","changes_wording","changes_day"],"additionalProperties":false}},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["n","to","ready","quote","pages","sheets","credits","proof","images","sha256","fields","code","say","agent_can","details"],"additionalProperties":false},"description":"One line for each recipient, in your order."},"differ_only_in":{"type":"array","items":{"type":"string"},"description":"What differs between the letters: the address and the fields."},"fields":{"type":"array","items":{"type":"string"},"description":"The fields the letter uses."},"purpose":{"type":"string"},"class":{"type":"string","enum":["second","first"]},"colour":{"type":"boolean"},"sides":{"type":"string","enum":["both","one"]},"checks":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"level":{"type":"string","enum":["blocking","warning","passed"]},"page":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"area_mm":{"default":null,"description":"Where on the page it looked or found the problem, in millimetres from the page's top-left corner: x, y, width, height. Null when the check is about the whole letter.","anyOf":[{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"items":false,"minItems":4,"maxItems":4},{"type":"null"}]},"says":{"type":"string"},"fix":{"type":["string","null"]}},"required":["n","code","level","page","area_mm","says","fix"],"additionalProperties":false},"description":"The checks on the first letter. Warnings travel to the approver."},"sender":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"of":{"type":"string","enum":["workspace","customer"]},"verified":{"type":"boolean"}},"required":["name","of","verified"],"additionalProperties":false},{"type":"null"}],"description":"The sender printed on the letter. Null in test mode before a sender is set."},"on_send":{"type":"string","enum":["goes_ahead","waits_for_approval","refused"],"description":"What send_letter would do now, for the whole group."},"on_send_reason":{"type":["string","null"]},"on_send_says":{"type":"string","description":"A sentence to repeat to your person as it stands."},"posting":{"type":"object","properties":{"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 UK date it will be posted."},"cutoff_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"}]},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["posts_on","cutoff_at","says"],"additionalProperties":false},"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))$"},"next":{"type":"string"}},"required":["quote","test","letters","left_out","sheets","price","price_lines","each","differ_only_in","fields","purpose","class","colour","sides","checks","sender","on_send","on_send_reason","on_send_says","posting","expires","next"],"additionalProperties":false}]}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/letters":{"post":{"operationId":"send_letter","summary":"Send a letter","description":"Commits a quote: the letter is printed and posted as quoted. Needs an idempotency key; a retry with the same key returns the first letter and sends nothing new. Credits are held now and charged when it is posted. If it needs a person, the answer is \"not_yet\" with a link to show them (details.show_to_person); then call wait_for_approval. Short of credit, it is \"not_yet\" waiting_for_credit: the letter goes by itself when credits arrive, and details.auto_top_up says whether a pack is being bought. Never send the same letter again to get past a refusal.","x-atomside-scope":"letters:send","x-atomside-permission":"Send","x-atomside-effect":"destructive","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","quote_not_found","quote_expired","quote_already_used","mode_mismatch","needs_approval","possible_duplicate","paused_same_text","paused_failed_letters","waiting_for_credit","held_for_check","prints_later","print_queue_full","over_daily_limit","over_monthly_limit","over_per_letter_limit","over_recipient_limit","outside_agent_rules","customer_over_limit","customer_paused","customer_sender_unverified","customer_suspended","customer_closed","customer_limit_reached","test_customer_in_live","customer_ref_not_valid","customer_ref_not_allowed","on_behalf_of_required","origin_required","agent_paused","sending_stopped","account_suspended","not_ready_for_live","key_cannot_send","unclaimed_limit_reached","unclaimed_hourly_limit","address_on_do_not_write","new_account_daily_limit","post_on_not_available","not_found"],"parameters":[{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quote":{"type":"string","description":"The quote id from quote_letter."},"reason":{"description":"Why you send it. Shown to the approver, marked as your words.","type":"string","minLength":1,"maxLength":500},"repeat_of":{"description":"An earlier letter this one repeats on purpose. A person still decides.","type":"string"},"on_behalf_of":{"description":"Only when the quote had none.","type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^@\\s]+$","description":"Your own id for the customer. Never printed."},"name":{"description":"A label. Never printed.","type":"string","minLength":1,"maxLength":100}},"required":["ref"],"additionalProperties":false},"vouch":{"description":"People only, for a list: true to say everyone on it already deals with the sender. An agent leaves it out.","type":"boolean"},"split_days":{"description":"People only, for a list in live mode: when today's print run is full, print what fits today and the rest the next day.","type":"boolean"},"post_on":{"description":"Only when the quote had no post_on: the posting day, YYYY-MM-DD. A different day from the quote's is refused: quote again.","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])))$"}},"additionalProperties":false,"required":["quote"]}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"answer":{"type":"string","const":"yes","description":"A not-yet or yes-later answer comes back in the refusal shape."},"letter":{"type":"string"},"status":{"type":"string","const":"queued"},"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."},"say":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["held","say"],"additionalProperties":false},"posting":{"type":"object","properties":{"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 UK date it will be posted."},"cutoff_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"}]},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["posts_on","cutoff_at","says"],"additionalProperties":false},"next":{"type":"string"}},"required":["answer","letter","status","money","posting","next"],"additionalProperties":false},{"type":"object","properties":{"answer":{"type":"string","const":"yes","description":"A not-yet or yes-later answer comes back in the refusal shape, with details.group."},"group":{"type":"string","description":"The group, grp_…: read it with get_letter."},"status":{"type":"string","const":"queued"},"letters":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"letter":{"type":"string"},"to":{"type":"string"},"status":{"type":"string","enum":["quoted","waiting_for_approval","queued","printing","printed","posted","on_record","declined","lapsed","cancelled","held","failed","returned"]}},"required":["n","letter","to","status"],"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."},"say":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["held","say"],"additionalProperties":false},"posting":{"type":"object","properties":{"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 UK date it will be posted."},"cutoff_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"}]},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["posts_on","cutoff_at","says"],"additionalProperties":false},"next":{"type":"string"}},"required":["answer","group","status","letters","money","posting","next"],"additionalProperties":false}]}}}},"202":{"description":"Not yet, or yes later: the work is accepted and waits. A refusal shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}},"get":{"operationId":"list_letters","summary":"List letters","description":"Finds letters by recipient, status, date, your reference, label or on_behalf_of, newest first. Use it to check \"did I already write to them?\" before you quote. group lists the letters of one group. Returns up to limit letters and next_cursor for the next page. Free.","x-atomside-scope":"letters:read","x-atomside-permission":"Read","x-atomside-effect":"read","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","not_found"],"parameters":[{"name":"to","in":"query","required":false,"schema":{"description":"Part of the recipient name, or their postcode.","type":"string","minLength":1,"maxLength":100}},{"name":"status","in":"query","required":false,"schema":{"minItems":1,"maxItems":13,"type":"array","items":{"type":"string","enum":["quoted","waiting_for_approval","queued","printing","printed","posted","on_record","declined","lapsed","cancelled","held","failed","returned"]}}},{"name":"reference","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"label","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":50}},{"name":"on_behalf_of","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"group","in":"query","required":false,"schema":{"description":"A group, grp_…: only its letters. Each carries n, its place in your list.","type":"string","minLength":1,"maxLength":60}},{"name":"since","in":"query","required":false,"schema":{"description":"Made at or after this time.","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))$"}},{"name":"until","in":"query","required":false,"schema":{"description":"Made before this time.","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))$"}},{"name":"scheduled","in":"query","required":false,"schema":{"description":"true: only letters asked for a later day that still wait to go (\"is a letter to them already waiting?\"). false: only the others.","type":"boolean"}},{"name":"posts_on_from","in":"query","required":false,"schema":{"description":"Posting day (booked, or asked for) on or after.","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])))$"}},{"name":"posts_on_to","in":"query","required":false,"schema":{"description":"Posting day (booked, or asked for) on or before.","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])))$"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"letters":{"type":"array","items":{"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":"Its group, grp_…, if it went to several people at once.","type":["string","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Its place in the group's list. Null outside a group."},"to":{"type":"object","properties":{"name":{"type":"string"},"postcode":{"type":"string"}},"required":["name","postcode"],"additionalProperties":false},"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."},"reference":{"type":["string","null"]},"on_behalf_of":{"type":["string","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."},"approval":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The approval, apr_…."},"status":{"type":"string","enum":["waiting","approved","declined","lapsed","withdrawn"]},"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","by_link"],"additionalProperties":false},{"type":"null"}],"description":"Its latest approval, as on get_letter, or null if it never asked anyone."},"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))$"},"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."},"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, once queued."},"scheduled":{"type":"boolean","description":"True while it waits to go on the day asked for."}},"required":["letter","status","group","n","to","price","reference","on_behalf_of","customer","approval","labels","agent","created_at","updated_at","post_on","posts_on","scheduled"],"additionalProperties":false}},"next_cursor":{"description":"Pass as cursor for the next page. Null at the end.","type":["string","null"]}},"required":["letters","next_cursor"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/letters/{letter}":{"get":{"operationId":"get_letter","summary":"Get a letter","description":"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.","x-atomside-scope":"letters:read","x-atomside-permission":"Read","x-atomside-effect":"read","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","letter_not_found","not_found"],"parameters":[{"name":"letter","in":"path","required":true,"schema":{"type":"string","description":"The letter id, ltr_…, or a group, grp_…."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"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}]}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/letters/{letter}/cancel":{"post":{"operationId":"cancel_letter","summary":"Cancel a letter","description":"Cancels a letter that has not gone to print: waiting for a person, queued or held. Held credits go back to the balance and an approval link stops working. After the print cut-off it is too late: the answer says so and nothing changes. A correction is a new letter. A group reference (grp_…) cancels every letter of it that can still be cancelled, and lists the ones it could not, each with why.","x-atomside-scope":"letters:send","x-atomside-permission":"Send","x-atomside-effect":"destructive","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","letter_not_found","too_late_to_cancel","already_cancelled","approval_declined","approval_expired","declined_by_atomside","print_failed","returned_to_sender","key_cannot_send","not_found"],"parameters":[{"name":"letter","in":"path","required":true,"schema":{"type":"string","description":"The letter id, ltr_…, or a group, grp_…."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"letter":{"type":"string"},"status":{"type":"string","const":"cancelled"},"money":{"type":"object","properties":{"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":["returned","say"],"additionalProperties":false},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."},"next":{"type":"string"}},"required":["letter","status","money","says","next"],"additionalProperties":false},{"type":"object","properties":{"group":{"type":"string"},"cancelled":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"letter":{"type":"string"},"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":["n","letter","returned"],"additionalProperties":false},"description":"Letters cancelled now, each with the credits it gave back."},"not_cancelled":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"letter":{"type":"string"},"code":{"type":"string","description":"The refusal cancelling it alone would give."},"say":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["n","letter","code","say"],"additionalProperties":false},"description":"Letters that could not be cancelled, and why: too late, or already settled."},"money":{"type":"object","properties":{"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":["returned","say"],"additionalProperties":false},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."},"next":{"type":"string"}},"required":["group","cancelled","not_cancelled","money","says","next"],"additionalProperties":false}]}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/letters/check":{"post":{"operationId":"check_letter","summary":"Check a letter","description":"Returns every page as it will print, the address as we read it, the price and a list of checks, each with a page and a fix. Takes the same input as quote_letter. Free, and makes no quote. Pass the check id to quote_letter as \"check\" and it quotes these exact pages. Blocking checks must be fixed before a quote; warnings go to the approver word for word. With a list in \"to\", it checks one recipient, picked by n, with their fields filled in.","x-atomside-scope":"letters:quote","x-atomside-permission":"Quote","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","too_many_recipients","field_not_filled","address_not_uk","address_on_do_not_write","test_postcode_in_live","service_not_offered","file_not_found","file_not_usable","not_found"],"parameters":[{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"As it should print, e.g. \"Ms A. Sample\"."},"line1":{"type":"string","minLength":1,"maxLength":100},"line2":{"type":"string","minLength":1,"maxLength":100},"line3":{"type":"string","minLength":1,"maxLength":100},"town":{"type":"string","minLength":1,"maxLength":60},"postcode":{"type":"string","minLength":2,"maxLength":10},"country":{"description":"Leave out for the UK. We post to UK addresses only.","type":"string","minLength":1,"maxLength":60},"fields":{"description":"Values for the {names} in your text pages. Never printed elsewhere.","type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"additionalProperties":{"type":"string","maxLength":200,"pattern":"^[^\\r\\n{}]*$"}},"repeat_of":{"description":"An earlier letter this person should get again on purpose. A person still decides.","type":"string","minLength":1,"maxLength":40},"repeat_reason":{"description":"Why they get it again. Shown to the person who decides.","type":"string","minLength":1,"maxLength":500}},"required":["name","line1","postcode"],"additionalProperties":false},{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"As it should print, e.g. \"Ms A. Sample\"."},"line1":{"type":"string","minLength":1,"maxLength":100},"line2":{"type":"string","minLength":1,"maxLength":100},"line3":{"type":"string","minLength":1,"maxLength":100},"town":{"type":"string","minLength":1,"maxLength":60},"postcode":{"type":"string","minLength":2,"maxLength":10},"country":{"description":"Leave out for the UK. We post to UK addresses only.","type":"string","minLength":1,"maxLength":60},"fields":{"description":"Values for the {names} in your text pages. Never printed elsewhere.","type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"additionalProperties":{"type":"string","maxLength":200,"pattern":"^[^\\r\\n{}]*$"}},"repeat_of":{"description":"An earlier letter this person should get again on purpose. A person still decides.","type":"string","minLength":1,"maxLength":40},"repeat_reason":{"description":"Why they get it again. Shown to the person who decides.","type":"string","minLength":1,"maxLength":500}},"required":["name","line1","postcode"],"additionalProperties":false},"description":"Up to 50 recipients: one letter each."}],"description":"One recipient, or the list you will quote. With a list, n picks the one to check."},"pages":{"minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100000,"description":"The letter, written in the call. We lay it out."},"format":{"default":"text","type":"string","enum":["text","markdown","html"]}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"file":{"type":"string","description":"An id from upload_file."},"pages":{"description":"PDF only: which of its pages go in, in this order, e.g. \"2-3\" or \"1,4\". Leave out for every page.","type":"string","pattern":"^\\s*\\d{1,3}(\\s*-\\s*\\d{1,3})?(\\s*,\\s*\\d{1,3}(\\s*-\\s*\\d{1,3})?){0,19}\\s*$"}},"required":["file"],"additionalProperties":false},{"type":"object","properties":{"file_url":{"type":"string","format":"uri","description":"An https link we fetch once, at quote time."}},"required":["file_url"],"additionalProperties":false}]},"description":"Parts print in this order. The first carries the address."},"class":{"default":"second","description":"second or first. Signed-for, tracked and special delivery are not offered.","type":"string","enum":["second","first","signed_for","tracked","special_delivery"]},"colour":{"default":false,"description":"Colour adds 2 credits.","type":"boolean"},"sides":{"default":"both","description":"both puts two pages on a sheet. We charge by the sheet.","type":"string","enum":["both","one"]},"n":{"description":"With a list: which recipient to check, from 1. Default 1.","type":"integer","minimum":1,"maximum":50},"images":{"default":true,"description":"False for text only: no page pictures.","type":"boolean"},"guides":{"default":false,"description":"True for window, fold and margin overlays.","type":"boolean"}},"additionalProperties":false,"required":["to","pages"]}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"check":{"type":"string","description":"Pass to quote_letter as \"check\" to quote these exact pages, as one letter to this recipient."},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"With a list: the recipient these pages are for, from 1. Null for one recipient."},"differ_only_in":{"type":"array","items":{"type":"string"},"description":"With a list: what differs from one letter to the next, \"address\" and the field names. Empty for one recipient."},"result":{"type":"string","enum":["ok","warnings","blocked"]},"sha256":{"type":"string","description":"The print file. A quote of this check prints exactly this."},"pages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sheets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"anyOf":[{"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."},{"type":"null"}],"description":"Null when over the sheet limit."},"price_lines":{"type":"array","items":{"type":"object","properties":{"what":{"type":"string"},"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."}},"required":["what","price"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"},"description":"One picture per page, as it will print."},"guides":{"type":"array","items":{"type":"string"},"description":"Window, folds and margins over each page. Never printed."},"parts":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","description":"\"the text\", a file id, or a link."},"first_page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The page of the letter it starts on."},"pages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","first_page","pages"],"additionalProperties":false},"description":"Each part of pages, in order, and the pages it became."},"text":{"type":"array","items":{"type":"string"},"description":"The words on each page as we read them from the print file, for text-only agents."},"address":{"type":"object","properties":{"match":{"type":"string","enum":["found","not_found"]},"test":{"type":"boolean","description":"True for a TEST postcode: nothing is looked up."},"prints_as":{"type":"array","items":{"type":"string"}},"changes":{"type":"array","items":{"type":"string"},"description":"What we changed from what you sent."},"matches":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Close matches when it is not found."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."}},"required":["match","test","prints_as","changes","matches","says"],"additionalProperties":false},"checks":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"level":{"type":"string","enum":["blocking","warning","passed"]},"page":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"area_mm":{"default":null,"description":"Where on the page it looked or found the problem, in millimetres from the page's top-left corner: x, y, width, height. Null when the check is about the whole letter.","anyOf":[{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"items":false,"minItems":4,"maxItems":4},{"type":"null"}]},"says":{"type":"string"},"fix":{"type":["string","null"]}},"required":["n","code","level","page","area_mm","says","fix"],"additionalProperties":false}},"summary":{"type":"string","description":"\"1 blocking, 2 warnings, 10 passed\"."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."},"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))$"},"next":{"type":"string"}},"required":["check","n","differ_only_in","result","sha256","pages","sheets","price","price_lines","images","guides","parts","text","address","checks","summary","says","expires","next"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/letters/{letter}/approval":{"get":{"operationId":"wait_for_approval","summary":"Wait for approval","description":"Waits for a person to decide on a letter, for up to 50 seconds a call, and returns early when they do: approved, declined with the note, or lapsed. If it is still waiting, call again. Free. Never send the letter again while it waits. A group reference (grp_…) waits for the decision on the whole group: how many were approved, and each declined letter with its note.","x-atomside-scope":"letters:read","x-atomside-permission":"Read","x-atomside-effect":"read","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","letter_not_found","not_found"],"parameters":[{"name":"letter","in":"path","required":true,"schema":{"type":"string","description":"The letter id, ltr_…, or a group, grp_…."}},{"name":"timeout_seconds","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":0,"maximum":50}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"letter":{"type":"string"},"status":{"type":"string","enum":["still_waiting","approved","declined","lapsed","withdrawn","not_waiting"],"description":"not_waiting: the letter never needed a person, or no longer waits."},"letter_status":{"type":"string","enum":["quoted","waiting_for_approval","queued","printing","printed","posted","on_record","declined","lapsed","cancelled","held","failed","returned"]},"via":{"anyOf":[{"type":"string","enum":["email","console","chat_link","test_trigger","link"]},{"type":"null"}]},"by":{"description":"Who decided.","type":["string","null"]},"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"}]},"covers":{"type":["string","null"]},"note":{"description":"The decline note, word for word.","type":["string","null"]},"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":"Charged for the letter so far: the same as money.charged."},"approval":{"description":"The approval, apr_…, as approval.id on get_letter. Null if it never asked anyone.","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."},"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":"Held for it now: taken from the balance at send, charged at posting."},"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":"Given back to the balance."},"say":{"type":"string"}},"required":["held","charged","returned","say"],"additionalProperties":false,"description":"The letter's money as get_letter shows it, with a sentence to repeat."},"link":{"description":"The approval link, while it still works.","type":["string","null"]},"expires":{"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"}]},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."},"next":{"type":"string"}},"required":["letter","status","letter_status","via","by","at","covers","note","charged","approval","by_link","money","link","expires","says","next"],"additionalProperties":false},{"type":"object","properties":{"group":{"type":"string"},"status":{"type":"string","enum":["still_waiting","decided","lapsed","withdrawn","not_waiting"],"description":"decided: a person approved some or all and declined the rest. not_waiting: the group never needed a person."},"approved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Letters approved."},"declined":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"letter":{"type":"string"},"note":{"type":["string","null"]}},"required":["n","letter","note"],"additionalProperties":false},"description":"Each declined letter with its note, word for word."},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Letters still waiting for a person."},"via":{"anyOf":[{"type":"string","enum":["email","console","chat_link","test_trigger","link"]},{"type":"null"}]},"by":{"description":"Who decided.","type":["string","null"]},"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"}]},"link":{"description":"The approval link for the group, while it still works.","type":["string","null"]},"expires":{"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"}]},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."},"next":{"type":"string"}},"required":["group","status","approved","declined","waiting","via","by","at","link","expires","says","next"],"additionalProperties":false}]}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/start":{"post":{"operationId":"start_account","summary":"Start an account","description":"Needs no key. Gives a new agent a test key and a link its person can use to claim the account. Test only: 20 test letters, 5 an hour, for 30 days, and nothing real can happen before the claim. Store the key, send a test letter, then pass on tell_your_person. Needs an idempotency key: a retry returns the same account.","x-atomside-scope":"none","x-atomside-permission":"No key","security":[],"x-atomside-effect":"write","x-atomside-refusals":["invalid_request","rate_limited","try_again_shortly","idempotency_key_reused","request_in_progress","account_already_claimed"],"parameters":[{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_name":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,39}$","description":"What the agent is called, e.g. \"lettings-helper\". Shown to the person who claims it."},"purpose":{"description":"In your words: what the letters are for. Shown, marked unchecked, on the claim page.","type":"string","minLength":1,"maxLength":280}},"additionalProperties":false,"required":["agent_name"]}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string"},"status":{"type":"string","const":"unclaimed"},"mode":{"type":"string","const":"test"},"key":{"type":"string","description":"Shown once. Store it. A retry with the same idempotency key gives a new one."},"claim_url":{"type":"string"},"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))$"},"limits":{"type":"object","properties":{"test_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address_checks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["test_letters","per_hour","address_checks"],"additionalProperties":false},"cannot":{"type":"array","items":{"type":"string","enum":["live","file_url","webhooks"]}},"tell_your_person":{"type":"string","description":"Pass these words on, as they are."},"next":{"type":"string"}},"required":["account","status","mode","key","claim_url","expires","limits","cannot","tell_your_person","next"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/account/claim-link":{"post":{"operationId":"new_claim_link","summary":"New claim link","description":"For an account made by start_account. Makes a new claim link and stops the old one, for when the link was lost. Returns the words to pass on again.","x-atomside-scope":"letters:read","x-atomside-permission":"Read","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","account_already_claimed","not_found"],"parameters":[{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string"},"claim_url":{"type":"string"},"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))$"},"tell_your_person":{"type":"string"},"next":{"type":"string"}},"required":["account","claim_url","expires","tell_your_person","next"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/letters/{letter}/advance":{"post":{"operationId":"advance_test_letter","summary":"Advance a test letter","description":"Test mode only. Moves a test letter one stage on: approves it if it waits for a person (TEST 02 declines, TEST 03 lapses), then printing, printed, posted and on record. TEST 05 and TEST 06 letters are held and released or declined by a sample reviewer; TEST 07 comes back to sender after it is on record. With fail_print, a letter queued, being printed or printed fails at the printer instead and its held credits come back. Nothing is printed or posted.","x-atomside-scope":"letters:send","x-atomside-permission":"Send","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","letter_not_found","test_mode_only","key_cannot_send","not_found"],"parameters":[{"name":"letter","in":"path","required":true,"schema":{"type":"string","description":"The test letter id, ltr_…."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fail_print":{"description":"Rehearse a printer failure: the letter fails at the printer instead of moving on, as letter.failed, and its held credits come back.","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"letter":{"type":"string"},"from":{"type":"string","enum":["quoted","waiting_for_approval","queued","printing","printed","posted","on_record","declined","lapsed","cancelled","held","failed","returned"]},"status":{"type":"string","enum":["quoted","waiting_for_approval","queued","printing","printed","posted","on_record","declined","lapsed","cancelled","held","failed","returned"]},"advanced":{"type":"boolean","description":"False when the letter has nowhere further to go."},"says":{"type":"string","description":"A sentence to repeat to your person as it stands."},"next":{"type":"string"}},"required":["letter","from","status","advanced","says","next"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers/usage":{"get":{"operationId":"get_customer_usage","summary":"Get usage by customer","description":"What each customer sent in one UK month, for billing it on: letters posted, by class, extra sheets, credits charged and credits given back. A letter counts in the month it was posted; credits given back count in the month they came back, so a closed month never changes. Leave out month for this month so far; pass customer for one customer. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"read","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","month_not_valid"],"parameters":[{"name":"month","in":"query","required":false,"schema":{"description":"The UK month, as 2026-11. This month so far when left out.","type":"string","maxLength":20}},{"name":"customer","in":"query","required":false,"schema":{"description":"One customer, by its ref.","type":"string","minLength":1,"maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string","description":"The UK month, as 2026-11."},"closed":{"type":"boolean","description":"True once the month is closed. A closed month never changes."},"closed_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"}]},"totals":{"type":"object","properties":{"customers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Letters posted in the month."},"second_class":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"first_class":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"extra_sheets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Sheets after the first, across the letters."},"credits":{"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":"Credits charged for the letters posted in the month."},"returned_credits":{"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":"Credits given back in the month, for letters declined, lapsed, cancelled or failed, whenever they were sent."}},"required":["customers","letters","second_class","first_class","extra_sheets","credits","returned_credits"],"additionalProperties":false},"customers":{"type":"array","items":{"type":"object","properties":{"ref":{"description":"The customer ref. Null for letters that named none.","type":["string","null"]},"name":{"type":["string","null"]},"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Letters posted in the month."},"second_class":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"first_class":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"extra_sheets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Sheets after the first, across the letters."},"credits":{"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":"Credits charged for the letters posted in the month."},"returned_credits":{"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":"Credits given back in the month, for letters declined, lapsed, cancelled or failed, whenever they were sent."}},"required":["ref","name","letters","second_class","first_class","extra_sheets","credits","returned_credits"],"additionalProperties":false},"description":"Most credits first."},"next_cursor":{"description":"Pass as cursor for the next page. Null at the end.","type":["string","null"]}},"required":["month","closed","closed_at","totals","customers","next_cursor"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers":{"post":{"operationId":"create_customer","summary":"Add a customer","description":"Adds a customer you send letters for, by your own ref. relationship says how it stands to you: own_letters (the letters are its own, from its own sender, which we confirm by a code we post to it) or platform_name (letters go in your name). A ref a letter already named is declared, keeping its letters. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","customer_exists","customer_ref_not_valid","customer_relationship_not_allowed","sender_required","address_not_found","customer_limit_reached","test_customer_in_live","test_customer_fixed"],"parameters":[{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."},"name":{"type":"string","minLength":1,"maxLength":200,"description":"The customer's name."},"relationship":{"type":"string","enum":["own_letters","platform_name","collects_debts"],"description":"collects_debts is always refused: Atomside does not send letters that collect debts."},"sender":{"description":"Its own sender. Needed for own_letters, refused otherwise.","type":"object","properties":{"name":{"type":"string","maxLength":100},"line1":{"type":"string","maxLength":100},"line2":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"town":{"type":"string","maxLength":60},"postcode":{"type":"string","maxLength":10}},"required":["name","line1","town","postcode"],"additionalProperties":false},"contact_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"description":"Where we may write to the customer about its sender. Never used for marketing."},"until_verified":{"type":"string","enum":["hold","platform_sender"],"description":"What its letters do before its sender is confirmed: wait (hold), or go from your own sender (platform_sender)."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"over_limit":{"description":"Over a limit: the letter waits for a person (ask), or is refused (refuse).","type":"string","enum":["ask","refuse"]},"per_recipient":{"description":"Letters for this customer to one person, in so many days. Replaces the agent's.","anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":1,"maximum":1000000},"per_days":{"type":"integer","minimum":1,"maximum":90}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}},"additionalProperties":false,"required":["ref","name","relationship"]}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}},"get":{"operationId":"list_customers","summary":"List customers","description":"Your customers, newest first, 50 at a time. state narrows it to one state; search matches the ref or the name. next_cursor and previous_cursor page forward and back. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"read","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended"],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}},"next_cursor":{"description":"Pass as cursor for the next page. Null at the end.","type":["string","null"]},"previous_cursor":{"description":"Pass as cursor for the page before, with the same state and search. Null on the first page.","type":["string","null"]}},"required":["customers","next_cursor","previous_cursor"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers/{customer}":{"get":{"operationId":"get_customer","summary":"Get a customer","description":"One customer by your ref: what it can do now (state), its sender, the limits that apply and what it has used today and this month. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"read","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","customer_not_found"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}},"patch":{"operationId":"update_customer","summary":"Change a customer","description":"Changes a customer's name, contact email, what its letters do before its sender is confirmed, or its relationship. Letters already kept stay kept. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","customer_not_found","customer_closed","test_customer_fixed","customer_relationship_not_allowed"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The customer's name."},"contact_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"description":"Where we may write to the customer about its sender. Never used for marketing."},"until_verified":{"type":"string","enum":["hold","platform_sender"],"description":"What its letters do before its sender is confirmed: wait (hold), or go from your own sender (platform_sender)."},"relationship":{"type":"string","enum":["own_letters","platform_name","collects_debts"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers/{customer}/limits":{"put":{"operationId":"set_customer_limits","summary":"Set a customer's limits","description":"Sets the customer's own limits: letters and credits a day and a month, what happens over one, and letters to one person. They count every agent of the workspace. A field left out keeps its value; null takes the limit off. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","customer_not_found","customer_closed","test_customer_fixed"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"over_limit":{"description":"Over a limit: the letter waits for a person (ask), or is refused (refuse).","type":"string","enum":["ask","refuse"]},"per_recipient":{"description":"Letters for this customer to one person, in so many days. Replaces the agent's.","anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":1,"maximum":1000000},"per_days":{"type":"integer","minimum":1,"maximum":90}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers/{customer}/pause":{"post":{"operationId":"pause_customer","summary":"Pause a customer","description":"Pauses a customer: its letters are refused customer_paused from every agent until it is resumed. Letters already on their way are not changed. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","customer_not_found","customer_closed","test_customer_fixed"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"description":"Kept in the activity log.","type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers/{customer}/resume":{"post":{"operationId":"resume_customer","summary":"Resume a customer","description":"Resumes a paused customer: its letters can be sent again. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","customer_not_found","customer_closed","test_customer_fixed"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"description":"Kept in the activity log.","type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers/{customer}/sender":{"post":{"operationId":"request_customer_sender","summary":"Ask for a customer's sender","description":"Gives the name and address a customer’s letters come from. We check the name, then post a code to that address; its letters print from it once the customer types the code. In test mode the code letter counts as posted at once and the code is 000000. Replaces a request still under way; a verified sender stays until the new one is verified. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","customer_not_found","customer_closed","customer_relationship_not_allowed","test_customer_fixed","address_not_found"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"The sender name as it should print."},"line1":{"type":"string","maxLength":100},"line2":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"town":{"type":"string","maxLength":60},"postcode":{"type":"string","maxLength":10},"contact_email":{"description":"Where we email the customer that its code is on its way. Never used for marketing.","anyOf":[{"type":"string","maxLength":254},{"type":"null"}]}},"additionalProperties":false,"required":["name","line1","town","postcode"]}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers/{customer}/sender/confirm":{"post":{"operationId":"confirm_customer_sender","summary":"Confirm a customer's sender","description":"Types the code from the letter we posted to the customer, for support staff who were given it. Right: its letters print from its own sender, and letters held for it go on (released_letters). Wrong: the answer says how many tries are left; after five a new code is posted, up to three letters. A code works once. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","customer_not_found","customer_sender_code_wrong","customer_sender_code_expired","customer_sender_not_waiting","customer_sender_code_limit"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$","description":"The six digits from the letter."}},"additionalProperties":false,"required":["code"]}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."},"released_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Letters that were held for the code and now go on."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test","released_letters"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers/{customer}/sender/resend":{"post":{"operationId":"resend_customer_sender_code","summary":"Post another code to a customer","description":"Posts a new code letter when the first has not arrived: the old code stops working. At most three letters, and not within five working days of the last (rate_limited says when). Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","customer_not_found","customer_sender_not_waiting","customer_sender_code_limit"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/approvals/{approval}/links":{"post":{"operationId":"create_approval_link","summary":"Make an approval link","description":"Makes a one-time link for your customer's own user to read a letter waiting for approval and approve or decline it, confirmed by a six-digit code we email to them. Only for a letter sent for a customer, and only when approval links are on in Brand and approvals. With \"Atomside sends it\" we email the link in your brand; otherwise show the url yourself. The link works for one decision, until expires_at. Takes an Idempotency-Key: a retry with the same key gives the same link and sends no second email. Asking again for the same approval and approver with a new key gives the same link too, while it works.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","approval_links_off","approval_not_waiting","approval_not_for_customer","customer_suspended","customer_closed","approval_link_gone","not_found"],"parameters":[{"name":"approval","in":"path","required":true,"schema":{"type":"string","description":"The approval, apr_…: details.approval.by_link.approval in the send_letter answer, approval.id (or approval.by_link.approval) on get_letter, or approval.id in the letter.waiting_for_approval event."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approver_email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Where we send the code (and the link, when Atomside sends it)."},"approver_name":{"description":"Their name, as the email greets them.","type":"string","minLength":1,"maxLength":100},"approver_ref":{"description":"Your own id for this user, kept with the decision.","type":"string","minLength":1,"maxLength":100}},"additionalProperties":false,"required":["approver_email"]}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The link, apl_…."},"url":{"type":"string","description":"The page that opens it. Shown once."},"expires_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))$"},"emailed":{"type":"boolean","description":"True when Atomside emailed the link to the approver."}},"required":["id","url","expires_at","emailed"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}},"/v1/customers/{customer}/close":{"post":{"operationId":"close_customer","summary":"Ask to close a customer","description":"Asks for a customer that has left you to be closed. Nothing changes yet: we email your account's owners a link, and an owner closes it in the console. Closing cancels its letters that have not gone, gives back their credits, refuses new ones with customer_closed, and then deletes its letters and addresses; its records of posting are kept and still check. You get customer.closed, then customer.data_deleted. Asking again changes nothing. Free.","x-atomside-scope":"customers:manage","x-atomside-permission":"Manage customers","x-atomside-effect":"write","x-atomside-refusals":["key_missing","key_not_valid","scope_missing","invalid_request","rate_limited","try_again_shortly","account_expired","connection_ended","idempotency_key_reused","request_in_progress","customer_not_found","customer_closed","test_customer_fixed"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Your ref for the customer: letters, digits and . _ : - only, up to 64."}},{"name":"Atomside-Version","in":"header","required":false,"description":"A dated API version. Leave it out to use the version your key is pinned to (the newest when the key was made). Every answer names the version it used in the same header.","schema":{"type":"string","enum":["2026-11-15","2026-11-16","2026-11-17","2026-11-24"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Your own unique key for this call, up to 255 printable characters. A retry with the same key and the same parameters returns the first answer and does nothing new. Keys are kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The customer (cus_…)."},"ref":{"type":"string","description":"Your ref for the customer."},"name":{"type":["string","null"]},"relationship":{"anyOf":[{"type":"string","enum":["own_letters","platform_name"]},{"type":"null"}],"description":"Null for a customer only ever named on a letter, never declared."},"state":{"type":"string","enum":["sending","sending_platform_sender","waiting_on_sender","held","paused","suspended","closed"]},"until_verified":{"type":"string","enum":["hold","platform_sender"]},"contact_email":{"type":["string","null"]},"sender":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["being_checked","not_accepted","code_posted","verified"]},"name":{"type":"string"},"address_line":{"type":"string","description":"The address on one line, as it prints."},"posted_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"}]},"expires_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"}]},"attempts_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"letters_sent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"verified_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"}]}},"required":["state","name","address_line","posted_at","expires_at","attempts_left","letters_sent","verified_at"],"additionalProperties":false},{"type":"null"}],"description":"Null for a customer that has no sender of its own."},"limits":{"type":"object","properties":{"per_day_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_day_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_letters":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_month_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"over_limit":{"type":"string","enum":["ask","refuse"]},"per_recipient":{"anyOf":[{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","per_days"],"additionalProperties":false},{"type":"null"}]},"applies":{"type":"array","items":{"type":"string"},"description":"The limits that apply to the next letter, in words, customer first."}},"required":["per_day_letters","per_day_credits","per_month_letters","per_month_credits","over_limit","per_recipient","applies"],"additionalProperties":false},"used":{"type":"object","properties":{"today":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false},"month":{"type":"object","properties":{"letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["letters","credits"],"additionalProperties":false}},"required":["today","month"],"additionalProperties":false},"held_letters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_via":{"type":"string","enum":["letter","api","console","import","test"]},"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))$"},"paused_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"}]},"suspended":{"anyOf":[{"type":"object","properties":{"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))$"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}]},"close_requested_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"}]},"closed_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"}]},"test":{"type":"boolean","description":"True for a test customer (cust_test_…), which always does one thing."}},"required":["id","ref","name","relationship","state","until_verified","contact_email","sender","limits","used","held_letters","created_via","created_at","paused_at","suspended","close_requested_at","closed_at","test"],"additionalProperties":false}}}},"default":{"description":"A refusal. The code says why; say is the sentence for the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}}}}}}}