---
title: "Create Service Key"
method: POST
path: "/api/v1/orgs/{org_id}/service-keys"
tags: ["organizations"]
---

# Create Service Key

`POST /api/v1/orgs/{org_id}/service-keys`

## Request

- Base URL: `https://app.ctlsurf.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.ctlsurf.com/api/v1/orgs/{org_id}/service-keys`
- Auth: HTTP bearer

Mint a scoped service key (csk_) for the org (owner/admin only).

## Path parameters

- `org_id` string, uuid, required

## Request body

- ServiceKeyCreate
  - `name` string, required
  - `scopes` string[], required

## Response `201`

Successful Response

- ServiceKeyCreatedResponse: Returned when a service key is minted; includes the full key once.
  - `id` string, uuid, required
  - `name` string, required
  - `key_prefix` string, required
  - `scopes` string[], nullable
  - `is_active` boolean, required
  - `created_at` string, date-time, required
  - `last_used_at` string, date-time, nullable
  - `key` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ctlsurf/apis/notebook-control-plane.md) · [All operations](https://skmtc.dev/ctlsurf/apis/notebook-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/ctlsurf/apis/notebook-control-plane/revisions/ddfbbe20d5ce?raw)
