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 Project settings page of the app, using a status image API token.

  1. Open your project on Bitrise with a user that has the Admin role on the project.

  2. On the main page of the project, click on the Project settings button.

    project-settings-button.png
  3. On the left, select Builds.

  4. Scroll down to the Build status badge section and click Get code.

    change-icon.png
  5. 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 project will be shown.

    embed-url.png
  6. 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.

  7. Copy the embed code from the Embed section.

  8. Paste the code to your website.

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.