Skip to main content
To call the Bodyguard API, your application authenticates with an API key. In the dashboard, API keys belong to a service account: the service account is the identity of your application or automated process (a monitoring tool, a script, a data pipeline, a staging or production environment), and the API key is the credential it uses to authenticate.
Service accounts and API keys are only supported by the new API.

Prerequisites

You need the Admin role in your organization to create and manage service accounts and API keys. Members and Editors can view them.

Steps

1

Create a service account

  1. Click the gear icon in the left menu to open Settings, then select Identity & access management.
    Bodyguard dashboard with the Settings gear icon in the left menu and the Identity & access management entry highlighted

    Settings > Identity & access management

  2. Open the Service accounts tab and click Create service account.
    Service accounts tab with the Create service account button highlighted

    Service accounts tab

  3. Fill in the form. The numbers match the screenshot below. 1. Enter a Name.
    2. Add an optional Description.
    3. Review the source access. Grant full source access is enabled by default: the service account can access all current and future sources.
    4. Click Create.
    Create service account dialog with the Name field (1), the Description field (2), the Grant full source access option (3), and the Create button (4) highlighted

    Create service account form

    Use a clear name that identifies the application or environment using the account. For example, name it Production Monitoring and describe it as Used by the production monitoring integration.
  4. Your service account appears in the list. Click the expand icon at the end of its row to open its details page.
    Service accounts list with the new service account highlighted and an arrow pointing to the expand icon that opens its details page

    Open the service account details page

2

Generate an API key

  1. On the service account details page, click Generate an API key.
    Service account details page with the Generate an API key button highlighted

    Service account details page

  2. Enter a name and an optional description. To make the key expire, select Set an expiration date and pick a date. Then click Generate and continue.
    Generate an API key dialog with the Name, Description, Set an expiration date, and Expiration date fields, and the Generate and continue button

    Generate an API key form

  3. Copy your API key with the copy icon and store it securely, then click Done. The key is displayed only once, when you create it. You can’t display it again afterwards.
    Your API key has been generated dialog with the API key field and its copy icon highlighted

    API key displayed at creation

You can later edit, deactivate, or delete a key from the ⋮ menu at the end of its row. Editing a key only changes its name, description, and expiration date: you can’t change or display its value. If you lose the value of a key, generate a new one.
API key row with its menu open, showing the Edit API key, Deactivate, and Delete actions

API key actions

Deactivating a service account does not deactivate its API keys. Manage the keys separately when necessary.
3

Use your API key

Send the key in the Authorization header of every request, using the case-sensitive ApiKey scheme:
Authorization header
See Authentication for the required headers and the authentication errors, and the Quickstart for a first request.
Keep your API key secret and never expose it in client-side code.

Next steps

API introduction

Authenticate and send your first request.

Connect your webhook

Receive notifications on your endpoint.