---
title: "Create a service account"
method: POST
path: "/v1/team-management/service-accounts"
tags: ["Team"]
---

# Create a service account

`POST /v1/team-management/service-accounts`

Creates a new API-only service account with its own generated key and secret. The identifier is a label (min 3 characters, unique within the team) shown next to the account's tests on the dashboard. Admin only.

## Request body

- PostV1TeamManagementServiceAccounts — Create a service account
  - `identifier` string, required — Human-friendly label for the service account (min 3 characters, unique within the team).

## Response `201`

Create a service account

- TestingbotEntitiesServiceAccount — Testingbot_Entities_ServiceAccount model
  - `id` integer, required — Unique numeric service-account ID.
  - `identifier` string, required — Human-friendly label shown on the dashboard and test detail pages.
  - `key` string, required — TestingBot API key (username) for this service account.
  - `secret` string, required — TestingBot API secret for this service account. Store it as a CI secret.
  - `created_at` string, date-time, required — When the service account was created.

## Other responses

- `401` — Authentication required
- `403` — Caller is not a team admin
- `422` — Invalid identifier

---

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