# Integrations

The integration endpoints let you list connected integrations, manage integration flows, obtain integrator tokens, select accounts, and request integration installation.

## Endpoints

| Method | Path                                              | Description                 |
| ------ | ------------------------------------------------- | --------------------------- |
| GET    | `/integrations/{organization_id}`                 | List integrations           |
| GET    | `/integrations/{organization_id}/flows`           | List integration flows      |
| GET    | `/integrations/{organization_id}/flows/{flow_id}` | Get integration flow        |
| POST   | `/integrations/flows`                             | Create integration flow     |
| DELETE | `/integrations/{organization_id}/flows/{flow_id}` | Delete integration flow     |
| POST   | `/integrations/integrator/token`                  | Get integrator token        |
| POST   | `/integrations/account/select`                    | Select integration account  |
| GET    | `/integrations/request-install`                   | Request integration install |

***

## List Integrations

Returns all integrations for an organization, including connection status and ads account information.

**Method:** GET\
**Path:** `/integrations/{organization_id}`

### Path Parameters

| Parameter         | Type   | Description     |
| ----------------- | ------ | --------------- |
| `organization_id` | string | Organization ID |

### Response Body

Returns an array of integration objects with `type`, `name`, `installed`, `adsAccounts`, `selectedAdsAccount`, and `connectedAt`.

### Example

```bash
curl -X GET "https://api.app.bullseye.so/api/v1/integrations/org_abc123" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json"
```

***

## List Integration Flows

Returns all integration flows for an organization.

**Method:** GET\
**Path:** `/integrations/{organization_id}/flows`

### Path Parameters

| Parameter         | Type   | Description     |
| ----------------- | ------ | --------------- |
| `organization_id` | string | Organization ID |

### Query Parameters

| Parameter       | Type   | Required | Description              |
| --------------- | ------ | -------- | ------------------------ |
| `integrationId` | string | No       | Filter by integration ID |

### Response Body

Returns an array of integration flow objects.

### Example

```bash
curl -X GET "https://api.app.bullseye.so/api/v1/integrations/org_abc123/flows" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json"
```

***

## Get Integration Flow

Returns a single integration flow by ID.

**Method:** GET\
**Path:** `/integrations/{organization_id}/flows/{flow_id}`

### Path Parameters

| Parameter         | Type   | Description         |
| ----------------- | ------ | ------------------- |
| `organization_id` | string | Organization ID     |
| `flow_id`         | string | Integration flow ID |

### Response Body

Returns the integration flow object.

### Example

```bash
curl -X GET "https://api.app.bullseye.so/api/v1/integrations/org_abc123/flows/flow_xyz789" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json"
```

***

## Create Integration Flow

Creates a new integration flow.

**Method:** POST\
**Path:** `/integrations/flows`

### Request Body

| Field            | Type   | Required | Description             |
| ---------------- | ------ | -------- | ----------------------- |
| `organizationId` | string | Yes      | Organization ID         |
| `title`          | string | Yes      | Flow title              |
| `nodes`          | object | No       | Flow node configuration |

### Response Body

Returns the created integration flow object.

### Example

```bash
curl -X POST "https://api.app.bullseye.so/api/v1/integrations/flows" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"organizationId": "org_abc123", "title": "Lead Sync to Google Ads", "nodes": {}}'
```

***

## Delete Integration Flow

Deletes an integration flow.

**Method:** DELETE\
**Path:** `/integrations/{organization_id}/flows/{flow_id}`

### Path Parameters

| Parameter         | Type   | Description         |
| ----------------- | ------ | ------------------- |
| `organization_id` | string | Organization ID     |
| `flow_id`         | string | Integration flow ID |

### Response Body

Returns 200 on success.

### Example

```bash
curl -X DELETE "https://api.app.bullseye.so/api/v1/integrations/org_abc123/flows/flow_xyz789" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json"
```

***

## Get Integrator Token

Returns a token for use with an integration (e.g., for OAuth or API access).

**Method:** POST\
**Path:** `/integrations/integrator/token`

### Request Body

JSON object with integration-specific parameters (e.g., `integrationType`, `organizationId`).

### Response Body

Returns the token or token URL.

### Example

```bash
curl -X POST "https://api.app.bullseye.so/api/v1/integrations/integrator/token" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"integrationType": "googleAds", "organizationId": "org_abc123"}'
```

***

## Select Integration Account

Selects which integration account (e.g., ads account) to use for the organization.

**Method:** POST\
**Path:** `/integrations/account/select`

### Request Body

JSON object with `organizationId`, `integrationType`, and `accountId` (or equivalent).

### Response Body

Returns the updated selection or confirmation.

### Example

```bash
curl -X POST "https://api.app.bullseye.so/api/v1/integrations/account/select" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"organizationId": "org_abc123", "integrationType": "googleAds", "accountId": "acc_xyz"}'
```

***

## Request Integration Install

Initiates the installation flow for an integration (e.g., Google Ads, Facebook Ads).

**Method:** GET\
**Path:** `/integrations/request-install`

### Query Parameters

| Parameter         | Type   | Required | Description                  |
| ----------------- | ------ | -------- | ---------------------------- |
| `integrationType` | string | Yes      | `googleAds` or `facebookAds` |
| `organizationId`  | string | No       | Organization ID              |

### Response Body

Returns a URL or instructions for completing the installation.

### Example

```bash
curl -X GET "https://api.app.bullseye.so/api/v1/integrations/request-install?integrationType=googleAds&organizationId=org_abc123" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bullseye.so/api-reference/integrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
