---
title: "Rotate a child's key: mint a replacement with the same scope, then revoke"
method: POST
path: "/v2/accounts/children/{child_id}/api-keys/{key_id}/rotate"
tags: ["accounts-v2"]
---

# Rotate a child's key: mint a replacement with the same scope, then revoke

`POST /v2/accounts/children/{child_id}/api-keys/{key_id}/rotate`

## Request

- Base URL: `https://api.tracklysms.com/api`
- URL: `https://api.tracklysms.com/api/v2/accounts/children/{child_id}/api-keys/{key_id}/rotate`
- Auth: API key in header `X-Api-Key`

the old key. Revocation is immediate and the partner API offers no grace window,
unlike the dashboard rotate flow, so deploy the new secret to every caller
before rotating — the old one stops authenticating the moment this returns.

## Other responses

- `409`: Delegation or source changed, or rotation outcome is uncertain
- `502`: Could not rotate key
- `503`: API key lineage is unavailable

---

[API](https://skmtc.dev/tracklysms/apis/trackly-sms-api.md) · [All operations](https://skmtc.dev/tracklysms/apis/trackly-sms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tracklysms/apis/trackly-sms-api/revisions/ac1ad22cb2a9?raw)
