---
title: "Create Service Account"
method: POST
path: "/api/identity/{team_key}/service-accounts"
tags: ["identity"]
---

# Create Service Account

`POST /api/identity/{team_key}/service-accounts`

## Request

- Base URL: `https://api.superit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.superit.ai/api/identity/{team_key}/service-accounts`
- Auth: HTTP bearer

Create a service account and return its one-time token.

## Path parameters

- `team_key` string, required

## Request body

- CreateServiceAccountBody: Request body for creating a service account.
  - `name` string, required
  - `role` string, required
  - `allowedScopes` string[]
  - `expiresInDays` integer, nullable

## Response `201`

Successful Response

- IssuedCredential: A newly minted credential. ``token`` appears here and nowhere else — it is never persisted and never returned by any read endpoint, so this response is the only chance the caller has to store it.
  - `key` string, required
  - `token` string, required
  - `prefix` string, required
  - `expiresAt` string, date-time, nullable

## Other responses

- `400`: Invalid input
- `401`: Not authenticated
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `409`: Conflict
- `422`: Validation Error

---

[API](https://skmtc.dev/superit/apis/super-it-api.md) - [All operations](https://skmtc.dev/superit/apis/super-it-api/llms.txt) - [OpenAPI document](https://skmtc.dev/superit/apis/super-it-api/revisions/4944d556c2bb?raw)
