Posts

Posts are at the core of Featurebase — they are the basic building blocks of your feedback board. On this page, we'll dive into the different post endpoints you can use to manage them programmatically. We'll look at how to query, create, update, and delete posts.

The post model

The Post model contains all the information about the posts and additional metadata created under different boards, including the feedback, reactions, and discussions they generate. This encompasses the title and description of the post, the board it belongs to, any estimated release time for features discussed, and various tags indicating the importance or status of the post. This model allows for a comprehensive overview of user-generated ideas, requests, or issues, and the response they receive from the community.

Properties

  • Name
    id
    Type
    string
    Description

    The id of the post. Example: "6409cde5f3c4e8d9a7977d89"

  • Name
    slug
    Type
    string
    Description

    The slug of the post. Example: "my-post-slug".
    Can be used to create a URL for the post: https://{yourorg}.featurebase.app/p/{slug}

  • Name
    title
    Type
    string
    Description

    The title of the post.

  • Name
    content
    Type
    string
    Description

    The content of the post.

  • Name
    author
    Type
    string
    Description

    The name of the author of the post.

  • Name
    authorId
    Type
    string
    Description

    The id for the author of the post.

  • Name
    authorEmail
    Type
    string
    Description

    The email of the author of the post.

  • Name
    commentsAllowed
    Type
    boolean
    Description

    Flag indicating whether comments are allowed on the post.

  • Name
    organization
    Type
    string
    Description

    The organization that the author of the post belongs to.

  • Name
    upvotes
    Type
    number
    Description

    The number of upvotes the post has received.

  • Name
    postCategory
    Type
    object
    Description

    The category of the post.

  • Name
    authorPicture
    Type
    string
    Description

    The URL to the picture of the author of the post.

  • Name
    postStatus
    Type
    object
    Description

    The status of the post.

  • Name
    date
    Type
    Date
    Description

    The date when the post was made.

  • Name
    comments
    Type
    Array<string>
    Description

    An array of comments ids made on the post.

  • Name
    postTags
    Type
    Array<object>
    Description

    An array of tag objects associated with the post.

  • Name
    inReview
    Type
    boolean
    Description

    Flag indicating whether the post is currently under review.

  • Name
    lastUpvoted
    Type
    Date
    Description

    The date when the post last received an upvote.

  • Name
    ratingCount
    Type
    number
    Description

    The total count of 1-10 scale importance ratings the post has received.

  • Name
    averageRating
    Type
    number
    Description

    The average rating of the post.

  • Name
    eta
    Type
    Date
    Description

    The estimated time of arrival or completion of the post.

  • Name
    linearIssueId
    Type
    string
    Description

    The ID of the related Linear issue.

  • Name
    linearIssueUrl
    Type
    string
    Description

    The URL of the related Linear issue.

  • Name
    jiraIssueId
    Type
    string
    Description

    The ID of the related Jira issue.

  • Name
    jiraIssueUrl
    Type
    string
    Description

    The URL of the related Jira issue.

  • Name
    linearProjectId
    Type
    string
    Description

    The ID of the related Linear project.

  • Name
    metadata
    Type
    object
    Description

    An object containing additional metadata related to the post.


GET/v2/posts

List posts

This endpoint allows you to retrieve a paginated list of all your posts. By default, a maximum of ten posts are shown per page.

Optional filtering attributes

  • Name
    id
    Type
    string
    Description

    Find submission by it's id.

  • Name
    q
    Type
    string
    Description

    Search for posts by title or content.

  • Name
    category
    Type
    string[]
    Description

    Filter posts by providing an array of category(board) names.

  • Name
    status
    Type
    string
    Description

    Filter posts by status.

  • Name
    sortBy
    Type
    string
    Description

    Sort posts by a specific attribute. Example values: "date:desc" or "upvotes:desc"

  • Name
    startDate
    Type
    date
    Description

    Get posts created after a specific date.

  • Name
    endDate
    Type
    date
    Description

    Get posts created before a specific date.

Pagination attributes

  • Name
    limit
    Type
    integer
    Description

    Number of results per page

  • Name
    page
    Type
    integer
    Description

    Page number

Request

GET
/v2/posts
curl -G https://do.featurebase.app/v2/posts \
  -H "X-API-Key: {token}"

Response

  {
    "results": [
        {
            "title": "My Cool Post",
            "content": "This is my cool post. It's really cool.",
            "author": "Admin",
            "authorId": "5fef50c5e9458a0012f82456",
            "authorPicture": "https://fb-usercontent.fra1.cdn.digitaloceanspaces.com/1681500636768.jpg",
            "commentsAllowed": true,
            "organization": "robiorg",
            "upvotes": 1,
            "upvoted": false,
            "downvoted": false,
            "postCategory": {
                "category": "💡 Feature Request",
                "private": false,
                "prefill": "<p></p>",
                "roles": [],
                "hiddenFromRoles": [],
                "id": "6418a4ec12471f16fa1dbeb4"
            },
            "postTags": [
                {
                    "name": "Low Priority",
                    "color": "",
                    "private": false,
                    "id": "6462be53f4f8de0c9b908f19"
                }
            ],
            "postStatus": {
                "name": "In Review",
                "color": "Sky",
                "type": "reviewing",
                "isDefault": true,
                "id": "6431b593c8ea5e5b4dbbc047"
            },
            "date": "2023-05-15T22:22:48.405Z",
            "lastModified": "2023-05-15T22:22:48.405Z",
            "comments": [],
            "isSubscribed": false,
            "recentUpvoters": [
                {
                    "profilePicture": "https://fb-usercontent.fra1.cdn.digitaloceanspaces.com/1681500636768.jpg",
                    "name": "Admin",
                    "id": "5fef50c5e9458a0012f82456"
                }
            ],
            "inReview": false,
            "lastDraggedTimestamps": [],
            "id": "6462b0b8df91a5dd5a727d96"
        }
    ],
    "page": 1,
    "limit": 10,
    "totalPages": 1,
    "totalResults": 1

  }

POST/v2/posts

Create a new post

This endpoint allows you to create a new post to one of your boards.

Required attributes

  • Name
    title
    Type
    string
    Description

    The title of the submission. It must be at least 2 characters long.

  • Name
    category
    Type
    string
    Description

    The board (a.k.a category) of the submission.

Optional attributes

  • Name
    content
    Type
    string
    Description

    The content of the submission. Can be an empty string.

  • Name
    email
    Type
    string
    Description

    The email of the user submitting the post. Will create a new user if the email is not associated with an existing user.

  • Name
    authorName
    Type
    string
    Description

    Used when you provide an email. If the email is not associated with an existing user, a new user will be created with this name.

  • Name
    tags
    Type
    string[]
    Description

    The tags associated with the submission. Needs to be an array of tag names.

  • Name
    commentsAllowed
    Type
    boolean
    Description

    Flag indicating whether comments are allowed on the submission.

  • Name
    status
    Type
    string
    Description

    The status of the submission.

Request

POST
/v2/posts
curl https://do.featurebase.app/v2/posts \
  -H "X-API-Key: {token}" \
  -d title="My Cool Post" \
  -d content="This is my cool post. It's really cool." \
  -d category="💡 Feature Requests"

Response

{
    "success": true,
    "submission": {
        "title": "My Cool Post",
        "content": "This is my cool post. It's really cool.",
        "author": "Admin",
        "authorId": "5fef50c5e9458a0012f82456",
        "authorPicture": "https://fb-usercontent.fra1.cdn.digitaloceanspaces.com/1681500636768.jpg",
        "commentsAllowed": true,
        "organization": "robiorg",
        "upvotes": 1,
        "upvoted": true,
        "downvoted": false,
        "postCategory": {
            "category": "💡 Feature Request",
            "private": false,
            "prefill": "<p></p>",
            "roles": [],
            "hiddenFromRoles": [],
            "id": "6418a4ec12471f16fa1dbeb4"
        },
        "postStatus": {
            "name": "In Review",
            "color": "Sky",
            "type": "reviewing",
            "isDefault": true,
            "id": "6431b593c8ea5e5b4dbbc047"
        },
        "comments": [],
        "isSubscribed": false,
        "recentUpvoters": [
            {
                "profilePicture": "https://fb-usercontent.fra1.cdn.digitaloceanspaces.com/1681500636768.jpg",
                "name": "Admin",
                "id": "5fef50c5e9458a0012f82456"
            }
        ],
        "inReview": false,
        "lastDraggedTimestamps": [],
        "postTags": [],
        "date": "2023-05-15T22:22:48.405Z",
        "lastModified": "2023-05-15T22:22:48.405Z",
        "id": "6462b0b8df91a5dd5a727d96"
    }
}

PATCH/v2/posts

Update a post

This endpoint allows you to update a post by providing the post id. Refer to the list at the top of this page to see which properties are included with post objects.

Required attributes

  • Name
    id
    Type
    string
    Description

    The id of the submission.

Properties you can update

  • Name
    status
    Type
    string
    Description

    The status of the submission. Example: "In Progress"

  • Name
    commentsAllowed
    Type
    boolean
    Description

    Flag indicating whether comments are allowed on the submission. Example: true

  • Name
    category
    Type
    string
    Description

    The category of the submission. Example: "💡 Feature Request"

  • Name
    status
    Type
    string
    Description

    The status of the submission.

  • Name
    tags
    Type
    string[]
    Description

    The tags of the submission. Example: ["tag1", "tag2"]

  • Name
    inReview
    Type
    boolean
    Description

    Flag indicating whether the submission is in review. In review posts are not visible to users.

Request

PATCH
/v2/posts
curl -X PATCH "https://do.featurebase.app/v2/posts" \
  -H "X-API-Key: {token}" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "id=6462c35485d966548318efbd" \
  -d "tags=Low Priority" \
  -d "status=In Progress"

Response

{
  "success": true
}

DELETE/v2/posts

Delete a post

This endpoint allows you to delete posts from your boards. Note: This will permanently delete the post.

Required attributes

  • Name
    id
    Type
    string
    Description

    The id of the submission.

Request

DELETE
/v2/posts
curl -X DELETE https://do.featurebase.app/v2/posts \
  -H "X-API-Key: {token}" \
  -d "id=6462c35485d966548318efbd"

Response

{
  "success": true
}

POST/v2/posts/upvoters

Add upvoters to a post

This endpoint allows you to perform an update on a message. Examples of updates are adding a reaction, editing the message, or adding an attachment.

Required attributes

  • Name
    id
    Type
    string
    Description

    ID of the post.

  • Name
    email
    Type
    string
    Description

    Email of the upvoter.

  • Name
    name
    Type
    string
    Description

    Name of the upvoter

Request

POST
/v2/posts/upvoters
curl -X POST https://do.featurebase.app/v2/posts/upvoters \
  -H "X-API-Key: {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "6462b0b8df91a5dd5a727d96",
    "email": "random@email.com",
    "name": "Random Name"
  }'

Response

{
  "success": true
}