trash nothing
  1. stories
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
    • Retrieve multiple photos
    • Delete a photo
    • Rotate a photo
  • posts
    • List posts
    • Submit a post
    • List all posts
    • List all post changes
    • Retrieve client.js
    • Retrieve multiple posts
    • Search posts
    • Retrieve a post
    • Update a post
    • Delete a post bookmark
    • Bookmark a post
    • Retrieve post display data
    • Flag a post
    • Map a post
    • Promise an offer post
    • Reply to a post
    • Satisfy a post
    • Share a post
    • Unpromise an offer post
    • Withdraw a post
  • stories
    • List stories
      GET
    • Submit a story
      POST
    • Retrieve a story
      GET
    • Like a story
      PUT
    • Unlike a story
      PUT
    • Record story viewed
      POST
  • 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. stories

Submit a story

POST
/stories
stories
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://trashnothing.com/api/v1.2/stories' \
--form 'content=""' \
--form 'sharing=""' \
--form 'title=""'
Response Response Example
200 - Example 1
{
    "content": "People helping people - it doesn't get better than this!",
    "date": "2020-04-25T10:26:32",
    "like_count": 3,
    "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"
        }
    ],
    "share_url": "https://trashnothing.com/story/7584",
    "story_id": 7584,
    "title": "Sharing is caring",
    "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"
    }
}

Request

Body Params multipart/form-data
content
string 
required
The content of the story.
device_pixel_ratio
string 
optional
Client device pixel ratio used to determine thumbnail size (default 1.0).
Example:
1
photo_ids
string 
optional
A comma separated list of the IDs of the photos that should be attached to this story.
sharing
string 
required
Must be set to one of the following two options: public, members

When sharing is set to public, anyone will be able to view the story. When sharing is set to members, only other members will be able to view the story.
title
string 
required
The title of the story.

Responses

🟢200The new story.
application/json
Body
A user story
content
string 
optional
date
string <date-time>
optional
The UTC date and time when the post was published.
like_count
integer 
optional
The number of people who have liked this story.
photos
array[object (Photo) {5}] 
optional
Details about the photos associated with this story (may be null if there are no photos).
blurhash
string 
optional
A blurhash of the photo that can be used as a placeholder while the photo is loading (see: https://github.com/woltapp/blurhash). May be null if no blurhash is available and the length of the blurhash can vary based on the photo.
images
array [object {3}] 
optional
All the versions of this photo ordered from smallest to largest. This list is guaranteed to include the photos specified by the above thumbnail and url properties.
photo_id
string 
optional
thumbnail
string 
optional
A URL to a thumbnail of this photo. The size of the thumbnail depends on the device_pixel_ratio parameter and it is not guaranteed to be square.
url
string 
optional
A URL to a large version of this photo (but not necessarily the largest size available).
share_url
string 
optional
A URL that can be used to share the story (may be null if the story is not public).
story_id
string 
optional
title
string 
optional
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"}
about_me
string 
optional
A short bio a user has written about themselves to help other members get to know them better. May be null if the user has not written anything about themselves.
country
string 
optional
A 2 letter country code for the country that has been automatically detected for the user (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ). May be null if no country has been set.
feedback
object 
optional
firstname
string 
optional
The first name of the user (may be null).
lastname
string 
optional
The last name of the user (may be null).
member_since
string 
optional
The date and time when the user first became publicly active on a group (the date may be older than when the user signed up).
profile_image
string 
optional
A URL to a profile image for the user. Profile images sizes vary based on the source (Google, Facebook, Gravatar, etc) and some can be as small as 64px by 64px. Will be null for api key requests and requests where the oauth user doesn't belong to any of the same groups as this user.
reply_time
integer 
optional
An estimate of how many seconds it takes this user to reply to messages. May be null when there is not enough data to calculate an estimate.
user_id
string 
optional
username
string 
optional
A username that can be displayed for the user (the username is NOT guaranteed to be unique). Will be null for api key requests and requests where the oauth user doesn't belong to any of the same groups as this user.
user_liked
boolean 
optional
Whether or not the current user has liked this story or not.
🟠400Missing or invalid parameters.
Modified at 2022-09-11 18:59:48
Previous
List stories
Next
Retrieve a story
Built with