Skip to content

List a message's recipients

Open .md

GET/v2/api/store/{team_slug}/messages/{hash_id}/recipients

v2Operation ID v2_public_messages_recipients_index

Lists everyone a message was sent to, with how delivery went for each: the address or number it went to at the time, the channel (email or sms), the status, and the provider's error when it failed. All of them, not paged.

Permission

Any member can read purchase order messages. For sales order and quote messages you need permission to message all orders, or only the orders you created or are assigned to. The team owner sees everything.

Path parameters

  • team_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team
  • hash_idstringrequired

    The message's id, from the message list. A hash id; unique keys and document numbers are refused with 404.

    • Example u7HKhdhT6tkEUy

Request body

This operation takes no request body.

Response

200Successful response.

  • dataarray of objectsrequired
    Fields of each item (13)
    • callback_error_codestring | null

      The provider's error code, when delivery failed: for emails the bounce type, such as HardBounce; for texts Twilio's error code.

    • The provider's details.

    • channelstring | null
      • One of: "email", "sms"
    • delivery_statestring | null

      From the provider's report. Null for older messages.

      • One of: "pending", "sending", "sent", "delivered", "failed", "unknown"
    • destinationstring | null

      Where it was sent: the email address or phone number at sending time.

    • destination_namestring | null
    • idstring

      The recipient (delivery) id.

    • latest_error_reasonstring | null

      Why it failed, in words: the provider's description, or YoPrint's own reason, such as missing_delivery_destination, mailable_serialization_failed or postmark_retry_mailable_unavailable (see the retry operations).

    • participantobject | null

      The participant it went to. Its delivery_* fields are null; read them from this recipient.

      Child fields (24)
    • recipient_emailstring | null

      The address, for an email recipient.

    • recipient_phonestring | null

      The number, for a text recipient.

    • statusstring

      pending also while a retry is in progress.

      • One of: "pending", "dispatched", "dispatch_failed", "delivered", "delivery_failed"
    • versioninteger

      The record's tracking format: 1, then 2 once the email or text provider has reported on it. Not the message's version.

  • statusintegerrequired
  • successbooleanrequired

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, with unauthorized or user_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
    No message of this team has this id.
    Fix
    Use an id from the message list.