Send letter
send_letterSend physical letters or faxes through PixelLetter by providing documents as file paths or plain text with recipient address. Use test mode to verify without actual dispatch.
Instructions
Sends a letter through PixelLetter, either as ready made documents (absolute file paths, PDF preferred) or as plain text plus a recipient address that PixelLetter typesets. Optionally faxes the same document as well. Returns the result code and the transaction id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Letter text as plain text, no HTML. Long texts run onto more pages automatically, your sender address is added by PixelLetter. "%Unterschrift%" on its own line inserts the signature stored in your PixelLetter account. | |
| files | No | Absolute paths of the documents to send, for example the PDF written by pdf-letter-mcp. Several files are converted and merged into one letter, in this order. Allowed: .pdf, .doc, .xls, .ppt, .rtf, .wpd, .psd, and PDF is the only type that always works. | |
| duplex | No | Print on both sides (true, the default of PixelLetter) or on one side only (false, sent as control NODUPLEX). Letters only. | |
| address | No | Recipient address, one line per array entry, country included. PixelLetter typesets it. Required when no file is sent. | |
| control | No | Raw value for the control field of the interface. The only value in public use is NODUPLEX, which the duplex parameter sets for you, so only reach for this when PixelLetter gave you another token. | |
| goGreen | No | GoGreen, CO2 neutral postage (addoption 44). Letters only. | |
| subject | No | Subject of the letter. | |
| location | No | Dispatch centre: 1 = Munich (DE), 2 = Hausleiten near Vienna (AT), 3 = Hamburg (DE). Default of the API is 1. | |
| testMode | Yes | Test mode. true runs the order exactly like a real one but PixelLetter never prints, never sends and never charges. false really sends the letter. Always required, so nothing goes out by accident. | |
| faxNumber | No | Fax number in international format, for example "+49 89 72448483". Only needed with alsoSendFax. | |
| colorPrint | No | Colour print instead of black and white (addoption 33). Letters only, and not available through every dispatch centre, see error 038. | |
| registered | No | Einschreiben, registered mail (code 27). Germany only. | |
| alsoSendFax | No | Send the same document as a fax too. Needs faxNumber. Additional services stay letter only. | |
| destination | No | Destination country as a two letter ISO code, for example DE, AT, CH. Mandatory for letters, a wrong code leads to wrong postage. | |
| inlineFiles | No | Documents passed as base64 instead of a path. | |
| transaction | No | Your own transaction id or short note. PixelLetter returns it with the response. | |
| returnAddress | No | Raw value for the returnaddress field of the interface. Undocumented in the public handbooks. | |
| returnReceipt | No | Rückschein, return receipt (code 28). Only together with registered. | |
| cashOnDelivery | No | Bank details for cash on delivery. Setting this block adds additional service 31. | |
| personalDelivery | No | Eigenhändig, personal delivery (code 29). Only together with registered. | |
| registeredDropIn | No | Einschreiben Einwurf, drop-in registered mail (code 30). Cannot be combined with the other registered variants. | |
| additionalServiceCodes | No | Raw addoption codes for services PixelLetter documents elsewhere or agrees per account. Only use numbers PixelLetter gave you. |