Skip to main content

Embedding a build status badge to your site

You can embed a Bitrise status badge on your site and show visitors the state of your latest build. You can choose to display the status of any build, regardless of the repository branch it was built from, or you can select a specific branch.

You can get the embed code from the App Settings page of the app, using a status image API token.

  1. Open your app on Bitrise with a user that has the Admin role on the app's team.

  2. On the main page of the app, click on the App Settings icon: settings.svg.

    app-settings.png
  3. On the left, select General.

  4. Scroll down to the Status badge section.

    status-badge.png
  5. Click Embed badge.

  6. Optionally, type a branch name in the Branch field.

    If you type a valid branch name, the status of builds from this branch will be shown. If you leave the field empty, the status of any build of the app will be shown.

    embed-url.png
  7. Choose the format of the embed code in the Format menu: you can choose between a simple HTTPS URL or you can get the code in Markdown.

  8. Copy the embed code from the Embed section.

You can then paste the full embed code to your website so that it can display a Bitrise build status badge.

The status image API token

The status image API token is a special token which can only be used for the status badge update. No other information can be retrieved with this token. It returns a simple JSON object. For example, if the latest build is successful:

{ "status": "success" }

The possible status responses are:

  • success: If the last finished build was successful.

  • error: If the last finished build failed or was aborted.

  • unknown: In any other case, for example, if there was no finished build.