---
title: "Regenerate signing secret"
method: POST
path: "/environments/{environment_key}/regenerate_signing_secret"
tags: ["environments"]
---

# Regenerate signing secret

`POST /environments/{environment_key}/regenerate_signing_secret`

Regenerate environment signing secret. Once this is regenerated, the old signing secret will no longer be valid and you must immediately update your application with the new signing secret. This call should be authenticated with the key of the environment that you are trying to update and an Organization Access Secret.

## Response `200`

Successful

- RegenerateEnvironmentSigningSecretResponse
  - `environment` EnvironmentProperties
    - `key` string — The key identifying the environment at Spreedly.
    - `signing_secret` string — The secret used to sign callbacks that are made back into your application.
    - `organization_key` string — The organization that the environment belongs to.
    - `callback_url` string — The url where Spreedly will attempt delivery of account updater transaction results. Transaction results are posted in JSON format.
    - `smart_routing_enabled` boolean — If the environment has smart routing enabled or not.
    - `allow_direct_api_payment_method_creation` boolean — If the environment allows payment method creation from anywhere, or only from Spreedly Express or Iframe.
    - `name` string — The human readable name of the environment.
    - `default_gateway_token` string — The default gateway to send transactions if smart routing is enabled.
    - `payment_method_management_enabled` boolean — If an environment is enabled to manage payment methods with Advanced Vaulting.
    - `au_enabled` boolean — If the environment has account updater enabled.
    - `retry` boolean — If the environment has retry enabled.
    - `iframe_enhanced_security_enabled` boolean — If the environment is enabled to pass enhanced security fields to iFrame init.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/spreedly/apis/spreedly-api-v1.md) · [All operations](https://skmtc.net/spreedly/apis/spreedly-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spreedly/spreedly-api-v1/revisions/72ba4e23e65c/schema)
