Post Bookmarks

Bookmarking is an action for users to keep track of posts. You can see others' bookmarks as well.

Endpoints:

GET /users/{user_id}/bookmarks

Token: user

Scope: any

Retrieve a list of bookmarks made by the specified user.

Returned posts may include a note string field if looking up bookmarks made by the authorized user.

URL Parameters

Name Description
user_id What user's bookmarks to look up
Example
curl "https://api.pnut.io/v0/users/1/bookmarks" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns a list of posts.

"call for example 1"

PUT /posts/{post_id}/bookmark

Token: user

Scope: write_post

Bookmark a post.

URL Parameters

Name Description
post_id Post to bookmark

PUT Body Data

Name Description
note Optional 128-character note that will only be visible when a user retrieves their own bookmarks
Example
curl "https://api.pnut.io/v0/posts/2375/bookmark" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -X PUT \
    -H "X-Pretty-Json: 1"

Returns the bookmarked post.

"call for example 2"

DELETE /posts/{post_id}/bookmark

Token: user

Scope: write_post

Delete a bookmark.

URL Parameters

Name Description
post_id Post to delete a bookmark for
Example
curl "https://api.pnut.io/v0/posts/2375/bookmark" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -X DELETE \
    -H "X-Pretty-Json: 1"

Returns the post a bookmark was removed from.

"call for example 3"