Update a post
PUT
/posts/{post_id}
posts
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://trashnothing.com/api/v1.2/posts/' \
--form 'location=""' \
--form 'session=""' \
--form 'title=""' \
--form 'type=""'
Response Response Example
200 - Example 1
{
"identifier": "string",
"message": "string",
"preference_key": "string",
"result": "string",
"session": {
"property1": "string",
"property2": "string"
}
}
Request
Path Params
post_id
string
required
Body Params multipart/form-data
content
string
optional
expires_in
string
optional
Note that updates may not appear instantly after submission because the volunteer moderators of many groups may have additional automatic or manual review processes in place that can cause delays. So with short expirations (eg. < 8 hours), there is a chance that the post may expire before the update is approved and so it will never be published.
NOTE: The max expiration for a post is 90 days after the post is published. So updates to posts that try to set an longer expiration will be silently changed to just apply the max expiration.
fair_offer
string
optional
latitude
string
optional
If latitude and longitude are not provided, an attempt will be made to automatically geocode the location. If the location is unable to be geocoded, the post will be rejected* and will have to be resubmitted with a latitude and longitude corresponding to the location or resubmitted with a different location that can be automatically geocoded.
NOTE: The latitude and longitude should NOT be the users' exact location because we don't want to publicize their exact location unless their location description is their full address (which is not recommended).
*When a post is rejected because it can't be geocoded, the returned error will have its identifier property set to 'unknown-location'.
location
string
required
longitude
string
optional
photo_ids
string
optional
preferences
string
optional
session
string
required
title
string
required
type
string
required
Responses
Modified at 2022-09-11 18:59:48