> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Buildkite connection

> Learn how to configure a Buildkite connection for Infisical.

A Buildkite connection authenticates Infisical to Buildkite with an [API access token](https://buildkite.com/docs/apis/managing-api-tokens), so Infisical can list your organizations and clusters and manage the [Buildkite secrets](https://buildkite.com/docs/pipelines/security/secrets/buildkite-secrets) in a cluster.

Buildkite issues API access tokens to a user, not to an organization, so Infisical acts as the user who created the token.

> [!NOTE]
>
> This guide only authenticates Infisical with Buildkite. Once the app connection is ready, you can [use it to set up integrations](#step-3-configure-integrations).

## Prerequisites

* Membership in the Buildkite organization that owns the clusters you plan to sync to
* For each of those clusters, the [maintainer](https://buildkite.com/docs/pipelines/security/clusters/manage#manage-maintainers-on-a-cluster) role on the cluster or the administrator role in the organization, which Buildkite requires to create and update secrets

## Step 1: Create a Buildkite API access token

Infisical needs a Buildkite API access token that can read organizations and clusters, and read and write secrets.

**Step 1**

Log in to Buildkite, open the account menu in the top right, and select **Personal settings**. Then select **API Access Tokens**.

![Personal Settings Menu](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/buildkite/buildkite-personal-settings.png)

**Step 2**

Select **New API Access Token**, and enter your password if Buildkite asks for it.

![New API Access Token](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/buildkite/buildkite-new-api-access-token.png)

**Step 3**

Fill in the form:

* **Description**: A name that identifies the token, such as `infisical`
* **Credential Type**: **Token**
* **Organization Access**: The organizations that own the clusters you plan to sync to
* **Token Expiry**: How long the token stays valid; once it expires, syncs fail until you update the connection with a new token
* **REST API Scopes**: **READ** for **Organizations**, **Clusters**, and **Pipelines**, and **READ** and **WRITE** for **Secrets**
* **GraphQL API Access**: **Disabled**, because Infisical uses only the REST API

Then select **Create New API Access Token**.

![Create New API Access Token](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/buildkite/buildkite-create-api-access-token.png)

**Step 4**

Copy the token and store it securely. Buildkite shows it only once.

## Step 2: Create the app connection

Next, create the app connection in Infisical.

> [!TIP]
>
> To create the connection using the API, use the Buildkite [Create](https://infisical.com/docs/api-reference/endpoints/app-connections/buildkite/create.md) endpoint.

**Organization-level**

**Step 1**

In the sidebar, select **Integrations**, then open the **App Connections** tab.

![App Connections Tab](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/general/add-connection.png)

**Step 2**

Select **Add Connection** and choose **Buildkite**.

![Select Buildkite Connection](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/buildkite/buildkite-app-connection-option.png)

**Step 3**

Fill out the form's fields:

* **Name**: A descriptive name for the connection; it must be slug-friendly
* **Description** (optional): A note for future reference
* **Method**: **API Token**, the only method the connection supports
* **Buildkite API Access Token**: The token you copied when [creating a Buildkite API access token](#step-1-create-a-buildkite-api-access-token)

Then, select **Connect to Buildkite**.

![Buildkite Connection Form](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/buildkite/buildkite-app-connection-form.png)

**Project-level**

**Step 1**

In your Secrets Management project, select **Integrations** from the sidebar, then open the **App Connections** tab.

**Step 2**

Select **Add Connection** and choose **Buildkite**.

![Select Buildkite Connection](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/buildkite/buildkite-app-connection-option-project.png)

**Step 3**

Fill out the form's fields:

* **Name**: A descriptive name for the connection; it must be slug-friendly
* **Description** (optional): A note for future reference
* **Method**: **API Token**, the only method the connection supports
* **Buildkite API Access Token**: The token you copied when [creating a Buildkite API access token](#step-1-create-a-buildkite-api-access-token)

Then, select **Connect to Buildkite**.

![Buildkite Connection Form](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/buildkite/buildkite-app-connection-form-project.png)

When you submit the form, Infisical checks that Buildkite accepts the token and that the token has the `read_organizations`, `read_clusters`, `read_pipelines`, `read_secrets_details`, and `write_secrets` scopes.

> [!TIP]
>
> Your Buildkite app connection is ready to use.

## Step 3: Configure integrations

Now that your Buildkite app connection is configured, you can use it to set up the following integration:

> [card] [Buildkite sync](https://infisical.com/docs/integrations/secret-syncs/buildkite.md)
>
> Sync secrets from Infisical to Buildkite secrets in a cluster.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.