trash nothing
  1. messages
trash nothing
  • messages
    • List conversations
      GET
    • Mark all conversations as read
      PUT
    • Search conversations
      GET
    • Delete conversation
      DELETE
    • Archive conversation
      PUT
    • Block conversation
      PUT
    • Mark conversation as read
      PUT
    • List conversation messages
      GET
    • Reply to conversation
      POST
    • Report conversation
      POST
    • Unarchive conversation
      PUT
    • Unblock conversation
      PUT
  • misc
    • Send feedback
      POST
  • groups
    • Search groups
      GET
    • Retrieve multiple groups
      GET
    • Join groups
      POST
    • Retrieve a group
      GET
    • Submit group answers
      POST
    • Contact group moderators
      POST
    • Leave a group
      POST
  • photos
    • Create a photo
      POST
    • Retrieve multiple photos
      GET
    • Delete a photo
      DELETE
    • Rotate a photo
      POST
  • posts
    • List posts
      GET
    • Submit a post
      POST
    • List all posts
      GET
    • List all post changes
      GET
    • Retrieve client.js
      GET
    • Retrieve multiple posts
      GET
    • Search posts
      GET
    • Retrieve a post
      GET
    • Update a post
      PUT
    • Delete a post bookmark
      DELETE
    • Bookmark a post
      PUT
    • Retrieve post display data
      GET
    • Flag a post
      POST
    • Map a post
      PUT
    • Promise an offer post
      PUT
    • Reply to a post
      POST
    • Satisfy a post
      PUT
    • Share a post
      POST
    • Unpromise an offer post
      PUT
    • Withdraw a post
      PUT
  • stories
    • List stories
    • Submit a story
    • Retrieve a story
    • Like a story
    • Unlike a story
    • Record story viewed
  • users
    • Retrieve current user
    • Update current user
    • List current users' email alerts
    • Create an email alert
    • Delete an email alert
    • Change email address
    • Set users' email address as not bouncing
    • List current users' groups
    • Update location
    • List current users' group notices
    • List current users' post locations
    • Save a post location for the current user
    • List current users' posts
    • Search current users' posts
    • Set a profile image
    • List current users' profile images
    • Resend account verification email
    • Send password reset email
    • Report a user
    • Retrieve a user
    • Retrieve user display info
    • Submit feedback on a user
    • List posts by a user
    • Search posts by a user
    • Retrieve a users' profile image
  1. messages

List conversation messages

GET
/conversations/{conversation_id}/messages
messages
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://trashnothing.com/api/v1.2/conversations//messages'
Response Response Example
200 - Example 1
{
    "conversation": {
        "archived": false,
        "blocked": false,
        "conversation_id": 38914,
        "last_message_date": "2019-07-24T22:51:09",
        "messages": [
            {
                "content": "Here are some photos and the directions for pick up.",
                "date": "2019-07-24T22:29:10",
                "email_attachments": [
                    "Directions and map.pdf"
                ],
                "from_user_id": 2946512,
                "message_id": 10199633,
                "photos": [
                    {
                        "images": [
                            {
                                "height": 120,
                                "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
                                "width": 90
                            },
                            {
                                "height": 240,
                                "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.180x240.jpg",
                                "width": 180
                            },
                            {
                                "height": 360,
                                "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.270x360.jpg",
                                "width": 270
                            },
                            {
                                "height": 500,
                                "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg",
                                "width": 375
                            }
                        ],
                        "photo_id": "695624-768616",
                        "thumbnail": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
                        "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg"
                    }
                ],
                "subject": "Dining Table and 4 Chairs",
                "to_user_id": 119458
            }
        ],
        "num_unread_messages": 1,
        "user": {
            "about_me": "Just an old fisherman looking to reuse more.",
            "country": "GB",
            "firstname": null,
            "lastname": null,
            "member_since": "2017-01-27T06:35:55",
            "profile_image": "https://lh3.googleusercontent.com/-1qVLzuOCyYg/AAAAAAAAAAI/AAAAAAAAAAA/0aGNzRAO61c/s64-c/100783935580725962164.jpg",
            "user_id": 2946512,
            "username": "fred gibson"
        }
    },
    "messages": [
        {
            "content": "Here are some photos and the directions for pick up.",
            "date": "2019-07-24T22:29:10",
            "email_attachments": [
                "Directions and map.pdf"
            ],
            "from_user_id": 2946512,
            "message_id": 10199633,
            "photos": [
                {
                    "images": [
                        {
                            "height": 120,
                            "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
                            "width": 90
                        },
                        {
                            "height": 240,
                            "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.180x240.jpg",
                            "width": 180
                        },
                        {
                            "height": 360,
                            "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.270x360.jpg",
                            "width": 270
                        },
                        {
                            "height": 500,
                            "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg",
                            "width": 375
                        }
                    ],
                    "photo_id": "695624-768616",
                    "thumbnail": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
                    "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg"
                }
            ],
            "subject": "Dining Table and 4 Chairs",
            "to_user_id": 119458
        }
    ],
    "page": 0,
    "per_page": 0
}

Request

Path Params
conversation_id
string 
required
The ID of the conversation to return messages from.
Query Params
page
integer 
optional
The page of messages to return.
per_page
integer 
optional

The number of messages to return per page (must be >= 1 and <= 30).

device_pixel_ratio
number 
optional
Client device pixel ratio used to determine thumbnail size (default 1.0).
include_conversation
integer 
optional
If set to 1, the conversation will be returned along with the messages.

Responses

🟢200The messages and page data. The conversation data is optional and is only returned if the include_conversation parameter is set.
application/json
Body
conversation
object (Conversation) 
optional
A conversation between the current user and another user.
Example:
{"archived":false,"blocked":false,"conversation_id":38914,"last_message_date":"2019-07-24T22:51:09","messages":[{"content":"Here are some photos and the directions for pick up.","date":"2019-07-24T22:29:10","email_attachments":["Directions and map.pdf"],"from_user_id":2946512,"message_id":10199633,"photos":[{"images":[{"height":120,"url":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg","width":90},{"height":240,"url":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.180x240.jpg","width":180},{"height":360,"url":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.270x360.jpg","width":270},{"height":500,"url":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg","width":375}],"photo_id":"695624-768616","thumbnail":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg","url":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg"}],"subject":"Dining Table and 4 Chairs","to_user_id":119458}],"num_unread_messages":1,"user":{"about_me":"Just an old fisherman looking to reuse more.","country":"GB","firstname":null,"lastname":null,"member_since":"2017-01-27T06:35:55","profile_image":"https://lh3.googleusercontent.com/-1qVLzuOCyYg/AAAAAAAAAAI/AAAAAAAAAAA/0aGNzRAO61c/s64-c/100783935580725962164.jpg","user_id":2946512,"username":"fred gibson"}}
archived
boolean 
optional
Whether or not this conversation is archived.
blocked
boolean 
optional
Whether or not this conversation is blocked.
conversation_id
string 
optional
last_message_date
string <date-time>
optional
The UTC date and time of the last message in this conversation.
messages
array[object (Message) {8}] 
optional
The latest messages in this conversation.
num_unread_messages
integer 
optional
The count of how many unread messages this conversation has.
user
object (User) 
optional
Example:
{"about_me":"Just an old fisherman looking to reuse more.","country":"GB","feedback":{"percent_positive":87.5,"restriction":"no-recent-messages","score":7},"firstname":null,"lastname":null,"member_since":"2017-01-27T06:35:55","profile_image":"https://lh3.googleusercontent.com/-1qVLzuOCyYg/AAAAAAAAAAI/AAAAAAAAAAA/0aGNzRAO61c/s64-c/100783935580725962164.jpg","reply_time":4850,"user_id":2946512,"username":"fred gibson"}
messages
array[object (Message) {8}] 
optional
content
string 
optional
The content of the message.
date
string <date-time>
optional
The UTC date and time when the message was sent.
email_attachments
array[string]
optional
Every message a user receives is made available via the API and is sent to the user by email. Some messages may contain unsupported attachments that are not available by the API but are emailed to the user (eg. documents, videos, zip files). The email_attachments field provides the names of all the unsupported attachments that were emailed to the user (will be null if there are no unsupported attachments).
from_user_id
string 
optional
The ID of the user that sent the message (the sender).
message_id
string 
optional
photos
array[object (Photo) {5}] 
optional
Details about the photos associated with this message (may be null if there are no photos).
subject
string 
optional
Because many messages are received by email, all messages have a subject. The subject is often useful to allow the recipient to determine which post a message may be referring to. In rare cases, some senders send emails with a subject and but no email body which causes the message content to be an empty string.
to_user_id
string 
optional
The ID of the user that received the message (the recipient).
page
integer 
optional
per_page
integer 
optional
🟠400Invalid parameters.
🟠403The user doesn't have permission to access the conversation.
🟠404Conversation not found.
Modified at 2022-09-11 18:59:47
Previous
Mark conversation as read
Next
Reply to conversation
Built with