---
title: "Create/replace a secret"
method: POST
path: "/api/v1/hooks/secrets/"
tags: ["webhooks"]
---

# Create/replace a secret

`POST /api/v1/hooks/secrets/`

Generate a secret for verifying the request signature header of the subscription payload. If a secret already exists, this call will delete the old secret and create a new one.

## Headers

- `Authorization` string, required

## Request body

- CreateSecret
  - `workspace_id` string — The ID of the workspace you are creating the secret in

## Response `201`

Generated

- SecretDetail
  - `id` string — The ID of the secret.
  - `value` string — The secret value.
  - `workspace_id` string — The ID of the workspace that the secret belongs to.

## Other responses

- `400` — Error

---

[API](https://skmtc.net/prolific/apis/api-reference.md) · [All operations](https://skmtc.net/prolific/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prolific/api-reference/versions/dc6f073a9827/schema)
