# ICP Configs

The ICP (Ideal Customer Profile) config endpoints let you create, list, update, and delete ICP configurations, recalculate scores, and retrieve statistics.

## Endpoints

| Method | Path                                                              | Description            |
| ------ | ----------------------------------------------------------------- | ---------------------- |
| GET    | `/organizations/{organization_id}/icp-configs`                    | List ICP configs       |
| POST   | `/organizations/{organization_id}/icp-configs`                    | Create ICP config      |
| GET    | `/organizations/{organization_id}/icp-configs/{slug}`             | Get ICP config         |
| PUT    | `/organizations/{organization_id}/icp-configs/{slug}`             | Update ICP config      |
| DELETE | `/organizations/{organization_id}/icp-configs/{slug}`             | Delete ICP config      |
| POST   | `/organizations/{organization_id}/icp-configs/{slug}/recalculate` | Recalculate ICP scores |
| GET    | `/organizations/{organization_id}/icp-configs/stats`              | Get ICP statistics     |

***

## List ICP Configs

Returns all ICP configurations for an organization.

**Method:** GET\
**Path:** `/organizations/{organization_id}/icp-configs`

### Path Parameters

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

### Response Body

Returns an array of ICP config objects, each with `slug`, `name`, `filter`, and related settings.

### Example

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

***

## Create ICP Config

Creates a new ICP configuration.

**Method:** POST\
**Path:** `/organizations/{organization_id}/icp-configs`

### Path Parameters

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

### Request Body

JSON object with ICP config fields. Typically includes `slug`, `name`, `filter` (company/contact criteria), and other configuration options.

### Response Body

Returns the created ICP config (201 Created).

### Example

```bash
curl -X POST "https://api.app.bullseye.so/api/v1/organizations/org_abc123/icp-configs" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "enterprise-tech",
    "name": "Enterprise Technology",
    "filter": {"industries": ["Technology"], "company_sizes": ["501-1000"]}
  }'
```

***

## Get ICP Config

Returns a single ICP configuration by slug.

**Method:** GET\
**Path:** `/organizations/{organization_id}/icp-configs/{slug}`

### Path Parameters

| Parameter         | Type   | Description     |
| ----------------- | ------ | --------------- |
| `organization_id` | string | Organization ID |
| `slug`            | string | ICP config slug |

### Response Body

Returns the ICP config object.

### Example

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

***

## Update ICP Config

Updates an existing ICP configuration.

**Method:** PUT\
**Path:** `/organizations/{organization_id}/icp-configs/{slug}`

### Path Parameters

| Parameter         | Type   | Description     |
| ----------------- | ------ | --------------- |
| `organization_id` | string | Organization ID |
| `slug`            | string | ICP config slug |

### Request Body

JSON object with the fields to update.

### Response Body

Returns the updated ICP config object.

### Example

```bash
curl -X PUT "https://api.app.bullseye.so/api/v1/organizations/org_abc123/icp-configs/enterprise-tech" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "Enterprise Technology (Updated)", "filter": {"industries": ["Technology", "SaaS"]}}'
```

***

## Delete ICP Config

Permanently deletes an ICP configuration.

**Method:** DELETE\
**Path:** `/organizations/{organization_id}/icp-configs/{slug}`

### Path Parameters

| Parameter         | Type   | Description     |
| ----------------- | ------ | --------------- |
| `organization_id` | string | Organization ID |
| `slug`            | string | ICP config slug |

### Response Body

Returns 204 No Content on success.

### Example

```bash
curl -X DELETE "https://api.app.bullseye.so/api/v1/organizations/org_abc123/icp-configs/enterprise-tech" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json"
```

***

## Recalculate ICP Scores

Triggers a recalculation of ICP scores for all visitors. This is an asynchronous operation.

**Method:** POST\
**Path:** `/organizations/{organization_id}/icp-configs/{slug}/recalculate`

### Path Parameters

| Parameter         | Type   | Description     |
| ----------------- | ------ | --------------- |
| `organization_id` | string | Organization ID |
| `slug`            | string | ICP config slug |

### Response Body

Returns 202 Accepted. The recalculation runs in the background.

### Example

```bash
curl -X POST "https://api.app.bullseye.so/api/v1/organizations/org_abc123/icp-configs/enterprise-tech/recalculate" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json"
```

***

## Get ICP Statistics

Returns visitor counts for all ICPs in an organization over an optional date range.

**Method:** GET\
**Path:** `/organizations/{organization_id}/icp-configs/stats`

### Path Parameters

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

### Query Parameters

| Parameter | Type   | Required | Description             |
| --------- | ------ | -------- | ----------------------- |
| `from`    | string | No       | Start date (ISO format) |
| `to`      | string | No       | End date (ISO format)   |

### Response Body

Returns an array of ICP stat items with slug and visitor counts.

### Example

```bash
curl -X GET "https://api.app.bullseye.so/api/v1/organizations/org_abc123/icp-configs/stats?from=2025-01-01&to=2025-01-31" \
  -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/icp-configs.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.
