---
title: "Attach a child organization to an enterprise"
method: POST
path: "/v1/enterprise/account"
tags: ["Enterprise"]
---

# Attach a child organization to an enterprise

`POST /v1/enterprise/account`

Attaches an existing organization to an enterprise. The `retention` and `owner` field are optional, and will be defaulted if not specified. To specify which child organization to attach, one of its service keys must be supplied through our typical service key authorization schema; either as basic authorization or through the `servicekey` header.

## Request body

- EnterprisePut
  - `retention` integer — Current retention period selected for the child organization
  - `owner` string — The email of a user to be given owner privileges of an account.

## Response `200`

Child organization successfully attached.

- EnterpriseResource
  - `account` string — Account number of the organization
  - `enterprise` string — Unique Id of the enterprise organization
  - `retention` integer — Current retention period selected for the child organization
  - `owner` string — The email of a user to be given owner privileges of an account.
  - `retentionPeriods` Retention[] — Available log retention options for the child organization
  - `plan` string — The name of a plan.
  - `servicekey` string — A secret key which can be used to authenticate requests to Mezmo.

## Other responses

- `400` — A poorly formatted request returns with a `BadRequest` code.
- `409` — The supplied request leads to an invalid state. The returned error will contain more helpful information.

---

[API](https://skmtc.net/mezmo/apis/pipeline-api.md) · [All operations](https://skmtc.net/mezmo/apis/pipeline-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mezmo/pipeline-api/versions/fb2535545d90/schema)
