Retry delivery to one recipient
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/messages/v2-messages-recipients-retry.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
PUT/
Sends the message again to one recipient whose delivery failed. The resend is queued: the response is empty, and the recipient's status updates as delivery happens.
Business rules
- The recipient's delivery must have failed (
dispatch_failedordelivery_failed). While a retry is in progress its status ispending, and a second retry is refused. - Emails can be retried only while YoPrint still keeps the original send, normally 7 days. A text needs the phone number it was sent to.
- It works on a recipient of a message that otherwise can't be retried as a whole.
Side effects
- Sends the email, or the text through your team's Twilio account, to the same address or number as before.
- When an email sent through YoPrint's tracked email delivery fails again, the creator of the order or purchase order gets another delivery failure email.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The message's
id, from the message list. A hash id; unique keys and document numbers are refused with 404.- Example
u7HKhdhT6tkEUy
- Example
The recipient's
id, from the recipient list, not the participant id. A hash id; unique keys and document numbers are refused with 404.- Example
XWwTVKIZSuUOcX
- Example
Request body
application/json, optional.
external_integration_idstringOptional. A texting integration id of your team. It does not change which account sends today: texts go through the message's own or your team's active Twilio integration.
Response
200Successful response.
Errors
401The API key is missing or wrong (
unauthenticated).403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.- When
- The message is on a sales order or quote you can't message (
user_is_not_authorized). - Fix
- Ask a team admin for permission to message that order.
404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.- When
- The message or the recipient does not exist on this team, or
external_integration_idmatches no integration of your team. - Fix
- Use a recipient
idfrom the recipient list.
422The request was refused and changed nothing.
validation_failedlists what to fix inerror.fields; other codes name a business rule, explained inerror.message. A few checks answer with only{"message": "..."}. An operation that calls another service (a payment provider, a carrier, an accounting app) can answerconnect_timeout("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.- When
external_integration_idis not a valid id (validation_failed;error.fieldsnames the field). Checked first.- Fix
- Leave it out.
- When
- This recipient can't be retried: it did not fail, a retry is in progress, the email is past the 7 days, or YoPrint no longer keeps the original (
message_not_retryable, "Message is not retryable"). - Fix
- Send a new message instead.
500A business rule refused the request (see the operation's errors), or something failed inside YoPrint. Refusals use the error envelope with a code such as
action_not_allowed; an unexpected failure answers{"message": "Server Error"}. Repeating a refusal gets the same answer; after an unexpected failure, read the record back before you retry a change.- When
- It is a text message and your team has no active Twilio integration: a server error, not a 422. Nothing is queued.
- Fix
- Connect Twilio again in the web app, then retry.
Notes
- A
200means the resend was queued, not that it was delivered. Read the recipient again to see the outcome. - If YoPrint can no longer read its stored copy of the message, the call still answers
200, but nothing is sent and the recipients stay failed. Instead,latest_error_reasonchanges on every failed recipient (on the one-recipient retry, on that recipient only): topostmark_retry_mailable_unavailablefor an email sent through YoPrint's tracked email delivery (a message of version 3 or with a dispatch id, or, on the one-recipient retry, a recipient with a tracked send attempt), otherwise tomailable_serialization_failed, for example for older emails and for texts. Read the recipients after a retry.
Related
- PUTRetry a message's failed deliveries
/v2/ api/ store/ {team_slug}/ messages/ {hash_id}/ retry - GETGet one recipient of a message
/v2/ api/ store/ {team_slug}/ messages/ {hash_id}/ recipients/ {id}
