---
title: "Rotate a service account access key"
method: POST
path: "/v1/team-management/service-accounts/{id}/rotate"
tags: ["Team"]
---

# Rotate a service account access key

`POST /v1/team-management/service-accounts/{id}/rotate`

Generates a fresh key and secret for the service account. The previous key and secret stop working immediately, so update any automation using them. Admin only.

## Path parameters

- `id` integer, required

## Response `201`

Rotate a service account access key

- 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
- `404` — Service account not found

---

[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)
