Changelogs

Changelogs are one of the core features in Featurebase. On this page, we'll dive into the different changelog endpoints you can use to manage them programmatically. We'll look into subscribing your users to your changelog so that they always receive updates when you post changes.

The Changelog model

The Changelog model contains all the information about a changelog, such as it's title, content, date of creation and much more. It has the following properties:

Properties

  • Name
    id
    Type
    string
    Description

    The id the changelog.

  • Name
    slug
    Type
    string
    Description

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

  • Name
    featuredImage
    Type
    string
    Description

    The URL of the featured image of the changelog.

  • Name
    title
    Type
    string
    Description

    The title of the changelog.

  • Name
    content
    Type
    string
    Description

    The HTML content of the changelog.

  • Name
    markdownContent
    Type
    string
    Description

    The markdown content of the changelog.

  • Name
    date
    Type
    Date
    Description

    The date when the changelog was made.

  • Name
    displayed
    Type
    boolean
    Description

    Flag indicating whether the changelog is visible to the public. Updating this value along with the sendNotification=true flag will trigger an email to be sent to subscribers.

  • Name
    sendNotification
    Type
    boolean
    Description

    Flag indicating whether to send an email notification to subscribers. If set to true, making the displayed field true will trigger an email to be sent to subscribers.

  • Name
    changelogCategories
    Type
    object[]
    Description

    An array of category objects associated with the changelog.

  • Name
    organization
    Type
    string
    Description

    The organization that this changelog belongs to.

  • Name
    emailSentToSubscribers
    Type
    boolean
    Description

    Flag indicating whether the email has been sent to subscribers for this changelog.

  • Name
    commentCount
    Type
    number
    Description

    The number of comments on the changelog.

  • Name
    allowedSegmentIds
    Type
    string[]
    Description

    An array of segment ids that are allowed to view the changelog. If empty, everyone can view the changelog.


GET/v2/changelog

Get changelogs

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

Optional filtering attributes

  • Name
    id
    Type
    string
    Description

    Find changelog by it's id.

  • Name
    q
    Type
    string
    Description

    Search for changelogs by title or content.

  • Name
    categories
    Type
    string[]
    Description

    Filter changelogs by category, by providing an array of category names.

Pagination attributes

  • Name
    limit
    Type
    integer
    Description

    Number of results per page

  • Name
    page
    Type
    integer
    Description

    Page number

Request

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

Response

{
    "results": [
        {
            "title": "Your awesome changelog!",
            "slug": "your-awesome-changelog",
            "content": "<p>Your changelog content in HTML format.</p>",
            "markdownContent": "Your changelog content in markdown format.",
            "date": "2023-05-07T17:46:39.168Z",
            "displayed": true,
            "sendNotification": true,
            "emailSentToSubscribers": true,
            "commentCount": 2,
            "changelogCategories": [
                {
                    "name": "Test2",
                    "roles": [],
                    "id": "6438a1efda3640f8feb72121"
                }
            ],
            "organization": "robiorg",
            "id": "6457e3ff70afca5d8c27dccc"
        },
        {
            ...
        },
        ...
    ],
    "page": 1,
    "limit": 10,
    "totalPages": 30,
    "totalResults": 292
}

POST/v2/changelog

Create changelog

This endpoint allows you to create a new changelog. To send out an email notification to subscribers, set the sendNotification field to true along with the displayed field.

Required attributes

  • Name
    title
    Type
    string
    Description

    The title of the changelog.

  • Name
    htmlContent
    Type
    string
    Description

    The HTML content of the changelog. Provide either htmlContent or markdownContent depending on the format your data is in.

  • Name
    markdownContent
    Type
    string
    Description

    The markdown content of the changelog.

Optional attributes

  • Name
    changelogCategories
    Type
    string[]
    Description

    An array of category identifiers to which the changelog belongs.
    Example: ["New", "Fixed", "Improved"]

  • Name
    displayed
    Type
    boolean
    Description

    A boolean flag that indicates whether the changelog is initially visible to the public.

  • Name
    scheduledDate
    Type
    Date
    Description

    The date the changelog should be published. Must be a future date.

  • Name
    featuredImage
    Type
    string
    Description

    The URL of the featured image for the changelog.

  • Name
    sendNotification
    Type
    boolean
    Description

    A flag that indicates whether to send an email notification when the changelog is published.

  • Name
    allowedSegmentIds
    Type
    string[]
    Description

    An array of segment ids that are allowed to view the changelog.

Request

POST
/v2/changelog
curl -X 'POST' 'https://do.featurebase.app/v2/changelog' \
  -H 'X-API-Key: {token}' \
  -H 'Content-Type: application/json' \
  -d '{
        "title": "New Features Update",
        "markdownContent": "Exciting new features to explore.",
        "changelogCategories": ["New", "Fixed", "Improved"],
        "displayed": false,
        "scheduledDate": "2023-12-01T00:00:00Z",
        "featuredImage": "http://example.com/image.png",
        "sendNotification": true
      }'      

Response

{
    "results": [
        {
            "title": "Your awesome changelog!",
            "slug": "your-awesome-changelog",
            "content": "<p>Your changelog content in HTML format.</p>",
            "markdownContent": "Your changelog content in markdown format.",
            "date": "2023-05-07T17:46:39.168Z",
            "displayed": true,
            "sendNotification": true,
            "emailSentToSubscribers": true,
            "commentCount": 2,
            "changelogCategories": [
                {
                    "name": "Test2",
                    "roles": [],
                    "id": "6438a1efda3640f8feb72121"
                }
            ],
            "organization": "robiorg",
            "id": "6457e3ff70afca5d8c27dccc"
        },
        {
            ...
        },
        ...
    ],
    "page": 1,
    "limit": 10,
    "totalPages": 30,
    "totalResults": 292
}

PATCH/v2/changelog

Update changelog

This endpoint allows you to create a new changelog. To send out an email notification to subscribers, set the sendNotification field to true along with the displayed field.

Required

  • Name
    id
    Type
    string
    Description

    The id of the changelog to update.

Fields to update

Only send the fields you want to update.

  • Name
    title
    Type
    string
    Description

    The title of the changelog.

  • Name
    htmlContent
    Type
    string
    Description

    The HTML content of the changelog. Provide either htmlContent or markdownContent depending on the format your data is in.

  • Name
    markdownContent
    Type
    string
    Description

    The markdown content of the changelog.

  • Name
    changelogCategories
    Type
    string[]
    Description

    An array of category identifiers to which the changelog belongs.
    Example: ["New", "Fixed", "Improved"]

  • Name
    displayed
    Type
    boolean
    Description

    A boolean flag that indicates whether the changelog is initially visible to the public.

  • Name
    scheduledDate
    Type
    Date
    Description

    The date the changelog should be published. Must be a future date.

  • Name
    featuredImage
    Type
    string
    Description

    The URL of the featured image for the changelog.

  • Name
    sendNotification
    Type
    boolean
    Description

    A flag that indicates whether to send an email notification when the changelog is published.

  • Name
    allowedSegmentIds
    Type
    string[]
    Description

    An array of segment ids that are allowed to view the changelog.

Request

PATCH
/v2/changelog
curl -X 'PATCH' 'https://do.featurebase.app/v2/changelog' \
  -H 'X-API-Key: {token}' \
  -H 'Content-Type: application/json' \
  -d '{
        "id": "6457e3ff70afca5d8c27dccc",
        "title": "New Features Update",
        "markdownContent": "Exciting new features to explore.",
        "changelogCategories": ["New", "Fixed", "Improved"],
        "displayed": false,
        "scheduledDate": "2023-12-01T00:00:00Z",
        "featuredImage": "http://example.com/image.png",
        "sendNotification": true
      }'      

Response

{
    "changelog": {
            "title": "Your awesome changelog!",
            "slug": "your-awesome-changelog",
            "content": "<p>Your changelog content in HTML format.</p>",
            "markdownContent": "Your changelog content in markdown format.",
            "date": "2023-05-07T17:46:39.168Z",
            "displayed": true,
            "sendNotification": true,
            "emailSentToSubscribers": true,
            "commentCount": 2,
            "changelogCategories": [
                {
                    "name": "Test2",
                    "roles": [],
                    "id": "6438a1efda3640f8feb72121"
                }
            ],
            "organization": "robiorg",
            "id": "6457e3ff70afca5d8c27dccc"
    },
    "success": true
}

DELETE/v2/changelog

Delete changelog

This endpoint allows you to delete a changelog.

Required

  • Name
    id
    Type
    string
    Description

    The id of the changelog to delete.

Request

DELETE
/v2/changelog
curl -X 'DELETE' 'https://do.featurebase.app/v2/changelog' \
  -H 'X-API-Key: {token}' \
  -H 'Content-Type: application/json' \
  -d '{
        "id": "6457e3ff70afca5d8c27dccc"
      }'      

Response

{
    "success": true
}

GET/v2/changelogs/subscribers

Get changelog subscribers

This endpoint allows you to retrieve list of all your changelog subscribers.

Request

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

Response

{
    "success": true,
    "emails": [
        "yourcustomer@gmail.com"
    ]
}

POST/v2/changelog/subscribers

Add new changelog subscribers

This endpoint allows you to add changelog subscribers. They will then receive emails when you post changelogs.

Required attributes

  • Name
    emails
    Type
    string[]
    Description

    An array of emails to add as subscribers.

Request

POST
/v2/changelog/subscribers
curl -X 'POST' 'https://do.featurebase.app/v2/changelog/subscribe' \
  -H 'X-API-Key: {token}' \
  -H 'Content-Type: application/json' \
  -d '{
        "emails": [
            "yourcustomer@gmail.com",
            "yoursecondcustomer@gmail.com
        ]
      }'

Response

{
    "success": true
}

DELETE/v2/changelog/subscribers

Remove changelog subscribers by email

This endpoint allows you to update a post by providing the post id.

Required attributes

  • Name
    emails
    Type
    string[]
    Description

    An array of emails to remove from subscribers.

Request

DELETE
/v2/changelog/subscribers
 curl -X 'DELETE' 'https://do.featurebase.app/v2/changelog/subscribe' \
   -H 'X-API-Key: {token}' \
   -H 'Content-Type: application/json' \
   -d '{
         "emails": [
             "yourcustomer@gmail.com",
         ]
       }'

Response

{
    "success": true
}