---
title: "Rotate Token"
method: POST
path: "/api/v1/app/{app_id}/autoconfig/{autoconfig_id}/rotate"
tags: ["AutoConfig"]
---

# Rotate Token

`POST /api/v1/app/{app_id}/autoconfig/{autoconfig_id}/rotate`

## Request

- Base URL: `https://api.eu.svix.com`
- URL: `https://api.eu.svix.com/api/v1/app/{app_id}/autoconfig/{autoconfig_id}/rotate`
- Auth: HTTP bearer

Rotate the auth token and signing secret for an AutoConfig subscription.

## Path parameters

- `app_id` string, required: The Application's ID or UID.
- `autoconfig_id` string, required: The AutoConfigSubscription's ID.

## Headers

- `idempotency-key` string

## Request body

- RotateSubscriptionIn2
  - `signingSecret` EndpointSecretRotateIn
    - `gracePeriodSeconds` integer, nullable: How long the old secret will be valid for, in seconds. Valid values are between 0 (immediate expiry) and 7 days. The default is 24 hours.
    - `key` string, nullable: The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret.

## Response `200`

- AutoConfigOut
  - `createdAt` string, date-time, required
  - `id` string, required: The AutoConfigSubscription's ID.
  - `token` string, required: The AutoConfig token

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Too Many Requests

## Changes

- **2026-10-19** `cca56e67e5a4`: 1 info
  - added the required property `code` to the response with the `422` status
- **2026-09-15** `ec93e663e534`: 1 info
  - api operation id `v1.endpoint.autoconfig.rotate` removed and replaced with `v1.autoconfig-subscription.rotate`
- **2026-09-11** `3f0040e4a57a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/svix/apis/svix-api/changes/api/v1/app/:app_id/autoconfig/:autoconfig_id/rotate/post.md)

---

[API](https://skmtc.dev/svix/apis/svix-api.md) - [All operations](https://skmtc.dev/svix/apis/svix-api/llms.txt) - [OpenAPI document](https://skmtc.dev/svix/apis/svix-api/revisions/21bb0f86a732?raw)
