---
title: "Attach an organization"
method: POST
path: "/api/public/billing-accounts/{billingAccountId}/organizations"
tags: ["Billing accounts"]
---

# Attach an organization

`POST /api/public/billing-accounts/{billingAccountId}/organizations`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/billing-accounts/{billingAccountId}/organizations`
- Auth: HTTP bearer

Attaches an existing organization to the billing account so it is billed through the account. Requires admin access to both the organization and the account's owner organization. The organization becomes a paid (GROWTH) organization with no trial limitations.

## Path parameters

- `billingAccountId` string, required: Billing account ID

## Request body

- object
  - `organizationId` string, required: Organization to attach. You must be an admin of both this organization and the billing account owner organization.

## Response `201`

Organization attached successfully

- object
  - `data` object, required
    - `id` string, required: Organization ID
    - `name` string, required: Name of the organization
    - `billingAccountId` string, required: Billing account ID
    - `attached` boolean, required: True when the organization was attached by this request. False when it was already attached.

## Other responses

- `400`: Bad request - Invalid JSON body or validation error
- `401`: Unauthorized - Missing or invalid API key
- `404`: Not found - Billing account or organization not found, or no admin access
- `409`: Conflict - Organization is attached to another billing account or has its own subscription
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error

---

[API](https://skmtc.dev/basedash/apis/basedash-public-api.md) - [All operations](https://skmtc.dev/basedash/apis/basedash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/basedash/apis/basedash-public-api/revisions/efb9d40bc6f7?raw)
