# Organizations

The organization endpoints let you create, list, retrieve, and update organizations, manage team members, and configure overage limits.

## Endpoints

| Method | Path                                               | Description               |
| ------ | -------------------------------------------------- | ------------------------- |
| POST   | `/organization`                                    | Create organization       |
| GET    | `/organization/list`                               | List user's organizations |
| GET    | `/organization/{organization_id}`                  | Get organization details  |
| PUT    | `/organization/{organization_id}`                  | Update organization       |
| DELETE | `/organization/{organization_id}/member/{user_id}` | Remove team member        |
| PATCH  | `/organization/{organization_id}/max-overages`     | Set max overage limit     |

***

## Create Organization

Creates a new organization.

**Method:** POST\
**Path:** `/organization`

### Request Body

| Field              | Type   | Required | Description                         |
| ------------------ | ------ | -------- | ----------------------------------- |
| `organizationName` | string | Yes      | Name of the organization            |
| `domain`           | string | No       | Primary domain for the organization |

### Response Body

Returns the created `organization` object with `id`, `name`, and other fields.

### Example

```bash
curl -X POST "https://api.app.bullseye.so/api/v1/organization" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"organizationName": "Acme Corp", "domain": "acme.com"}'
```

***

## List Organizations

Returns all organizations the authenticated user is a member of.

**Method:** GET\
**Path:** `/organization/list`

### Response Body

Returns an array of organization objects.

### Example

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

***

## Get Organization

Returns details for a single organization.

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

### Path Parameters

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

### Response Body

Returns the `organization` object with full details.

### Example

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

***

## Update Organization

Updates an existing organization.

**Method:** PUT\
**Path:** `/organization/{organization_id}`

### Path Parameters

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

### Request Body

JSON object with the fields to update (e.g., `name`, `domain`).

### Response Body

Returns the updated `organization` object.

### Example

```bash
curl -X PUT "https://api.app.bullseye.so/api/v1/organization/org_abc123" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp Updated"}'
```

***

## Remove Team Member

Removes a user from the organization.

**Method:** DELETE\
**Path:** `/organization/{organization_id}/member/{user_id}`

### Path Parameters

| Parameter         | Type   | Description       |
| ----------------- | ------ | ----------------- |
| `organization_id` | string | Organization ID   |
| `user_id`         | string | User ID to remove |

### Response Body

Returns the updated organization or membership list.

### Example

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

***

## Set Max Overages

Updates the maximum overage limit for the organization.

**Method:** PATCH\
**Path:** `/organization/{organization_id}/max-overages`

### Path Parameters

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

### Request Body

JSON object with the overage limit value (structure depends on API implementation).

### Response Body

Returns the updated overage configuration.

### Example

```bash
curl -X PATCH "https://api.app.bullseye.so/api/v1/organization/org_abc123/max-overages" \
  -H "X-API-Key: bsk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"maxOverages": 100}'
```


---

# 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/organizations.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.
