curl --request POST \
--url https://api.posta.co/letters \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"sender": {
"address": {
"addressLine1": "1900 Reston Metro Plz",
"urbanization": "<string>",
"addressLine2": "Ste 600",
"city": "Reston",
"state": "VA",
"zipCode": "20190",
"plus4Code": "5952"
},
"individual": {
"fullName": "TODO",
"prefix": "TODO",
"firstName": "TODO",
"middleName": "TODO",
"lastName": "TODO",
"postfix": "TODO",
"title": "TODO"
},
"organization": "Veezla, Inc."
},
"recipient": {
"address": {
"addressLine1": "1900 Reston Metro Plz",
"urbanization": "<string>",
"addressLine2": "Ste 600",
"city": "Reston",
"state": "VA",
"zipCode": "20190",
"plus4Code": "5952"
},
"nonAddressData": "<string>",
"individual": {
"fullName": "TODO",
"prefix": "TODO",
"firstName": "TODO",
"middleName": "TODO",
"lastName": "TODO",
"postfix": "TODO",
"title": "TODO"
},
"organization": "Posta Customer, Inc."
},
"content": {
"type": "asset",
"assetId": "ast_1234567890abcdef"
},
"useType": "marketing"
}
'{
"id": "ltr_9a32a8b5a96c880c",
"status": "queued",
"sender": {
"address": {
"addressLine1": "1900 Reston Metro Plz",
"addressLine2": "Ste 600",
"lastLine": "Reston, VA 20194-5952"
},
"individual": {
"fullName": "TODO",
"prefix": "TODO",
"firstName": "TODO",
"middleName": "TODO",
"lastName": "TODO",
"postfix": "TODO",
"title": "TODO"
},
"organization": "Veezla, Inc.",
"addressComponents": {
"cassType": "none",
"urbanization": "TODO",
"city": "TODO",
"state": "TODO",
"zipCode": "TODO",
"plus4Code": "TODO"
},
"addressAnalysis": {
"dpvMatchCode": "TODO",
"dpvFootnotes": [
"TODO"
],
"dpvCmra": "TODO",
"dpvVacant": "TODO",
"dpvNoStat": "TODO",
"dpvActive": "TODO",
"dpvInactiveReason": "TODO",
"dpvThrowback": "TODO",
"dpvNonDeliveryDayIndicator": "TODO",
"dpvNonDeliveryDayValues": "TODO",
"dpvNoSecureLocation": "TODO",
"dpvDoorNotAccessible": "TODO",
"lacslinkCode": "TODO",
"lacslinkIndicator": "TODO",
"suitelinkIndicator": "TODO",
"ewsIndicator": true
},
"addressCorrections": [
{
"name": "TODO",
"input": "TODO",
"corrected": "TODO"
}
],
"addressMetadata": {
"recordType": "TODO",
"addressType": "TODO",
"zipCodeType": "TODO",
"county": "TODO",
"countyFips": "TODO",
"carrierRoute": "TODO",
"carrierRouteType": "TODO",
"congressionalDistrict": "TODO",
"defaultBuildingAddress": true,
"elotSequence": "TODO",
"elotSort": "TODO",
"latitude": 0,
"longitude": 0,
"precision": "TODO",
"uspsFinanceNumber": "TODO",
"timeZone": "TODO"
}
},
"recipient": {
"address": {
"addressLine1": "1900 Reston Metro Plz",
"addressLine2": "Ste 600",
"lastLine": "Reston, VA 20194-5952"
},
"nonAddressData": "<string>",
"individual": {
"fullName": "TODO",
"prefix": "TODO",
"firstName": "TODO",
"middleName": "TODO",
"lastName": "TODO",
"postfix": "TODO",
"title": "TODO"
},
"organization": "Posta Customer, Inc.",
"addressComponents": {
"cassType": "none",
"urbanization": "TODO",
"city": "TODO",
"state": "TODO",
"zipCode": "TODO",
"plus4Code": "TODO"
},
"addressAnalysis": {
"dpvMatchCode": "TODO",
"dpvFootnotes": [
"TODO"
],
"dpvCmra": "TODO",
"dpvVacant": "TODO",
"dpvNoStat": "TODO",
"dpvActive": "TODO",
"dpvInactiveReason": "TODO",
"dpvThrowback": "TODO",
"dpvNonDeliveryDayIndicator": "TODO",
"dpvNonDeliveryDayValues": "TODO",
"dpvNoSecureLocation": "TODO",
"dpvDoorNotAccessible": "TODO",
"lacslinkCode": "TODO",
"lacslinkIndicator": "TODO",
"suitelinkIndicator": "TODO",
"ewsIndicator": true
},
"addressCorrections": [
{
"name": "TODO",
"input": "TODO",
"corrected": "TODO"
}
],
"addressMetadata": {
"recordType": "TODO",
"addressType": "TODO",
"zipCodeType": "TODO",
"county": "TODO",
"countyFips": "TODO",
"carrierRoute": "TODO",
"carrierRouteType": "TODO",
"congressionalDistrict": "TODO",
"defaultBuildingAddress": true,
"elotSequence": "TODO",
"elotSort": "TODO",
"latitude": 0,
"longitude": 0,
"precision": "TODO",
"uspsFinanceNumber": "TODO",
"timeZone": "TODO"
}
},
"content": {
"type": "asset",
"assetId": "ast_1234567890abcdef",
"assetVersionId": "astv_1234567890abcdef"
},
"useType": "marketing",
"events": [
{
"id": "evt_1234567890abcdef",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z",
"type": "tracking",
"status": "inTransit",
"trackingEventDetails": {
"notes": "TODO",
"facility": "TODO",
"facilityType": "TODO",
"facilityZip": "TODO",
"additionalData": {}
},
"timestamp": "2023-11-07T05:31:56Z",
"description": "TODO",
"operationCode": "TODO",
"actionRequired": true,
"location": "TODO"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z",
"externalId": "0013i00002YyVvSAAV",
"sendDate": "2023-12-25",
"description": "Compliance notice",
"url": "https://api.posta.co/letters/ltr_9a32a8b5a96c880c/download",
"variables": [
{
"name": "customerName",
"value": "John Doe"
}
],
"options": {
"print": {
"color": true
},
"mail": {
"service": "firstClass",
"extraServices": [
"acs"
]
},
"variableHandling": {
"validationScope": "asset"
},
"addressProcessing": {
"cassSender": {
"type": "basic",
"casing": "proper"
},
"cassRecipient": {
"type": "basic",
"casing": "proper"
},
"ncoaRecipient": "newAddress"
},
"deliverabilityThreshold": "normal",
"deliverabilityValues": [
"deliverable"
]
},
"issueMessage": "Recipient address could not be validated",
"metadata": [
{
"key": "salesforceId",
"value": "0013i00002YyVvSAAV"
}
]
}Create a new letter.
curl --request POST \
--url https://api.posta.co/letters \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"sender": {
"address": {
"addressLine1": "1900 Reston Metro Plz",
"urbanization": "<string>",
"addressLine2": "Ste 600",
"city": "Reston",
"state": "VA",
"zipCode": "20190",
"plus4Code": "5952"
},
"individual": {
"fullName": "TODO",
"prefix": "TODO",
"firstName": "TODO",
"middleName": "TODO",
"lastName": "TODO",
"postfix": "TODO",
"title": "TODO"
},
"organization": "Veezla, Inc."
},
"recipient": {
"address": {
"addressLine1": "1900 Reston Metro Plz",
"urbanization": "<string>",
"addressLine2": "Ste 600",
"city": "Reston",
"state": "VA",
"zipCode": "20190",
"plus4Code": "5952"
},
"nonAddressData": "<string>",
"individual": {
"fullName": "TODO",
"prefix": "TODO",
"firstName": "TODO",
"middleName": "TODO",
"lastName": "TODO",
"postfix": "TODO",
"title": "TODO"
},
"organization": "Posta Customer, Inc."
},
"content": {
"type": "asset",
"assetId": "ast_1234567890abcdef"
},
"useType": "marketing"
}
'{
"id": "ltr_9a32a8b5a96c880c",
"status": "queued",
"sender": {
"address": {
"addressLine1": "1900 Reston Metro Plz",
"addressLine2": "Ste 600",
"lastLine": "Reston, VA 20194-5952"
},
"individual": {
"fullName": "TODO",
"prefix": "TODO",
"firstName": "TODO",
"middleName": "TODO",
"lastName": "TODO",
"postfix": "TODO",
"title": "TODO"
},
"organization": "Veezla, Inc.",
"addressComponents": {
"cassType": "none",
"urbanization": "TODO",
"city": "TODO",
"state": "TODO",
"zipCode": "TODO",
"plus4Code": "TODO"
},
"addressAnalysis": {
"dpvMatchCode": "TODO",
"dpvFootnotes": [
"TODO"
],
"dpvCmra": "TODO",
"dpvVacant": "TODO",
"dpvNoStat": "TODO",
"dpvActive": "TODO",
"dpvInactiveReason": "TODO",
"dpvThrowback": "TODO",
"dpvNonDeliveryDayIndicator": "TODO",
"dpvNonDeliveryDayValues": "TODO",
"dpvNoSecureLocation": "TODO",
"dpvDoorNotAccessible": "TODO",
"lacslinkCode": "TODO",
"lacslinkIndicator": "TODO",
"suitelinkIndicator": "TODO",
"ewsIndicator": true
},
"addressCorrections": [
{
"name": "TODO",
"input": "TODO",
"corrected": "TODO"
}
],
"addressMetadata": {
"recordType": "TODO",
"addressType": "TODO",
"zipCodeType": "TODO",
"county": "TODO",
"countyFips": "TODO",
"carrierRoute": "TODO",
"carrierRouteType": "TODO",
"congressionalDistrict": "TODO",
"defaultBuildingAddress": true,
"elotSequence": "TODO",
"elotSort": "TODO",
"latitude": 0,
"longitude": 0,
"precision": "TODO",
"uspsFinanceNumber": "TODO",
"timeZone": "TODO"
}
},
"recipient": {
"address": {
"addressLine1": "1900 Reston Metro Plz",
"addressLine2": "Ste 600",
"lastLine": "Reston, VA 20194-5952"
},
"nonAddressData": "<string>",
"individual": {
"fullName": "TODO",
"prefix": "TODO",
"firstName": "TODO",
"middleName": "TODO",
"lastName": "TODO",
"postfix": "TODO",
"title": "TODO"
},
"organization": "Posta Customer, Inc.",
"addressComponents": {
"cassType": "none",
"urbanization": "TODO",
"city": "TODO",
"state": "TODO",
"zipCode": "TODO",
"plus4Code": "TODO"
},
"addressAnalysis": {
"dpvMatchCode": "TODO",
"dpvFootnotes": [
"TODO"
],
"dpvCmra": "TODO",
"dpvVacant": "TODO",
"dpvNoStat": "TODO",
"dpvActive": "TODO",
"dpvInactiveReason": "TODO",
"dpvThrowback": "TODO",
"dpvNonDeliveryDayIndicator": "TODO",
"dpvNonDeliveryDayValues": "TODO",
"dpvNoSecureLocation": "TODO",
"dpvDoorNotAccessible": "TODO",
"lacslinkCode": "TODO",
"lacslinkIndicator": "TODO",
"suitelinkIndicator": "TODO",
"ewsIndicator": true
},
"addressCorrections": [
{
"name": "TODO",
"input": "TODO",
"corrected": "TODO"
}
],
"addressMetadata": {
"recordType": "TODO",
"addressType": "TODO",
"zipCodeType": "TODO",
"county": "TODO",
"countyFips": "TODO",
"carrierRoute": "TODO",
"carrierRouteType": "TODO",
"congressionalDistrict": "TODO",
"defaultBuildingAddress": true,
"elotSequence": "TODO",
"elotSort": "TODO",
"latitude": 0,
"longitude": 0,
"precision": "TODO",
"uspsFinanceNumber": "TODO",
"timeZone": "TODO"
}
},
"content": {
"type": "asset",
"assetId": "ast_1234567890abcdef",
"assetVersionId": "astv_1234567890abcdef"
},
"useType": "marketing",
"events": [
{
"id": "evt_1234567890abcdef",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z",
"type": "tracking",
"status": "inTransit",
"trackingEventDetails": {
"notes": "TODO",
"facility": "TODO",
"facilityType": "TODO",
"facilityZip": "TODO",
"additionalData": {}
},
"timestamp": "2023-11-07T05:31:56Z",
"description": "TODO",
"operationCode": "TODO",
"actionRequired": true,
"location": "TODO"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z",
"externalId": "0013i00002YyVvSAAV",
"sendDate": "2023-12-25",
"description": "Compliance notice",
"url": "https://api.posta.co/letters/ltr_9a32a8b5a96c880c/download",
"variables": [
{
"name": "customerName",
"value": "John Doe"
}
],
"options": {
"print": {
"color": true
},
"mail": {
"service": "firstClass",
"extraServices": [
"acs"
]
},
"variableHandling": {
"validationScope": "asset"
},
"addressProcessing": {
"cassSender": {
"type": "basic",
"casing": "proper"
},
"cassRecipient": {
"type": "basic",
"casing": "proper"
},
"ncoaRecipient": "newAddress"
},
"deliverabilityThreshold": "normal",
"deliverabilityValues": [
"deliverable"
]
},
"issueMessage": "Recipient address could not be validated",
"metadata": [
{
"key": "salesforceId",
"value": "0013i00002YyVvSAAV"
}
]
}Unique idempotency key for each request (e.g., V4 UUID).
A letter.
An object containing the sender's information for the letter. It must include:
Either an individual object, an organization string, or both.
individual is provided, it can contain either a fullName string or name components (at minimum firstName and lastName).fullName and name components are provided, fullName will be used for addressing.An address object with the sender's complete address details.
This information is used to populate the return address on the letter. Ensure all provided details are accurate to facilitate any potential return mail handling.
Show child attributes
Recipient information for the letter. Either individual or organization is required; both can be provided. For accurate NCOA processing, provide name components when available.
Show child attributes
Content of the letter.
Show child attributes
Indicates the letter's purpose: 'marketing' or 'transactional'. Affects eligibility for USPS promotions and sales tax compliance.
marketing, transactional "marketing"
Optional client-defined identifier for referencing this letter in external systems. Not used by Posta for processing.
99999"0013i00002YyVvSAAV"
Specifies the Send Date in ISO 8601 format (YYYY-MM-DD). Time portion, if provided, is ignored.
If omitted:
If specified:
Daily cutoff: 10 am ET on production days (Monday - Friday, exluding national holidays)
Note: All letters are cancelable on or before the Send Date's daily cutoff.
Example: 2023-08-15
Optional description for internal reference. Does not affect processing or delievery.
99999"Compliance notice"
Key-value pairs for personalizing letter content when using handlebars in HTML content.
128Show child attributes
Customization options for letter production and delivery, including:
Defaults apply if not specified. See Option documentation for details.
Note: Some options may affect pricing or production time.
Show child attributes
A key-value store for custom metadata.
Limitations:
Show child attributes
The request has succeeded and a new resource has been created as a result
A letter.
A unique identifier for the letter, prefixed with ltr_. Use this ID to retrieve, update, or delete the letter.
1 - 99999"ltr_9a32a8b5a96c880c"
Represents the current status of a letter in the mailing process:
queued: Awaiting processingready: Processed and ready for printinginProduction: Being printed and prepared for mailingmailed: Handed off to postal service for deliveryissue: Problem that needs addressingcanceled: Letter will not be mailedqueued, ready, inProduction, mailed, issue, canceled "queued"
An object containing the sender's information for the letter. It must include:
Either an individual object, an organization string, or both.
individual is provided, it can contain either a fullName string or name components (at minimum firstName and lastName).fullName and name components are provided, fullName will be used for addressing.An address object with the sender's complete address details.
This information is used to populate the return address on the letter. Ensure all provided details are accurate to facilitate any potential return mail handling.
Show child attributes
Recipient information for the letter. Either individual or organization is required; both can be provided. For accurate NCOA processing, provide name components when available.
Show child attributes
Content of the letter.
Show child attributes
Indicates the letter's purpose: 'marketing' or 'transactional'. Affects eligibility for USPS promotions and sales tax compliance.
marketing, transactional "marketing"
Array of events in the letter's lifecycle.
999Represents a lifecycle event for a letter.
Show child attributes
The timestamp the resource was created at (UTC).
The timestamp the resource was last modified at (UTC).
Optional client-defined identifier for referencing this letter in external systems. Not used by Posta for processing.
99999"0013i00002YyVvSAAV"
Specifies the Send Date in ISO 8601 format (YYYY-MM-DD). Time portion, if provided, is ignored.
If omitted:
If specified:
Daily cutoff: 10 am ET on production days (Monday - Friday, exluding national holidays)
Note: All letters are cancelable on or before the Send Date's daily cutoff.
Example: 2023-08-15
Optional description for internal reference. Does not affect processing or delievery.
99999"Compliance notice"
Temporary URL to download the rendered letter PDF. Expires after a set period.
99999"https://api.posta.co/letters/ltr_9a32a8b5a96c880c/download"
Key-value pairs for personalizing letter content when using handlebars in HTML content.
128Show child attributes
Customization options for letter production and delivery, including:
Defaults apply if not specified. See Option documentation for details.
Note: Some options may affect pricing or production time.
Show child attributes
Human-readable description of any issues encountered with the letter.
99999"Recipient address could not be validated"
A key-value store for custom metadata.
Limitations:
Show child attributes