Skip to main content

Posts

Posts

A Post is new topic created by a user on the Feedback Site, while it's usually a suggestion or feature request, sometimes it might also be a bug report or a complaint.

Posts that are waiting for moderation are only returned to Collaborators, Administrators and the user who created them.

List Posts

  • Authentication: Optional
GET /api/v1/posts

Parameters

NameTypeDescription
querystringThe search keywords. When present, results are ordered by relevance.
viewstringThe order to apply. Possible values are all, recent, trending, most-wanted and most-discussed. Default: all. See Views below.
statusesstringThe statuses to filter by. Separate multiple statuses by ,. Possible values are open, started, planned, completed, declined and duplicate. Default: open,started,planned. Ignored when view is all.
tagsstringThe slugs of the tags to filter by. Separate multiple tags by ,. Posts that have any of the given tags are returned.
notagsbooleanWhen true, only posts without tags are returned. Takes precedence over tags.
myvotesbooleanWhen true, only posts the authenticated user has voted on are returned.
mypostsbooleanWhen true, only posts created by the authenticated user are returned.
moderationstringOnly for Collaborators and Administrators. pending returns only posts waiting for moderation, approved returns only approved posts.
limitstringThe number of entries to return, or all to return every matching post. Default: 30

Views

ViewOrderStatuses
allNewest firstAlways open, started, planned, completed and declined. statuses is ignored.
recentNewest firstFrom statuses
trendingPosts with the most recent votes and comments firstFrom statuses
most-wantedMost votes firstFrom statuses
most-discussedMost comments firstFrom statuses

The views my-votes, planned, started, completed and declined are deprecated but still supported. Use the myvotes and statuses parameters instead.

Example

GET <baseURL>/api/v1/posts?view=recent&statuses=completed&query=open+links&limit=50

Response

200 OK
---
[
{
"id": 4315,
"number": 65,
"title": "Open links in new tab",
"slug": "open-links-in-new-tab",
"description": "When somebody pastes a link in the description of an item, it has to open link in a new tab so you don't lose focus in the app",
"createdAt": "2018-05-16T13:50:34.579281Z",
"user": {
"id": 45642,
"name": "Jon Snow",
"role": "visitor",
"avatarURL": "https://feedback.yourcompany.com/static/avatars/letter/45642/Jon%20Snow",
"status": "active",
"isTrusted": false
},
"hasVoted": true,
"votesCount": 34,
"commentsCount": 0,
"status": "completed",
"response": {
"text": "This is now available on `v0.14`. Links from any markdown text will open in a new tab.",
"respondedAt": "2018-06-13T17:48:27.073178Z",
"user": {
"id": 8,
"name": "Arya Stark",
"role": "administrator",
"avatarURL": "https://feedback.yourcompany.com/static/avatars/gravatar/8/Arya%20Stark",
"status": "active",
"isTrusted": false
},
"original": null
},
"tags": ["hard", "critical"],
"isApproved": true
},
{
...
}
]

The response property is only present on posts that have received a response. When the post is a duplicate, response.original contains the number, title, slug and status of the original post.

Private tags are only included in tags for Collaborators and Administrators.

Find Similar Posts

  • Authentication: Optional

Returns up to 5 posts that match the given keywords, ordered by relevance. This is useful to find existing posts before creating a new one. Only posts with status open, started, planned, completed or declined are returned.

GET /api/v1/similarposts

Parameters

NameTypeDescription
querystringThe search keywords.

Example

GET <baseURL>/api/v1/similarposts?query=open+links

Response

A list of posts, in the same format as List Posts. An empty list is returned if the query only contains common words or words shorter than 3 characters.

200 OK
---
[
{
"id": 4315,
"number": 65,
"title": "Open links in new tab",
...
}
]

Get a Post

  • Authentication: Optional
GET /api/v1/posts/{number}

Parameters

NameTypeDescription
numbernumberRequired. The number of the post to retrieve.

Example

GET <baseURL>/api/v1/posts/65

Response

200 OK
---
{
"id": 4315,
"number": 65,
"title": "Open links in new tab",
"slug": "open-links-in-new-tab",
"description": "When somebody pastes a link in the description of an item, it has to open link in a new tab so you don't lose focus in the app",
"createdAt": "2018-05-16T13:50:34.579281Z",
"user": {
"id": 45642,
"name": "Jon Snow",
"role": "visitor",
"avatarURL": "https://feedback.yourcompany.com/static/avatars/letter/45642/Jon%20Snow",
"status": "active",
"isTrusted": false
},
"hasVoted": true,
"votesCount": 34,
"commentsCount": 0,
"status": "completed",
"response": {
"text": "This is now available on `v0.14`. Links from any markdown text will open in a new tab.",
"respondedAt": "2018-06-13T17:48:27.073178Z",
"user": {
"id": 8,
"name": "Arya Stark",
"role": "administrator",
"avatarURL": "https://feedback.yourcompany.com/static/avatars/gravatar/8/Arya%20Stark",
"status": "active",
"isTrusted": false
},
"original": null
},
"tags": ["hard", "critical"],
"isApproved": true
}

Deleted posts return 404 Not Found.

Create a Post

  • Authentication: Required

The post is created under the authenticated user, who also automatically votes on it.

POST /api/v1/posts

Parameters

NameTypeDescription
titlestringRequired. The title of the post. Must be between 10 and 100 characters, and no other post can have the same title.
descriptionstringThe description of the post, in Markdown.
tagsarray of stringThe slugs of the tags to add to the post. Only used on self-hosted instances with POST_CREATION_WITH_TAGS_ENABLED=true, otherwise ignored. Visitors can only use public tags.
attachmentsarray of objectUp to 3 images to attach to the post. See Attachments.

Example

POST <baseURL>/api/v1/posts
---
{
"title": "Allow users to edit any comment",
"description": "This is useful to fix some minor typos or introduce more details"
}

Response

200 OK
---
{
"id": 6848,
"number": 47,
"title": "Allow users to edit any comment",
"slug": "allow-users-to-edit-any-comment",
"isApproved": true
}

isApproved is false when moderation is enabled and the post is waiting to be approved.

Attachments

Images are sent inside the JSON body, with the file content encoded as Base64. Supported formats are PNG, JPEG and GIF, and each image must be 5 MB or smaller. Attached images that are not referenced in the description are added to the end of it.

{
"upload": {
"fileName": "screenshot.png",
"contentType": "image/png",
"content": "iVBORw0KGgoAAAANSUhEUgAA..."
}
}

When editing a post or comment, send { "bkey": "{blob-key}", "remove": true } to remove an existing attachment.

Edit a Post

  • Authentication: Required
  • Required Role: Collaborator or Administrator. The author of the post can also edit it during the first hour after it was created.
PUT /api/v1/posts/{number}

The title and description are replaced by the values sent. If description is not sent, the description of the post is cleared.

Parameters

NameTypeDescription
numbernumberRequired. The number of the post to be edited.
titlestringRequired. The title of the post. Must be between 10 and 100 characters, and no other post can have the same title.
descriptionstringThe description of the post, in Markdown.
attachmentsarray of objectImages to add or remove. A post can have up to 3 images. See Attachments.

Example

PUT <baseURL>/api/v1/posts/47
---
{
"title": "Allow users to edit their own comments",
"description": "This is useful to fix some minor typos or introduce more details"
}

Response

200 OK
---
{}

Delete a Post

  • Authentication: Required
  • Required Role: Administrator
DELETE /api/v1/posts/{number}

A post cannot be deleted while other posts are marked as a duplicate of it.

Parameters

NameTypeDescription
numbernumberRequired. The number of the post to be deleted.
textstringThe reason why this post is being deleted.

Example

DELETE <baseURL>/api/v1/posts/47
---
{
"text": "this is spam!"
}

Response

200 OK
---
{}

Respond to a Post

  • Authentication: Required
  • Required Role: Collaborator or Administrator
PUT /api/v1/posts/{number}/status

Parameters

NameTypeDescription
numbernumberRequired. The number of the post to add a response.
statusstringRequired. The new status of the post. Possible values are open, started, planned, completed, declined and duplicate.
textstringAn optional description of what is the status on this post. This is made visible to all visitors on the website. Ignored when status is duplicate.
originalNumbernumberThe number of the post to merge this into. Required when status is duplicate. The votes of this post are added to the original post.

Example #1

PUT <baseURL>/api/v1/posts/47/status
---
{
"status": "declined",
"text": "this is spam!"
}

Example #2

PUT <baseURL>/api/v1/posts/47/status
---
{
"status": "duplicate",
"originalNumber": 84
}

Response

200 OK
---
{}

Subscribe to a Post

  • Authentication: Required

Subscribes the authenticated user to notifications about the post. Impersonate another user to subscribe on behalf of them.

POST /api/v1/posts/{number}/subscription

Parameters

NameTypeDescription
numbernumberRequired. The number of the post to subscribe to.

Example

POST <baseURL>/api/v1/posts/47/subscription

Response

200 OK
---
{}

Unsubscribe from a Post

  • Authentication: Required

Stops notifications about the post for the authenticated user. Impersonate another user to unsubscribe on behalf of them.

DELETE /api/v1/posts/{number}/subscription

Parameters

NameTypeDescription
numbernumberRequired. The number of the post to unsubscribe from.

Example

DELETE <baseURL>/api/v1/posts/47/subscription

Response

200 OK
---
{}

Moderate a Post

  • Authentication: Required
  • Required Role: Administrator

Approves or declines a post that is waiting for moderation. Moderation is available on self-hosted instances and on Fider Cloud Pro plans. On other plans these endpoints return 403 Forbidden.

Use List Posts with moderation=pending to find the posts that are waiting for moderation.

POST /api/v1/admin/moderation/posts/{id}/approve
POST /api/v1/admin/moderation/posts/{id}/approve-and-verify
POST /api/v1/admin/moderation/posts/{id}/decline
POST /api/v1/admin/moderation/posts/{id}/decline-and-block
ActionDescription
approveApproves the post, making it visible to everyone.
approve-and-verifyApproves the post and marks its author as trusted, so their future content skips moderation.
declineDeletes the post.
decline-and-blockDeletes the post and blocks its author.

Parameters

NameTypeDescription
idnumberRequired. The id of the post (not the number) to be moderated.

Example

POST <baseURL>/api/v1/admin/moderation/posts/6848/approve

Response

200 OK
---
{}