---
title: "Create Service Account"
method: POST
path: "/api/v1/service_accounts"
tags: ["service_accounts", "api_keys"]
---

# Create Service Account

`POST /api/v1/service_accounts`

Creates a service account.

Args:
    service_account: Service account to create.

Returns:
    The created service account.

## Request body

- ServiceAccountRequest — Request model for service accounts.
  - `name` string, required
  - `description` string, nullable
  - `active` boolean, required

## Response `200`

Successful Response

- ServiceAccountResponse — Response model for service accounts.
  - `body` ServiceAccountResponseBody — Response body for service accounts.
    - `created` string, date-time, required
    - `updated` string, date-time, required
    - `active` boolean
  - `metadata` ServiceAccountResponseMetadata — Response metadata for service accounts.
    - `description` string
  - `resources` ServiceAccountResponseResources — Class for all resource models associated with the service account entity.
  - `id` string, uuid, required
  - `permission_denied` boolean
  - `name` string, required

## Other responses

- `401` — Unauthorized
- `409` — Conflict
- `422` — Unprocessable Entity

---

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