---
title: "Rotate the signing secret"
method: POST
path: "/v1/finder/webhook_endpoints/{id}/rotate_secret"
tags: ["Recruit Affiliates webhooks"]
---

# Rotate the signing secret

`POST /v1/finder/webhook_endpoints/{id}/rotate_secret`

## Request

- Base URL: `https://api.affiliaterail.com`
- URL: `https://api.affiliaterail.com/v1/finder/webhook_endpoints/{id}/rotate_secret`
- Auth: HTTP bearer

A new secret now. For 24 hours we sign with both, so you can swap at your own pace. The answer carries the new `secret` this once.

**Scope:** `finder:write`

## Path parameters

- `id` string, required: Prefixed id (`fwe_…`)

## Response `200`

The endpoint, with its new secret

- FinderWebhookEndpointWithSecret
  - `id` string, required: Prefixed id (`fwe_…`)
  - `object` 'finder_webhook_endpoint', required
  - `url` string, required
  - `kind` 'webhook' | 'slack', required: `slack` sends a Slack message to a Slack incoming webhook address instead of signed JSON
  - `event_types` string[], required: The events this endpoint gets. Empty means every event.
  - `enabled` boolean, required
  - `livemode` boolean, required: false for a test endpoint, which only gets test events
  - `previous_secret_expires_at` string, date-time, nullable, required: After a rotation, when the old secret stops signing. Null when only one secret is live.
  - `created_at` string, date-time, required: ISO-8601, UTC
  - `secret` string, required: The signing secret. Shown here once, and never again. Keep it somewhere safe.

## Other responses

- `400`: Invalid request
- `401`: Missing or unknown API key
- `402`: The organization's Recruit Affiliates plan does not include the API
- `403`: Key lacks the required scope
- `404`: No such object in your organization
- `409`: In conflict with the object's state, or the same idempotent request is still running
- `422`: The request was understood and refused
- `429`: Rate limited, by key or by organization: see Retry-After and X-RateLimit-Scope
- `501`: Not available to a test key (`sandbox_no_send`)

---

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