---
title: "Create child company API key"
method: POST
path: "/companies/{parent_company_id}/api_keys"
tags: ["Companies"]
---

# Create child company API key

`POST /companies/{parent_company_id}/api_keys`

Create an API key for a connected account (child company) owned by a parent company.

## Path parameters

- `parent_company_id` string, required

## Request body

- object — Parameters for CreateChildCompanyApiKey
  - `child_company_id` string, required — The unique identifier of the connected account to create the API key for (e.g. 'biz_xxx').
  - `name` string, nullable — A human-readable name for the API key, such as 'Production API Key'.
  - `permissions` object[], nullable — Granular permission statements defining which actions this API key can perform. Either permissions or role must be provided.
    - `actions` string[], required — Actions covered by this statement
    - `grant` boolean, required — Whether the actions are granted or denied
    - `resources` string[], required — Resource identifiers. Can look like 'biz_xxxx' or 'biz_xxx|pass_*|exp_xxx' or 'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or 'biz_xxx|pass_*'
  - `role` 'owner' | 'admin' | 'moderator' | 'sales_manager' | 'advertiser' — The different system roles that can be assigned.

## Response `200`

A successful response

- object — An API key created for a child company, including the one-time secret key.
  - `id` string, required — The unique identifier for the authorized api key.
  - `name` string, nullable, required — A user set name to identify an API key
  - `secret_key` string, required — The secret key used to authenticate requests. Only returned at creation time.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `422` — Verification required
- `429` — Too many requests
- `500` — Internal server error

---

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