trash nothing
  1. users
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
  • groups
    • Search groups
    • Retrieve multiple groups
    • Join groups
    • Retrieve a group
    • Submit group answers
    • Contact group moderators
    • Leave a group
  • 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
    • Submit a story
    • Retrieve a story
    • Like a story
    • Unlike a story
    • Record story viewed
  • users
    • Retrieve current user
      GET
    • Update current user
      PUT
    • List current users' email alerts
      GET
    • Create an email alert
      PUT
    • Delete an email alert
      DELETE
    • Change email address
      POST
    • Set users' email address as not bouncing
      PUT
    • List current users' groups
      GET
    • Update location
      PUT
    • List current users' group notices
      GET
    • List current users' post locations
      GET
    • Save a post location for the current user
      PUT
    • List current users' posts
      GET
    • Search current users' posts
      GET
    • Set a profile image
      POST
    • List current users' profile images
      GET
    • Resend account verification email
      POST
    • Send password reset email
      POST
    • Report a user
      POST
    • Retrieve a user
      GET
    • Retrieve user display info
      GET
    • Submit feedback on a user
      POST
    • List posts by a user
      GET
    • Search posts by a user
      GET
    • Retrieve a users' profile image
      GET
  1. users

Create an email alert

PUT
/users/me/alerts
users
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://trashnothing.com/api/v1.2/users/me/alerts' \
--form 'search=""' \
--form 'types=""'
Response Response Example
200 - Example 1
{
    "alert_id": 7584,
    "last_sent": "2018-02-16T12:58:51",
    "search": "table",
    "send_count": 3,
    "types": [
        "offer"
    ],
    "user_id": 9191
}

Request

Body Params multipart/form-data
search
string 
required
When a post matches this search query, an email alert will be sent. Must have a length >= 2 and < 255 characters.
types
string 
required
A comma separated list of the post types that the alert should match against. The available post types are: offer, wanted

Responses

🟢200The new alert.
application/json
Body
A search alert that the user has created so that they can be notified when new posts match the search query specified by the alert.
alert_id
string 
optional
last_sent
string <date-time>
optional
The UTC date and time when the alert was last triggered and sent out (may be null).
search
string 
optional
The search phrase that the alert triggers on.
send_count
integer 
optional
The number of time the alert has triggered and been send out.
types
array[string]
optional
A list of the post types that the alert is set to match against. The available post types are: offer, wanted

NOTE: Additional post types may be added in the future (eg. events) so clients should take care to support arbitrary types being returned.
user_id
string 
optional
🟠400Missing or invalid parameters or maximum number of alerts reached.
Modified at 2022-09-11 18:59:48
Previous
List current users' email alerts
Next
Delete an email alert
Built with