APIHub
Back to Explore

Trash Nothing

The Trash Nothing API gives programmatic access to the free‑cycling platform, enabling users to create, list, search and manage their posts (offers, wanted items, etc.) as well as handle related data such as post locations, profile images, and user reporting.

Social
OAuth
HTTPS
CORS: Yes
Description enriched
Visit official documentation

Latency

342ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
PUT

/users/me/post-locations

Save a post location for the current user

GET

/users/me/posts

List current users' posts

  • sort_by (query) — How to sort the posts that are returned. One of: date, active, distance Date sorting will sort posts from newest to oldest. Active sorting will sort active posts before satisfied, withdrawn and expired posts and then sort by date. Distance sorting will sort the closest posts first.
  • types (query, required) — A comma separated list of the post types to return. The available post types are: offer, taken, wanted, received, admin
  • sources (query, required) — A comma separated list of the post sources to retrieve posts from. The available sources are: groups, trashnothing, open_archive_groups. The trashnothing source is for public posts that are posted on trash nothing but are not associated with any group. The open_archive_groups source provides a way to easily request posts from groups that have open_archives set to true without having to pass a group_ids parameter. When passed, it will automatically return posts from open archive groups that are within the area specified by the latitude, longitude and radius parameters (or the current users' location if latitude, longitude and radius aren't passed). NOTE: For requests using an api key instead of oauth, passing the trashnothing source or the open_archive_groups source makes the latitude, longitude and radius parameters required.
  • group_ids (query) — A comma separated list of the group IDs to retrieve posts from. This parameter is only used if the 'groups' source is passed in the sources parameter and only groups that the current user is a member of or that are open archives groups will be used (the group IDs of other groups will be silently discarded*). NOTE: For requests using an api key instead of oauth, this field is required if the 'groups' source is passed. In addition, only posts from groups that have open_archives set to true will be used (the group IDS of other groups will be silently discarded*). *To determine which group IDs were used and which were discarded, use the group_ids field in the response.
  • per_page (query, limit) — The number of posts to return per page (must be >= 1 and <= 100).
  • page (query, page) — The page of posts to return.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
  • latitude (query) — The latitude of a point around which to return posts.
  • longitude (query) — The longitude of a point around which to return posts.
  • radius (query) — The radius in meters of a circle centered at the point defined by the latitude and longitude parameters. When latitude, longitude and radius are passed, only posts within the circle defined by these parameters will be returned.
  • date_min (query) — Only posts newer than or equal to this UTC date and time will be returned.
  • date_max (query) — Only posts older than this UTC date and time will be returned.
  • outcomes (query) — A comma separated list of the post outcomes to return. The available post outcomes are: satisfied, withdrawn There are also a couple special values that can be passed. If set to an empty string (the default), only posts that are not satisfied and not withdrawn and not expired are returned. If set to 'all', all posts will be returned no matter what outcome the posts have. If set to 'not-promised', only posts that are not satisfied ant not withdrawn and not expired and not promised are returned.
  • user_state (query) — If user_state is set, only posts matching the state specified will be returned. Only one state may be passed and it must be one of the following: viewed, replied, bookmarked NOTE: This option will only work with oauth requests.
  • include_reposts (query) — If set to 1 (the default), posts that are reposts will be included. If set to 0, reposts will be excluded. See the repost_count field of post objects for details about how reposts are identified.
GET

/users/me/posts/search

Search current users' posts

  • search (query, required) — The search query used to find posts.
  • sort_by (query) — How to sort the posts that are returned. One of: relevance, date, active, distance Relevance sorting will sort the posts that best match the search query first. Date sorting will sort posts from newest to oldest. Active sorting will sort active posts before satisfied, withdrawn and expired posts and then sort by date. Distance sorting will sort the closest posts first.
  • types (query, required) — A comma separated list of the post types to return. The available post types are: offer, taken, wanted, received, admin
  • sources (query, required) — A comma separated list of the post sources to retrieve posts from. The available sources are: groups, trashnothing, open_archive_groups. The trashnothing source is for public posts that are posted on trash nothing but are not associated with any group. The open_archive_groups source provides a way to easily request posts from groups that have open_archives set to true without having to pass a group_ids parameter. When passed, it will automatically return posts from open archive groups that are within the area specified by the latitude, longitude and radius parameters (or the current users' location if latitude, longitude and radius aren't passed). NOTE: For requests using an api key instead of oauth, passing the trashnothing source or the open_archive_groups source makes the latitude, longitude and radius parameters required.
  • group_ids (query) — A comma separated list of the group IDs to retrieve posts from. This parameter is only used if the 'groups' source is passed in the sources parameter and only groups that the current user is a member of or that are open archives groups will be used (the group IDs of other groups will be silently discarded*). NOTE: For requests using an api key instead of oauth, this field is required if the 'groups' source is passed. In addition, only posts from groups that have open_archives set to true will be used (the group IDS of other groups will be silently discarded*). *To determine which group IDs were used and which were discarded, use the group_ids field in the response.
  • per_page (query, limit) — The number of posts to return per page (must be >= 1 and <= 100).
  • page (query, page) — The page of posts to return.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
  • latitude (query) — The latitude of a point around which to return posts.
  • longitude (query) — The longitude of a point around which to return posts.
  • radius (query) — The radius in meters of a circle centered at the point defined by the latitude and longitude parameters. When latitude, longitude and radius are passed, only posts within the circle defined by these parameters will be returned.
  • date_min (query) — Only posts newer than or equal to this UTC date and time will be returned.
  • date_max (query) — Only posts older than this UTC date and time will be returned.
  • outcomes (query) — A comma separated list of the post outcomes to return. The available post outcomes are: satisfied, withdrawn There are also a couple special values that can be passed. If set to an empty string (the default), only posts that are not satisfied and not withdrawn and not expired are returned. If set to 'all', all posts will be returned no matter what outcome the posts have. If set to 'not-promised', only posts that are not satisfied ant not withdrawn and not expired and not promised are returned.
  • user_state (query) — If user_state is set, only posts matching the state specified will be returned. Only one state may be passed and it must be one of the following: viewed, replied, bookmarked NOTE: This option will only work with oauth requests.
  • include_reposts (query) — If set to 1 (the default), posts that are reposts will be included. If set to 0, reposts will be excluded. See the repost_count field of post objects for details about how reposts are identified.
POST

/users/me/profile-image

Set a profile image

GET

/users/me/profile-images

List current users' profile images

POST

/users/me/resend-verification

Resend account verification email

POST

/users/me/reset-password

Send password reset email

POST

/users/report

Report a user

GET

/users/{user_id}/posts/search

Search posts by a user

  • user_id (path, required) — The user ID of the user whose posts will be retrieved. Using 'me' as the user_id will return the posts for the current user.
  • search (query, required) — The search query used to find posts.
  • sort_by (query) — How to sort the posts that are returned. One of: relevance, date, active, distance Relevance sorting will sort the posts that best match the search query first. Date sorting will sort posts from newest to oldest. Active sorting will sort active posts before satisfied, withdrawn and expired posts and then sort by date. Distance sorting will sort the closest posts first.
  • types (query, required) — A comma separated list of the post types to return. The available post types are: offer, taken, wanted, received, admin
  • sources (query, required) — A comma separated list of the post sources to retrieve posts from. The available sources are: groups, trashnothing, open_archive_groups. The trashnothing source is for public posts that are posted on trash nothing but are not associated with any group. The open_archive_groups source provides a way to easily request posts from groups that have open_archives set to true without having to pass a group_ids parameter. When passed, it will automatically return posts from open archive groups that are within the area specified by the latitude, longitude and radius parameters (or all the open archive groups the requested user has posted to if latitude, longitude and radius aren't passed). NOTE: For requests using an api key instead of oauth, passing the trashnothing source or the open_archive_groups source makes the latitude, longitude and radius parameters required.
  • group_ids (query) — A comma separated list of the group IDs to retrieve posts from. This parameter is only used if the 'groups' source is passed in the sources parameter and only groups that the current user is a member of or that are open archives groups will be used (the group IDs of other groups will be silently discarded*). NOTE: For requests using an api key instead of oauth, this field is required if the 'groups' source is passed. In addition, only posts from groups that have open_archives set to true will be used (the group IDS of other groups will be silently discarded*). *To determine which group IDs were used and which were discarded, use the group_ids field in the response.
  • per_page (query, limit) — The number of posts to return per page (must be >= 1 and <= 100).
  • page (query, page) — The page of posts to return.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
  • latitude (query) — The latitude of a point around which to return posts.
  • longitude (query) — The longitude of a point around which to return posts.
  • radius (query) — The radius in meters of a circle centered at the point defined by the latitude and longitude parameters. When latitude, longitude and radius are passed, only posts within the circle defined by these parameters will be returned.
  • date_min (query) — Only posts newer than or equal to this UTC date and time will be returned.
  • date_max (query) — Only posts older than this UTC date and time will be returned.
  • outcomes (query) — A comma separated list of the post outcomes to return. The available post outcomes are: satisfied, withdrawn There are also a couple special values that can be passed. If set to an empty string (the default), only posts that are not satisfied and not withdrawn and not expired are returned. If set to 'all', all posts will be returned no matter what outcome the posts have. If set to 'not-promised', only posts that are not satisfied ant not withdrawn and not expired and not promised are returned.
  • include_reposts (query) — If set to 1 (the default), posts that are reposts will be included. If set to 0, reposts will be excluded. See the repost_count field of post objects for details about how reposts are identified.
POST

/photos

Create a photo

GET

/conversations

List conversations

  • category (query) — Used to filter messases by category. Must be set to one of the following three categories: inbox, archived, blocked
  • page (query, page) — The page of conversations to return.
  • per_page (query, limit) — The number of conversations to return per page (must be >= 1 and <= 30).
  • num_messages (query) — The number of recent messages to return with each conversation. Additional messages can be retrieved using get conversation messages endpoint.
  • include_num_unread (query) — If set to 1, the num_unread field in the response will be set to the count of the total number of conversations that have unread messages. This is useful for showing users the total number of unread messages that they have in their inbox. Calculating the count will slow the request down a bit so setting this should be avoided for requests where it's not needed (eg. requesting archived or blocked conversations or requests that are just paging through older conversations).
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
PUT

/conversations/archive-all

Archive all conversations

PUT

/conversations/mark-all-read

Mark all conversations as read

GET

/conversations/search

Search conversations

  • search (query, required) — The search query used to find conversations and messages.
  • page (query, page) — The page of conversations to return.
  • per_page (query, limit) — The number of conversations to return per page (must be >= 1 and <= 30).
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
DELETE

/conversations/{conversation_id}

Delete conversation

  • conversation_id (path, required) — The ID of the conversation to delete.
  • message_id (query, required) — The ID of the newest message in the conversation that the client has downloaded.
PUT

/conversations/{conversation_id}/archive

Archive conversation

  • conversation_id (path, required) — The ID of the conversation to archive.
PUT

/conversations/{conversation_id}/block

Block conversation

  • conversation_id (path, required) — The ID of the conversation to block.
PUT

/conversations/{conversation_id}/mark-read

Mark conversation as read

  • conversation_id (path, required) — The ID of the conversation to mark as read.
GET

/conversations/{conversation_id}/messages

List conversation messages

  • conversation_id (path, required) — The ID of the conversation to return messages from.
  • page (query, page) — The page of messages to return.
  • per_page (query, limit) — The number of messages to return per page (must be >= 1 and <= 30).
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
  • include_conversation (query) — If set to 1, the conversation will be returned along with the messages.
GET

/photos/multiple

Retrieve multiple photos

  • photo_ids (query, required) — The IDs of the photos to retrieve. If more than 50 photo IDs are passed, only the first 50 photos will be returned.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
POST

/conversations/{conversation_id}/reply

Reply to conversation

  • conversation_id (path, required) — The ID of the conversation to reply to.
POST

/conversations/{conversation_id}/report

Report conversation

  • conversation_id (path, required) — The ID of the conversation to report.
PUT

/conversations/{conversation_id}/unarchive

Unarchive conversation

  • conversation_id (path, required) — The ID of the conversation to unarchive.
PUT

/conversations/{conversation_id}/unblock

Unblock conversation

  • conversation_id (path, required) — The ID of the conversation to unblock.
POST

/feedback

Send feedback

GET

/groups

Search groups

  • name (query) — Find groups that have the given text somewhere in their name (case insensitive).
  • latitude (query) — Find groups near the given latitude and longitude.
  • longitude (query) — Find groups near the given latitude and longitude.
  • distance (query) — When latitude and longitude are passed, distance can optionally be passed to only return groups within a certain distance (in kilometers) from the point specified by the latitude and longitude. The distance must be > 0 and <= 150 and will default to 100.
  • country (query) — Find groups in the given country where country is a 2 letter country code for the country (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ).
  • region (query) — For countries with regions (AU, CA, GB, US), search groups in a specific region as specified by the region abbreviation. The supported regions and their abbreviations are listed below. NOTE: The region and postal_code parameters cannot be used at the same time and if both are passed then the postal_code will take priority. --- **AU** - QLD: Queensland - SA: South Australia - TAS: Tasmania - VIC: Victoria - WA: Western Australia - NT: Northern Territory - NSW: New South Wales - ACT **CA** - AB: Alberta - BC: British Columbia - MB: Manitoba - NB: New Brunswick - NL: Newfoundland and Labrador - NS: Nova Scotia - ON: Ontario - QC: Quebec - SK: Saskatchewan - PE: Prince Edward Island **GB** - E: East - EM: East Midlands - LDN: London - NE: North East - NW: North West - NI: Northern Ireland - SC: Scotland - SE: South East - SW: South West - WA: Wales - WM: West Midlands - YH: Yorkshire and the Humber **US** All 50 states and the District of Columbia are supported. For the abbreviations, see: https://github.com/jasonong/List-of-US-States/blob/master/states.csv
  • postal_code (query) — Find groups in the given postal code. Only a few countries support postal code searches (US, CA, AU, GB). The country parameter must be passed when the postal_code parameter is set. NOTE: The region and postal_code parameters cannot be used at the same time and if both are passed then the postal_code will take priority.
  • page (query, page) — The page of groups to return.
  • per_page (query, limit) — The number of groups to return per page (must be >= 1 and <= 100).
GET

/groups/multiple

Retrieve multiple groups

  • group_ids (query, required) — The IDs of the groups to retrieve. If more than 20 group IDs are passed, only the first 20 groups will be returned.
POST

/groups/subscribe

Join groups

GET

/groups/{group_id}

Retrieve a group

  • group_id (path, required) — The ID of the group to retrieve.
POST

/groups/{group_id}/answers

Submit group answers

  • group_id (path, required) — The group ID of the group that the user is submitting answers for.
POST

/groups/{group_id}/contact

Contact group moderators

  • group_id (path, required) — The group ID of the group whose moderators will be contacted.
POST

/groups/{group_id}/unsubscribe

Leave a group

  • group_id (path, required) — The ID of the group to leave.
DELETE

/photos/{photo_id}

Delete a photo

  • photo_id (path, required)
POST

/photos/{photo_id}/rotate

Rotate a photo

  • photo_id (path, required)
  • degrees (query, required) — Rotation in degrees - currently only 90, 180 and 270 are supported which correspond to rotate left, rotate upside down and rotate right.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
GET

/posts

List posts

  • sort_by (query) — How to sort the posts that are returned. One of: date, active, distance Date sorting will sort posts from newest to oldest. Active sorting will sort active posts before satisfied, withdrawn and expired posts and then sort by date. Distance sorting will sort the closest posts first.
  • types (query, required) — A comma separated list of the post types to return. The available post types are: offer, taken, wanted, received, admin
  • sources (query, required) — A comma separated list of the post sources to retrieve posts from. The available sources are: groups, trashnothing, open_archive_groups. The trashnothing source is for public posts that are posted on trash nothing but are not associated with any group. The open_archive_groups source provides a way to easily request posts from groups that have open_archives set to true without having to pass a group_ids parameter. When passed, it will automatically return posts from open archive groups that are within the area specified by the latitude, longitude and radius parameters (or the current users' location if latitude, longitude and radius aren't passed). NOTE: For requests using an api key instead of oauth, passing the trashnothing source or the open_archive_groups source makes the latitude, longitude and radius parameters required.
  • group_ids (query) — A comma separated list of the group IDs to retrieve posts from. This parameter is only used if the 'groups' source is passed in the sources parameter and only groups that the current user is a member of or that are open archives groups will be used (the group IDs of other groups will be silently discarded*). NOTE: For requests using an api key instead of oauth, this field is required if the 'groups' source is passed. In addition, only posts from groups that have open_archives set to true will be used (the group IDS of other groups will be silently discarded*). *To determine which group IDs were used and which were discarded, use the group_ids field in the response.
  • per_page (query, limit) — The number of posts to return per page (must be >= 1 and <= 100).
  • page (query, page) — The page of posts to return.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
  • latitude (query) — The latitude of a point around which to return posts.
  • longitude (query) — The longitude of a point around which to return posts.
  • radius (query) — The radius in meters of a circle centered at the point defined by the latitude and longitude parameters. When latitude, longitude and radius are passed, only posts within the circle defined by these parameters will be returned.
  • date_min (query) — Only posts newer than or equal to this UTC date and time will be returned. If unset, defaults to the current date and time minus 90 days.
  • date_max (query) — Only posts older than this UTC date and time will be returned. If unset, defaults to the current date and time.
  • outcomes (query) — A comma separated list of the post outcomes to return. The available post outcomes are: satisfied, withdrawn There are also a couple special values that can be passed. If set to an empty string (the default), only posts that are not satisfied and not withdrawn and not expired are returned. If set to 'all', all posts will be returned no matter what outcome the posts have. If set to 'not-promised', only posts that are not satisfied ant not withdrawn and not expired and not promised are returned.
  • user_state (query) — If user_state is set, only posts matching the state specified will be returned. Only one state may be passed and it must be one of the following: viewed, replied, bookmarked NOTE: This option will only work with oauth requests.
  • include_reposts (query) — If set to 1 (the default), posts that are reposts will be included. If set to 0, reposts will be excluded. See the repost_count field of post objects for details about how reposts are identified.
POST

/posts

Submit a post

GET

/posts/all

List all posts

  • types (query, required) — A comma separated list of the post types to return. The available post types are: offer, wanted
  • date_min (query, required) — Only posts newer than or equal to this UTC date and time will be returned. The UTC date and time used must be within a day or less of date_max. And the date and time must be within the last 30 days. And the date and time must be rounded to the nearest second.
  • date_max (query, required) — Only posts older than this UTC date and time will be returned. The UTC date and time used must be within a day or less of date_min. And the date and time must be rounded to the nearest second.
  • per_page (query, limit) — The number of posts to return per page (must be >= 1 and <= 50).
  • page (query, page) — The page of posts to return.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
GET

/posts/all/changes

List all post changes

  • date_min (query, required) — Only changes newer than or equal to this UTC date and time will be returned. The UTC date and time used must be within a day or less of date_max. And the date and time must be within the last 30 days. And the date and time must be rounded to the nearest second.
  • date_max (query, required) — Only changes older than this UTC date and time will be returned. The UTC date and time used must be within a day or less of date_min. And the date and time must be rounded to the nearest second.
  • per_page (query, limit) — The number of changes to return per page (must be >= 1 and <= 50).
  • page (query, page) — The page of changes to return.
GET

/posts/multiple

Retrieve multiple posts

  • post_ids (query, required) — A comma separated list of the post IDs. If more than 10 post IDs are passed, only the first 10 posts will be returned.
GET

/posts/search

Search posts

  • search (query, required) — The search query used to find posts.
  • sort_by (query) — How to sort the posts that are returned. One of: relevance, date, active, distance Relevance sorting will sort the posts that best match the search query first. Date sorting will sort posts from newest to oldest. Active sorting will sort active posts before satisfied, withdrawn and expired posts and then sort by date. Distance sorting will sort the closest posts first.
  • types (query, required) — A comma separated list of the post types to return. The available post types are: offer, taken, wanted, received, admin
  • sources (query, required) — A comma separated list of the post sources to retrieve posts from. The available sources are: groups, trashnothing, open_archive_groups. The trashnothing source is for public posts that are posted on trash nothing but are not associated with any group. The open_archive_groups source provides a way to easily request posts from groups that have open_archives set to true without having to pass a group_ids parameter. When passed, it will automatically return posts from open archive groups that are within the area specified by the latitude, longitude and radius parameters (or the current users' location if latitude, longitude and radius aren't passed). NOTE: For requests using an api key instead of oauth, passing the trashnothing source or the open_archive_groups source makes the latitude, longitude and radius parameters required.
  • group_ids (query) — A comma separated list of the group IDs to retrieve posts from. This parameter is only used if the 'groups' source is passed in the sources parameter and only groups that the current user is a member of or that are open archives groups will be used (the group IDs of other groups will be silently discarded*). NOTE: For requests using an api key instead of oauth, this field is required if the 'groups' source is passed. In addition, only posts from groups that have open_archives set to true will be used (the group IDS of other groups will be silently discarded*). *To determine which group IDs were used and which were discarded, use the group_ids field in the response.
  • per_page (query, limit) — The number of posts to return per page (must be >= 1 and <= 100).
  • page (query, page) — The page of posts to return.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
  • latitude (query) — The latitude of a point around which to return posts.
  • longitude (query) — The longitude of a point around which to return posts.
  • radius (query) — The radius in meters of a circle centered at the point defined by the latitude and longitude parameters. When latitude, longitude and radius are passed, only posts within the circle defined by these parameters will be returned.
  • date_min (query) — Only posts newer than or equal to this UTC date and time will be returned. If unset, defaults to the current date and time minus 90 days.
  • date_max (query) — Only posts older than this UTC date and time will be returned. If unset, defaults to the current date and time.
  • outcomes (query) — A comma separated list of the post outcomes to return. The available post outcomes are: satisfied, withdrawn There are also a couple special values that can be passed. If set to an empty string (the default), only posts that are not satisfied and not withdrawn and not expired are returned. If set to 'all', all posts will be returned no matter what outcome the posts have. If set to 'not-promised', only posts that are not satisfied ant not withdrawn and not expired and not promised are returned.
  • user_state (query) — If user_state is set, only posts matching the state specified will be returned. Only one state may be passed and it must be one of the following: viewed, replied, bookmarked NOTE: This option will only work with oauth requests.
  • include_reposts (query) — If set to 1 (the default), posts that are reposts will be included. If set to 0, reposts will be excluded. See the repost_count field of post objects for details about how reposts are identified.
DELETE

/posts/{post_id}

Delete a post

  • post_id (path, required)
GET

/posts/{post_id}

Retrieve a post

  • post_id (path, required) — The ID of the post to retrieve.
PUT

/posts/{post_id}

Update a post

  • post_id (path, required) — The ID of the post to update.
DELETE

/posts/{post_id}/bookmark

Delete a post bookmark

  • post_id (path, required)
PUT

/posts/{post_id}/bookmark

Bookmark a post

  • post_id (path, required)
GET

/posts/{post_id}/display

Retrieve post display data

  • post_id (path, required) — The ID of the post to retrieve.
GET

/users/{user_id}

Retrieve a user

  • user_id (path, required) — A user ID.
GET

/users/{user_id}/display

Retrieve user display info

  • user_id (path, required) — A user ID.
PUT

/posts/{post_id}/promise

Promise an offer post

  • post_id (path, required) — The ID of the post to promise.
POST

/posts/{post_id}/reply

Reply to a post

  • post_id (path, required) — The ID of the post to reply to.
POST

/posts/{post_id}/report

Report a post

  • post_id (path, required)
PUT

/posts/{post_id}/satisfy

Satisfy a post

  • post_id (path, required) — The ID of the post to satisfy.
POST

/posts/{post_id}/share

Share a post

  • post_id (path, required) — The ID of the post to share.
PUT

/posts/{post_id}/unpromise

Unpromise an offer post

  • post_id (path, required) — The ID of the post to unpromise.
PUT

/posts/{post_id}/withdraw

Withdraw a post

  • post_id (path, required) — The ID of the post to withdraw.
DELETE

/users/{user_id}/feedback

Remove feedback on a user

  • user_id (path, required) — A user ID.
POST

/users/{user_id}/feedback

Submit feedback on a user

  • user_id (path, required) — A user ID.
GET

/stories

List stories

  • page (query, page) — The page of stories to return.
  • per_page (query, limit) — The number of stories to return per page (must be >= 1 and <= 50).
  • sort_by (query) — How to sort the stories that are returned. One of: date, distance, likes, views Setting sort_by to date will sort posts from newest to oldest. Setting sort_by to distance will sort posts from nearest to farthest. Setting sort_by to likes will sort posts with the most likes first. Setting sort_by to views will show the posts with the most views first.
  • latitude (query) — Find groups near the given latitude and longitude.
  • longitude (query) — Find groups near the given latitude and longitude.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
POST

/stories

Submit a story

GET

/stories/{story_id}

Retrieve a story

  • story_id (path, required) — The ID of the story to retrieve.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
PUT

/stories/{story_id}/like

Like a story

  • story_id (path, required) — The ID of the story to like.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
PUT

/users/me/location

Update location

GET

/users/{user_id}/posts

List posts by a user

  • user_id (path, required) — The user ID of the user whose posts will be retrieved. Using 'me' as the user_id will return the posts for the current user.
  • sort_by (query) — How to sort the posts that are returned. One of: date, active, distance Date sorting will sort posts from newest to oldest. Active sorting will sort active posts before satisfied, withdrawn and expired posts and then sort by date. Distance sorting will sort the closest posts first.
  • types (query, required) — A comma separated list of the post types to return. The available post types are: offer, taken, wanted, received, admin
  • sources (query, required) — A comma separated list of the post sources to retrieve posts from. The available sources are: groups, trashnothing, open_archive_groups. The trashnothing source is for public posts that are posted on trash nothing but are not associated with any group. The open_archive_groups source provides a way to easily request posts from groups that have open_archives set to true without having to pass a group_ids parameter. When passed, it will automatically return posts from open archive groups that are within the area specified by the latitude, longitude and radius parameters (or all the open archive groups the requested user has posted to if latitude, longitude and radius aren't passed). NOTE: For requests using an api key instead of oauth, passing the trashnothing source or the open_archive_groups source makes the latitude, longitude and radius parameters required.
  • group_ids (query) — A comma separated list of the group IDs to retrieve posts from. This parameter is only used if the 'groups' source is passed in the sources parameter and only groups that the current user is a member of or that are open archives groups will be used (the group IDs of other groups will be silently discarded*). NOTE: For requests using an api key instead of oauth, this field is required if the 'groups' source is passed. In addition, only posts from groups that have open_archives set to true will be used (the group IDS of other groups will be silently discarded*). *To determine which group IDs were used and which were discarded, use the group_ids field in the response.
  • per_page (query, limit) — The number of posts to return per page (must be >= 1 and <= 100).
  • page (query, page) — The page of posts to return.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
  • latitude (query) — The latitude of a point around which to return posts.
  • longitude (query) — The longitude of a point around which to return posts.
  • radius (query) — The radius in meters of a circle centered at the point defined by the latitude and longitude parameters. When latitude, longitude and radius are passed, only posts within the circle defined by these parameters will be returned.
  • date_min (query) — Only posts newer than or equal to this UTC date and time will be returned.
  • date_max (query) — Only posts older than this UTC date and time will be returned.
  • outcomes (query) — A comma separated list of the post outcomes to return. The available post outcomes are: satisfied, withdrawn There are also a couple special values that can be passed. If set to an empty string (the default), only posts that are not satisfied and not withdrawn and not expired are returned. If set to 'all', all posts will be returned no matter what outcome the posts have. If set to 'not-promised', only posts that are not satisfied ant not withdrawn and not expired and not promised are returned.
  • include_reposts (query) — If set to 1 (the default), posts that are reposts will be included. If set to 0, reposts will be excluded. See the repost_count field of post objects for details about how reposts are identified.
PUT

/stories/{story_id}/unlike

Unlike a story

  • story_id (path, required) — The ID of the story to unlike.
  • device_pixel_ratio (query) — Client device pixel ratio used to determine thumbnail size (default 1.0).
POST

/stories/{story_id}/viewed

Record story viewed

  • story_id (path, required) — The ID of the story viewed.
GET

/users/me

Retrieve current user

PUT

/users/me

Update current user

GET

/users/me/alerts

List current users' email alerts

PUT

/users/me/alerts

Create an email alert

DELETE

/users/me/alerts/{alert_id}

Delete an email alert

  • alert_id (path, required) — The ID of the email alert to delete.
POST

/users/me/email

Change email address

PUT

/users/me/email/not-bouncing

Set users' email address as not bouncing

GET

/users/me/groups

List current users' groups

  • membership (query) — Set the membership parameter to only return certain groups. The options are: - **subscribed**: Only return groups the user is a member of. - **pending-questions**: Only return groups where the user needs to respond to a new member questionnaire. - **pending**: Only return groups where the user is waiting for their membership request to be approved (excludes groups which are pending-questions). If unset, all groups the user is a member of and pending membership on will be returned.
GET

/users/me/notices

List current users' group notices

  • group_ids (query) — A comma separated list of group IDs to return notices for. If unset, notices for all the users groups will be returned.
GET

/users/me/post-locations

List current users' post locations

GET

/users/{user_id}/profile-image

Retrieve a users' profile image

  • user_id (path, required) — The user ID of the user to return the profile image of.
  • default (query) — A default image URL to use when the user has no profile image. Or to use one of the Gravatar default images, you can set default to any one of (404, mm, identicon, monsterid, wavatar, retro, blank). To learn how the Gravatar default images options work, see the Default Image section on the page at: https://en.gravatar.com/site/implement/images/

76 endpoints auto-detected

Authentication

This API requires authentication: OAuth.

curl -X PUT \
  "https://trashnothing.com/developer/users/me/post-locations"

trashnothing.com · HTTPS only