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
device_pixel_ratio
string
optional
Example:
1
photo_ids
string
optional
sharing
string
required
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
Responses
Modified at 2022-09-11 18:59:48